Hide Forgot
Cloned from launchpad blueprint https://blueprints.launchpad.net/nova/+spec/user-defined-shutdown. Description: Currently in libvirt stop, rescue, and delete operations simply destroy the underlying VM. Some GuestOS's do not react well to this type of power failure, and so it would be better if these operations followed the same approach as soft_reboot and give the guest as chance to shutdown gracefully. Even where VM is being deleted, it may be booted from a volume which will be reused on another server. This change exposed a clean / forced option to the users for those operations, mirroring soft and hard reboot Specification URL (additional information): None
We would need to backport at least 4 commits from Juno commit b252d603f473430211e1d39cda6ffeb833282e31 Author: Phil Day <philip.day> Date: Fri Aug 8 17:34:07 2014 +0000 Shelve should give guests a chance to shutdown nova/compute/manager.py | 5 +++-- nova/tests/compute/test_shelve.py | 14 +++++++++++--- 2 files changed, 14 insertions(+), 5 deletions(-) commit 09b0ec5cf38ef92fc018f5776420e72879d6aa37 Author: Phil Day <philip.day> Date: Tue Aug 5 16:26:38 2014 +0000 Rescue should give guests a chance to shutdown nova/compute/manager.py | 4 +++- nova/tests/compute/test_compute_mgr.py | 18 ++++++++++++++---- 2 files changed, 17 insertions(+), 5 deletions(-) commit 41f6e4afc91a2454940abff947bf07973f229ea8 Author: Phil Day <philip.day> Date: Fri Jul 25 19:13:51 2014 +0000 Resize should give guests a chance to shutdown nova/compute/manager.py | 8 ++++++-- nova/tests/compute/test_compute.py | 19 +++++++++++++++---- nova/virt/driver.py | 6 +++++- nova/virt/fake.py | 3 ++- nova/virt/hyperv/driver.py | 4 +++- nova/virt/libvirt/driver.py | 7 ++++--- nova/virt/vmwareapi/driver.py | 4 +++- nova/virt/xenapi/driver.py | 4 +++- 8 files changed, 41 insertions(+), 14 deletions(-) commit c07ed15415c0ec3c5862f437f440632eff1e94df Author: Phil Day <philip.day> Date: Fri Jan 24 15:43:20 2014 +0000 Power off commands should give guests a chance to shutdown nova/compute/manager.py | 32 ++++++++++++++++++++++++++++++-- nova/compute/utils.py | 19 +++++++++++++++++++ nova/tests/api/ec2/test_cloud.py | 3 ++- nova/tests/compute/test_compute.py | 3 ++- nova/tests/compute/test_compute_utils.py | 22 ++++++++++++++++++++++ nova/tests/virt/libvirt/test_driver.py | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ nova/tests/virt/test_ironic_api_contracts.py | 2 +- nova/virt/baremetal/driver.py | 3 ++- nova/virt/driver.py | 5 ++++- nova/virt/fake.py | 2 +- nova/virt/hyperv/driver.py | 3 ++- nova/virt/libvirt/driver.py | 79 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- nova/virt/vmwareapi/driver.py | 3 ++- nova/virt/xenapi/driver.py | 3 ++- 14 files changed, 243 insertions(+), 12 deletions(-) None of the changes look particularly troublesome - fairly well self-contained code changes. There's no API impact on this - it was done with image properties instead.
There is one further patch that missed Juno and is still pending review upstream https://review.openstack.org/#/c/130548/
Hi Dan, so it looks like shelve, shelve offload, rescue, resize, and power off all have a clean or forced option? I can't see new client parameters, how does the user specify this option? thanks, Summer
In this version of patches the tenant user is not given any direct control over the feature. Nova will automatically try a controlled shutdown and fallback to forced shutdown. The ability for end user to control this would require API changes and these will not be included until the Kilo releae.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHEA-2015-0152.html