libvirt: handle InstanceNotFound in migrate_disk_and_power_off#640
Open
PaulPickhardt wants to merge 1 commit into
Open
libvirt: handle InstanceNotFound in migrate_disk_and_power_off#640PaulPickhardt wants to merge 1 commit into
PaulPickhardt wants to merge 1 commit into
Conversation
PaulPickhardt
force-pushed
the
I759504/cold-migration-instance-not-found
branch
from
July 23, 2026 12:19
d4bbc6a to
020a2a9
Compare
fwiesel
requested changes
Jul 23, 2026
PaulPickhardt
force-pushed
the
I759504/cold-migration-instance-not-found
branch
from
July 23, 2026 13:40
020a2a9 to
1174f89
Compare
Author
|
Thanks for the review. You were absolutely right. I changed it now! |
PaulPickhardt
force-pushed
the
I759504/cold-migration-instance-not-found
branch
2 times, most recently
from
July 24, 2026 08:31
ee0d2b0 to
7be6eac
Compare
PaulPickhardt
marked this pull request as ready for review
July 24, 2026 08:32
PaulPickhardt
force-pushed
the
I759504/cold-migration-instance-not-found
branch
4 times, most recently
from
July 24, 2026 11:17
cfb374d to
304f885
Compare
During a cold migration or resize retry, the libvirt domain may already be gone from the source host while the disk files are still present. _get_instance_disk_info previously raised InstanceNotFound in this case, causing the migration to fail. Add _get_instance_disk_info_from_dir as a fallback that discovers local disk files by scanning the instance directory and probing their format with qemu-img. For boot-from-volume instances the directory scan returns an empty list since there are no local disk files to copy. CONF.instances_path is assumed stable across deployments. So we can fall back to scanning the instance directory. Change-Id: If20d5802aa1d17f6252e52ad66c7b0c3c42a29d7
PaulPickhardt
force-pushed
the
I759504/cold-migration-instance-not-found
branch
from
July 24, 2026 12:04
304f885 to
c82c8c1
Compare
fwiesel
approved these changes
Jul 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
During a cold migration or resize retry, the libvirt domain may
already be gone from the source host while the disk files are still
present. _get_instance_disk_info previously raised InstanceNotFound
in this case, causing the migration to fail.
Add _get_instance_disk_info_from_dir as a fallback that discovers
local disk files by scanning the instance directory and probing their
format with qemu-img.
For boot-from-volume instances the directory scan
returns an empty list since there are no local disk files to copy.
Change-Id: If20d5802aa1d17f6252e52ad66c7b0c3c42a29d7