a323ed29ee7fe5ebf040ad41cd770753a72d6397
When an attempt to delete an instance doesn't succeed and nova retries
on the next nova-compute restart, an instance not existing in the back
end anymore can lead to an uncatched exception in the vmware driver
prohibiting instance deletion. This is the case, if the instance had
volumes attached, because `_detach_instance_volumes()` always powers off
the instance - which cannot work if the instance doesn't exist anymore.
While the code already catched `ManagedObjectNotFoundException`, it also
needs to catch `InstanceNotFound` raised by `vm_util.get_vm_ref()` to
complete the deletion as seen in the traceback below (which comes from a
queens codebase):
Traceback (most recent call last):
File "/nova/compute/manager.py", line 874, in _init_instance
self._delete_instance(context, instance, bdms)
File "/nova/hooks.py", line 154, in inner
rv = f(*args, **kwargs)
File "/nova/compute/manager.py", line 2500, in _delete_instance
self._shutdown_instance(context, instance, bdms)
File "/nova/compute/manager.py", line 2392, in _shutdown_instance
requested_networks)
File "/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
self.force_reraise()
File "/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
six.reraise(self.type_, self.value, self.tb)
File "/nova/compute/manager.py", line 2379, in _shutdown_instance
block_device_info)
File "/nova/virt/vmwareapi/driver.py", line 574, in destroy
self._detach_instance_volumes(instance, block_device_info)
File "/nova/virt/vmwareapi/driver.py", line 536, in _detach_instance_volumes
self._vmops.power_off(instance)
File "/nova/virt/vmwareapi/vmops.py", line 1762, in power_off
vm_util.power_off_instance(self._session, instance)
File "/nova/virt/vmwareapi/vm_util.py", line 1732, in power_off_instance
vm_ref = get_vm_ref(session, instance)
File "/nova/virt/vmwareapi/vm_util.py", line 171, in wrapper
return _vm_ref_cache(id, func, session, instance)
File "/nova/virt/vmwareapi/vm_util.py", line 162, in _vm_ref_cache
vm_ref = func(session, data)
File "/nova/virt/vmwareapi/vm_util.py", line 1214, in get_vm_ref
raise exception.InstanceNotFound(instance_id=uuid)
InstanceNotFound: Instance 2af34cc5-22e0-400c-8b80-f130e86027fd could not be found.
Change-Id: I65d2f76068e4b033ffd20959c9e74c870c8aa8e0
…
…
==============
OpenStack Nova
==============
.. image:: https://governance.openstack.org/tc/badges/nova.svg
:target: https://governance.openstack.org/tc/reference/tags/index.html
.. Change things from this point on
OpenStack Nova provides a cloud computing fabric controller, supporting a wide
variety of compute technologies, including: libvirt (KVM, Xen, LXC and more),
Hyper-V, VMware, XenServer, OpenStack Ironic and PowerVM.
Use the following resources to learn more.
API
---
To learn how to use Nova's API, consult the documentation available online at:
- `Compute API Guide <https://docs.openstack.org/api-guide/compute/>`__
- `Compute API Reference <https://docs.openstack.org/api-ref/compute/>`__
For more information on OpenStack APIs, SDKs and CLIs in general, refer to:
- `OpenStack for App Developers <https://www.openstack.org/appdev/>`__
- `Development resources for OpenStack clouds
<https://developer.openstack.org/>`__
Operators
---------
To learn how to deploy and configure OpenStack Nova, consult the documentation
available online at:
- `OpenStack Nova <https://docs.openstack.org/nova/>`__
In the unfortunate event that bugs are discovered, they should be reported to
the appropriate bug tracker. If you obtained the software from a 3rd party
operating system vendor, it is often wise to use their own bug tracker for
reporting problems. In all other cases use the master OpenStack bug tracker,
available at:
- `Bug Tracker <https://bugs.launchpad.net/nova>`__
Developers
----------
For information on how to contribute to Nova, please see the contents of the
CONTRIBUTING.rst.
Any new code must follow the development guidelines detailed in the HACKING.rst
file, and pass all unit tests.
Further developer focused documentation is available at:
- `Official Nova Documentation <https://docs.openstack.org/nova/>`__
- `Official Client Documentation
<https://docs.openstack.org/python-novaclient/>`__
Other Information
-----------------
During each `Summit`_ and `Project Team Gathering`_, we agree on what the whole
community wants to focus on for the upcoming release. The plans for nova can
be found at:
- `Nova Specs <http://specs.openstack.org/openstack/nova-specs/>`__
.. _Summit: https://www.openstack.org/summit/
.. _Project Team Gathering: https://www.openstack.org/ptg/
Description
Languages
Python
97.5%
Smarty
2.3%
Shell
0.2%