libvirt: return the correct instance path while cleanup_resize
If we resized a pre-grizzly instance with grizzly or later nova
to another host, while the resize confirmation process,
_cleanup_resize will find the instance resize backup dir and
delete it, but a wrong xxx_resize dir like ${uuid}_resize,
instead of the correct ${name}_resize will be found.
This is because the instance is a resized one which original
instance dir exists on another host(the dest host),
get_instance_path method could not find the original instance
dir on the source host, so the path with uuid will be returned,
and the `target` existing check in _cleanup_resize is failed,
then the ${name}_resize dir will never be deleted.
Closes-bug: #1290294
Change-Id: I904b6751dec740e001f5ec29f637ef456528746f
(cherry picked from b4964eb6a570e290545f95d45411dc8441985cd5)
Reviewed: https:/ /review. openstack. org/104050 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=aeb71a88ae8 d05ff6f5f3f0929 65f12369fec07a
Committed: https:/
Submitter: Jenkins
Branch: stable/icehouse
commit aeb71a88ae8d05f f6f5f3f092965f1 2369fec07a
Author: Wangpan <email address hidden>
Date: Mon Mar 10 18:19:40 2014 +0800
libvirt: return the correct instance path while cleanup_resize
If we resized a pre-grizzly instance with grizzly or later nova instance_ path method could not find the original instance
to another host, while the resize confirmation process,
_cleanup_resize will find the instance resize backup dir and
delete it, but a wrong xxx_resize dir like ${uuid}_resize,
instead of the correct ${name}_resize will be found.
This is because the instance is a resized one which original
instance dir exists on another host(the dest host),
get_
dir on the source host, so the path with uuid will be returned,
and the `target` existing check in _cleanup_resize is failed,
then the ${name}_resize dir will never be deleted.
Closes-bug: #1290294 e001f5ec29f637e f456528746f 0545f95d45411dc 8441985cd5)
Change-Id: I904b6751dec740
(cherry picked from b4964eb6a570e29