OpenStack Compute (Nova)
Go to file
ankitagrawal b3f39244a3 Clean up ports and volumes when deleting ERROR instance
Usually, when instance.host = None, it means the instance was never
scheduled. However, the exception handling routine in compute manager
[1] will set instance.host = None and set instance.vm_state = ERROR
if the instance fails to build on the compute host. If that happens, we
end up with an instance with host = None and vm_state = ERROR which may
have ports and volumes still allocated.

This adds some logic around deleting the instance when it may have
ports or volumes allocated.

  1. If the instance is not in ERROR or SHELVED_OFFLOADED state, we
     expect instance.host to be set to a compute host. So, if we find
     instance.host = None in states other than ERROR or
     SHELVED_OFFLOADED, we consider the instance to have failed
     scheduling and not require ports or volumes to be freed, and we
     simply destroy the instance database record and return. This is
     the "delete while booting" scenario.

  2. If the instance is in ERROR because of a failed build or is
     SHELVED_OFFLOADED, we expect instance.host to be None even though
     there could be ports or volumes allocated. In this case, run the
     _local_delete routine to clean up ports and volumes and delete the
     instance database record.

Co-Authored-By: Ankit Agrawal <ankit11.agrawal@nttdata.com>
Co-Authored-By: Samuel Matzek <smatzek@us.ibm.com>
Co-Authored-By: melanie witt <melwittt@gmail.com>

Closes-Bug: 1404867
Closes-Bug: 1408527

[1] https://github.com/openstack/nova/blob/55ea961/nova/compute/manager.py#L1927-L1929

Change-Id: I4dc6c8bd3bb6c135f8a698af41f5d0e026c39117
2018-02-20 10:32:07 -05:00
api-guide/source Merge "Update links in documents" 2018-02-08 01:29:29 +00:00
api-ref/source Merge "Add server filters whitelist in server api-ref" 2018-02-02 02:02:52 +00:00
contrib trivial: Remove "vif" script 2017-08-07 16:00:10 +01:00
devstack Remove unused tempest-dsvm-lxc-rc 2018-01-30 11:18:19 -05:00
doc Merge "libvirt: add Linux distribution guest only description for inject_xxx options" 2018-02-20 00:42:02 +00:00
etc/nova Move remaining uses of parted to privsep. 2018-01-24 22:26:36 +00:00
gate move gate hooks to gate/ 2017-01-04 11:05:16 +00:00
nova Clean up ports and volumes when deleting ERROR instance 2018-02-20 10:32:07 -05:00
placement-api-ref/source api-ref: Further clarify placement aggregates 2018-02-16 08:52:30 -06:00
playbooks/legacy Test websocketproxy with TLS in the nova-next job 2018-02-14 14:17:02 +00:00
releasenotes Imported Translations from Zanata 2018-02-18 06:12:37 +00:00
tools Finish stestr migration 2017-11-24 16:51:12 -05:00
.coveragerc Remove nova/openstack/* from .coveragerc 2016-10-12 16:20:49 -04:00
.gitignore Fix test runner config issues with os-testr 1.0.0 2017-09-13 17:11:57 -04:00
.gitreview Add .gitreview config file for gerrit. 2011-10-24 15:07:19 -04:00
.mailmap Add mailmap entry 2014-05-07 12:14:26 -07:00
.stestr.conf Finish stestr migration 2017-11-24 16:51:12 -05:00
.zuul.yaml Test websocketproxy with TLS in the nova-next job 2018-02-14 14:17:02 +00:00
CONTRIBUTING.rst Update links in documents 2018-01-12 17:05:11 +08:00
HACKING.rst fix link 2018-02-07 19:20:53 +08:00
LICENSE initial commit 2010-05-27 23:05:26 -07:00
MAINTAINERS Fix broken URLs 2017-09-07 15:42:31 +02:00
README.rst doc: Rework README to reflect new doc URLs 2017-08-03 16:06:08 -04:00
babel.cfg Get rid of distutils.extra. 2012-02-08 19:30:39 -08:00
bindep.txt Merge "Bindep does not catch missing libpcre3-dev on Ubuntu" 2018-02-14 07:31:09 +00:00
requirements.txt Updated from global requirements 2018-02-17 09:52:04 +00:00
setup.cfg Deprecate the IronicHostManager 2017-11-28 15:23:48 -05:00
setup.py Updated from global requirements 2017-03-02 11:50:48 +00:00
test-requirements.txt Updated from global requirements 2018-01-29 00:21:52 +00:00
tests-py3.txt Skip unit tests for SSL + py3 2017-03-02 14:30:16 +08:00
tox.ini Merge "Remove single quotes from posargs on stestr run commands" 2018-02-17 15:49:01 +00:00

README.rst

Team and repository tags

image

OpenStack Nova

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:

For more information on OpenStack APIs, SDKs and CLIs in general, refer to:

Operators

To learn how to deploy and configure OpenStack Nova, consult the documentation available online at:

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:

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:

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: