[Bug 1567807] Re: nova delete doesn't work with EFI booted VMs
Ryan Beisner
1567807 at bugs.launchpad.net
Fri Jan 27 00:00:21 UTC 2017
FWIW, confirmed issue on Xenial-Mitaka aarch64:
$ openstack server list
+--------------------------------------+-----------------------------+---------+------------------------------------+------------+
| ID | Name | Status | Networks | Image Name |
+--------------------------------------+-----------------------------+---------+------------------------------------+------------+
| 58d20cf7-a5c4-4845-8f26-47222513dfba | xenial-uefi-20170119b221218 | ACTIVE | private=172.16.0.15, 10.111.222.70 | |
| 3fd7e3ae-c710-44d2-9a81-3077ed89b196 | xenial-uefi-20170119b221212 | ACTIVE | private=172.16.0.14, 10.111.222.67 | |
| d1a8d761-44e4-464f-8056-bf58bc8b2407 | xenial-uefi-20170119b221205 | ACTIVE | private=172.16.0.13, 10.111.222.66 | |
| df488910-3151-43c1-9de9-794d5095b66d | xenial-uefi-20170119212539 | SHUTOFF | private=172.16.0.12, 10.111.222.65 | |
| d7a46c4b-2b63-4a8d-9ab7-dfcbf9e7032f | xenial-uefi-20170119212534 | SHUTOFF | private=172.16.0.11, 10.111.222.69 | |
| 5d1275ef-9346-4598-8654-10a4b0b8da47 | xenial-uefi-20170119212528 | SHUTOFF | private=172.16.0.10, 10.111.222.68 | |
+--------------------------------------+-----------------------------+---------+------------------------------------+------------+
.
$ for i in $(openstack server list | grep uefi | awk '{ print $2 }'); do echo $i; openstack server delete $i; done
58d20cf7-a5c4-4845-8f26-47222513dfba
3fd7e3ae-c710-44d2-9a81-3077ed89b196
d1a8d761-44e4-464f-8056-bf58bc8b2407
df488910-3151-43c1-9de9-794d5095b66d
d7a46c4b-2b63-4a8d-9ab7-dfcbf9e7032f
5d1275ef-9346-4598-8654-10a4b0b8da47
.
$ openstack server list
+--------------------------------------+-----------------------------+--------+----------+------------+
| ID | Name | Status | Networks | Image Name |
+--------------------------------------+-----------------------------+--------+----------+------------+
| 58d20cf7-a5c4-4845-8f26-47222513dfba | xenial-uefi-20170119b221218 | ERROR | | |
| 3fd7e3ae-c710-44d2-9a81-3077ed89b196 | xenial-uefi-20170119b221212 | ERROR | | |
| d1a8d761-44e4-464f-8056-bf58bc8b2407 | xenial-uefi-20170119b221205 | ERROR | | |
| df488910-3151-43c1-9de9-794d5095b66d | xenial-uefi-20170119212539 | ERROR | | |
+--------------------------------------+-----------------------------+--------+----------+------------+
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 2510, in do_terminate_instance
self._delete_instance(context, instance, bdms, quotas)
File "/usr/lib/python2.7/dist-packages/nova/hooks.py", line 154, in inner
rv = f(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 2473, in _delete_instance
quotas.rollback()
File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 220, in __exit__
self.force_reraise()
File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise
six.reraise(self.type_, self.value, self.tb)
File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 2437, in _delete_instance
self._shutdown_instance(context, instance, bdms)
File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 2346, in _shutdown_instance
requested_networks)
File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 220, in __exit__
self.force_reraise()
File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise
six.reraise(self.type_, self.value, self.tb)
File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 2333, in _shutdown_instance
block_device_info)
File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py", line 1039, in destroy
destroy_disks, migrate_data)
File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py", line 1152, in cleanup
self._undefine_domain(instance)
File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py", line 1051, in _undefine_domain
{'errcode': errcode, 'e': e}, instance=instance)
File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 220, in __exit__
self.force_reraise()
File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise
six.reraise(self.type_, self.value, self.tb)
File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py", line 1045, in _undefine_domain
guest.delete_configuration()
File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/guest.py", line 224, in delete_configuration
self._domain.undefine()
File "/usr/lib/python2.7/dist-packages/eventlet/tpool.py", line 186, in doit
result = proxy_call(self._autowrap, f, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/eventlet/tpool.py", line 144, in proxy_call
rv = execute(f, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/eventlet/tpool.py", line 125, in execute
six.reraise(c, e, tb)
File "/usr/lib/python2.7/dist-packages/eventlet/tpool.py", line 83, in tworker
rv = meth(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/libvirt.py", line 2701, in undefine
if ret == -1: raise libvirtError ('virDomainUndefine() failed', dom=self)
libvirtError: Requested operation is not valid: cannot delete inactive domain with nvram
--
You received this bug notification because you are a member of Ubuntu
OpenStack, which is subscribed to nova in Ubuntu.
https://bugs.launchpad.net/bugs/1567807
Title:
nova delete doesn't work with EFI booted VMs
Status in OpenStack Compute (nova):
In Progress
Status in nova package in Ubuntu:
Triaged
Bug description:
I've been setting up a Mitaka Openstack using the cloud archive
running on Trusty, and am having problems working with EFI enabled
instances on ARM64.
I've done some work with wgrant and gotten things to a stage where I
can boot instances, using the aavmf images.
However, when I tried to delete a VM booted like this, I get an error:
libvirtError: Requested operation is not valid: cannot delete
inactive domain with nvram
I've included the full traceback at
https://paste.ubuntu.com/15682718/.
Thanks to a suggestion from wgrant again, I got it working by editing nova/virt/libvirt/guest.py in delete_configuration() and replacing self._domain.undefineFlags(libvirt.VIR_DOMAIN_UNDEFINE_MANAGED_SAVE) with self._domain.undefineFlags(libvirt.VIR_DOMAIN_UNDEFINE_MANAGED_SAVE | libvirt.VIR_DOMAIN_UNDEFINE_NVRAM).
I've attached a rough patch.
Once that's applied and nova-compute restarted, I was able to delete
the instance fine.
Could someone please investigate this and see if its the correct fix,
and look at getting it fixed in the archive?
This was done on a updated trusty deployment using the cloud-archives
for mitaka.
$ dpkg-query -W python-nova
python-nova 2:13.0.0~b2-0ubuntu1~cloud0
Please let me know if you need any further information.
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1567807/+subscriptions
More information about the Ubuntu-openstack-bugs
mailing list