Reviewed: https://review.openstack.org/498983 Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=5b008c6540f948d28dc50a0ef84095ebd96d198d Submitter: Zuul Branch: master
commit 5b008c6540f948d28dc50a0ef84095ebd96d198d Author: melanie witt <melwi...@gmail.com> Date: Tue Aug 29 22:53:44 2017 +0000 Save updated libvirt domain XML after swapping volume When a user calls the volume-update API, we swap_volume in the libvirt driver from the old volume attachment to the new volume attachment. Currently, we're saving the domain XML with the old configuration prior to updating the volume and upon a soft-reboot request, it results in an error: Instance soft reboot failed: Cannot access storage file <old path> and falls back to a hard reboot, which is like pulling the power cord, possibly resulting in file system inconsistencies. This changes to saving the new, updated domain XML after the volume swap. Closes-Bug: #1713857 Change-Id: I166cde5ad8b00699e4ec02609f0d7b69236d855d ** 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/1713857 Title: Soft-reboot fails after volume-update Status in OpenStack Compute (nova): Fix Released Status in OpenStack Compute (nova) ocata series: New Status in OpenStack Compute (nova) pike series: New Bug description: During a volume-update, we don't save the instance XML with the new volume attachment, so soft-reboot fails with: DEBUG nova.virt.libvirt.driver [req-149741f9-ad36-4787-ac6c-1ed7a273ab6a 75fbc7a6db34480091d2a53e2e20b695 62e53e5e804e49a9890928a5a4846f60 - - -] [instance: 5f06f6f8-f8b8-4b46-afa4-cefff24d7167] Instance soft reboot failed: Cannot access storage file '/dev/disk/by-path/ip-192.168.11.121:3260-iscsi-iqn.2010-10.org.openstack:volume-d558d988-b17c-4940-8c05-9222ad750955-lun-0' (as uid:107, gid:107): No such file or directory reboot /usr/lib/python2.7/site-packages/nova/virt/libvirt/driver.py:2395 WARNING nova.virt.libvirt.driver [req-149741f9-ad36-4787-ac6c-1ed7a273ab6a 75fbc7a6db34480091d2a53e2e20b695 62e53e5e804e49a9890928a5a4846f60 - - -] [instance: 5f06f6f8-f8b8-4b46-afa4-cefff24d7167] Failed to soft reboot instance. Trying hard reboot. as it can't access the old volume attachment defined in the XML. It falls back on a hard reboot which is like pulling the power cord and can result in file system inconsistencies. We should save the updated XML to the persistent configuration after updating the volume. Steps to reproduce: 1. Boot an instance (nova boot --image <image> --flavor <flavor> test0) 2. Create two volumes (cinder create --name A 1, cinder create --name B 1) 3. Attach the first volume to the instance (nova volume-attach test0 <uuid of volume A>) 4. Swap to the second volume (nova volume-update test0 <uuid of volume A> <uuid of volume B>) 5. Try to reboot the instance (nova reboot test0) Actual result: Instance fails to soft-reboot and hard reboots instead. Expected result: Instance soft-reboots successfully. To manage notifications about this bug go to: https://bugs.launchpad.net/nova/+bug/1713857/+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