During unshelve, instance is spawn with image created by shelve
and is deleted just after, instance.image_ref still point
to the original instance build image.
In qcow2 environment, this is an issue because instance backing file
don't match anymore instance.image_ref and during live-migration/resize,
target host will fetch image corresponding to instance.image_ref
involving instance corruption.
This change fetches original image and rebase instance disk on it.
This avoid image_ref mismatch and bring back storage benefit to keep common
image in cache.
If original image is no more available in glance, backing file is merged into
disk(flatten), ensuring instance integrity during next live-migration/resize
operation.
NOTE(lyarwood): Test conflicts caused by If56842da51688 not being
present in stable/train.
Reviewed: https:/ /review. opendev. org/c/openstack /nova/+ /785627 /opendev. org/openstack/ nova/commit/ 3bc1502f009a8d1 88ddee9c46888c3 bac88180fe
Committed: https:/
Submitter: "Zuul (22348)"
Branch: stable/train
commit 3bc1502f009a8d1 88ddee9c46888c3 bac88180fe
Author: Alexandre Arents <email address hidden>
Date: Tue Nov 26 10:26:32 2019 +0000
Rebase qcow2 images when unshelving an instance
During unshelve, instance is spawn with image created by shelve
and is deleted just after, instance.image_ref still point
to the original instance build image.
In qcow2 environment, this is an issue because instance backing file resize,
don't match anymore instance.image_ref and during live-migration/
target host will fetch image corresponding to instance.image_ref
involving instance corruption.
This change fetches original image and rebase instance disk on it.
This avoid image_ref mismatch and bring back storage benefit to keep common
image in cache.
If original image is no more available in glance, backing file is merged into resize
disk(flatten), ensuring instance integrity during next live-migration/
operation.
NOTE(lyarwood): Test conflicts caused by If56842da51688 not being
present in stable/train.
Conflicts: tests/unit/ virt/libvirt/ test_driver. py
nova/
Change-Id: I1a33fadf0b7439 cf06c06cba2bc06 df6cef0945b e996086392251de 67953a45ba) 3f822685541da6b c7955fe55a)
Closes-Bug: #1732428
(cherry picked from commit 8953a689467f8c3
(cherry picked from commit 7003618884b5e03