Reviewed: https://review.opendev.org/c/openstack/nova/+/775852 Committed: https://opendev.org/openstack/nova/commit/472825a83911c5351cfbd40458ad811dafdacacc Submitter: "Zuul (22348)" Branch: master
commit 472825a83911c5351cfbd40458ad811dafdacacc Author: Johannes Kulik <johannes.ku...@sap.com> Date: Tue Feb 16 15:56:38 2021 +0100 vmware: Handle folder renames in rescue cmd When a VM is storage-vMotioned, the name of the folder its files are in can change. Then, a rescue command trying to put the rescue disk into a folder named after the instance's UUID cannot work anymore and actually raises a FileNotFoundException for the directory path. To fix this, we now take the root VMDK's folder and copy the rescue image into that. Change-Id: Icef785b96e51942e7bac2df10c116078c77fedc4 Closes-Bug: #1915815 ** Changed in: nova Status: In Progress => Fix Released -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to OpenStack Compute (nova). https://bugs.launchpad.net/bugs/1915815 Title: vmware: Rescue impossible if VM folder renamed Status in OpenStack Compute (nova): Fix Released Bug description: Steps to reproduce ================== * storage-vMotion a VM (this renames the folder to the VM name, i.e. "$uuid" to "$name ($uuid)") * openstack server rescue $uuid Actual Result ============= Nova's vmware driver raises an exception: Traceback (most recent call last): File "/nova-base-source/nova-base-archive-stable-queens-m3/nova/compute/manager.py", line 3621, in rescue_instance rescue_image_meta, admin_password) File "/nova-base-source/nova-base-archive-stable-queens-m3/nova/virt/vmwareapi/driver.py", line 601, in rescue self._vmops.rescue(context, instance, network_info, image_meta) File "/nova-base-source/nova-base-archive-stable-queens-m3/nova/virt/vmwareapi/vmops.py", line 1802, in rescue vi.cache_image_path, rescue_disk_path) File "/nova-base-source/nova-base-archive-stable-queens-m3/nova/virt/vmwareapi/ds_util.py", line 311, in disk_copy session._wait_for_task(copy_disk_task) File "/nova-base-source/nova-base-archive-stable-queens-m3/nova/virt/vmwareapi/driver.py", line 725, in _wait_for_task return self.wait_for_task(task_ref) File "/plugins/openstack-base-plugin-oslo-vmware-archive-stable-queens-m3/oslo_vmware/api.py", line 402, in wait_for_task return evt.wait() File "/var/lib/kolla/venv/local/lib/python2.7/site-packages/eventlet/event.py", line 121, in wait return hubs.get_hub().switch() File "/var/lib/kolla/venv/local/lib/python2.7/site-packages/eventlet/hubs/hub.py", line 294, in switch return self.greenlet.switch() File "/plugins/openstack-base-plugin-oslo-vmware-archive-stable-queens-m3/oslo_vmware/common/loopingcall.py", line 75, in _inner self.f(*self.args, **self.kw) File "/plugins/openstack-base-plugin-oslo-vmware-archive-stable-queens-m3/oslo_vmware/api.py", line 449, in _poll_task raise exceptions.translate_fault(task_info.error) FileNotFoundException: File [eph-bb145-3] 551e5570-cf70-4ca0-9f37-e50210c4d2f5/ was not found Expected Result =============== VM is put into rescue mode and boots the rescue image. Environment =========== This happend on queens, but the same code is still there in master: https://github.com/openstack/nova/blob/a7dd1f8881484ba0bf4270dd48109c2be142c333/nova/virt/vmwareapi/vmops.py#L1228-L1229 To manage notifications about this bug go to: https://bugs.launchpad.net/nova/+bug/1915815/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : yahoo-eng-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp