Skip to content

libvirt: handle InstanceNotFound in migrate_disk_and_power_off#640

Open
PaulPickhardt wants to merge 1 commit into
stable/2023.2-m3from
I759504/cold-migration-instance-not-found
Open

libvirt: handle InstanceNotFound in migrate_disk_and_power_off#640
PaulPickhardt wants to merge 1 commit into
stable/2023.2-m3from
I759504/cold-migration-instance-not-found

Conversation

@PaulPickhardt

@PaulPickhardt PaulPickhardt commented Jul 3, 2026

Copy link
Copy Markdown

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

@PaulPickhardt
PaulPickhardt force-pushed the I759504/cold-migration-instance-not-found branch from d4bbc6a to 020a2a9 Compare July 23, 2026 12:19
@PaulPickhardt PaulPickhardt changed the title libvirt: ignore InstanceNotFound for BFV cold migration libvirt: handle InstanceNotFound in migrate_disk_and_power_off Jul 23, 2026
@PaulPickhardt
PaulPickhardt requested a review from fwiesel July 23, 2026 12:19
Comment thread nova/virt/libvirt/driver.py Outdated
Comment thread nova/virt/libvirt/driver.py
@PaulPickhardt
PaulPickhardt force-pushed the I759504/cold-migration-instance-not-found branch from 020a2a9 to 1174f89 Compare July 23, 2026 13:40
@PaulPickhardt

Copy link
Copy Markdown
Author

Thanks for the review. You were absolutely right. I changed it now!

@PaulPickhardt
PaulPickhardt requested a review from fwiesel July 23, 2026 13:42
@PaulPickhardt
PaulPickhardt force-pushed the I759504/cold-migration-instance-not-found branch 2 times, most recently from ee0d2b0 to 7be6eac Compare July 24, 2026 08:31
@PaulPickhardt
PaulPickhardt marked this pull request as ready for review July 24, 2026 08:32
@PaulPickhardt
PaulPickhardt force-pushed the I759504/cold-migration-instance-not-found branch 4 times, most recently from cfb374d to 304f885 Compare July 24, 2026 11:17
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
PaulPickhardt force-pushed the I759504/cold-migration-instance-not-found branch from 304f885 to c82c8c1 Compare July 24, 2026 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants