OpenStack Compute (Nova)
Go to file
Lee Yarwood 3f8daf0804 libvirt: Re-initialise volumes, encryptors, and vifs on hard reboot
We call _hard_reboot during reboot, power_on, and
resume_state_on_host_boot. It functions essentially by tearing as much
of an instance as possible before recreating it, which additionally
makes it useful to operators for attempting automated recovery of
instances in an inconsistent state.

The Libvirt driver would previously only call _destroy and
_undefine_domain when hard rebooting an instance. This would leave vifs
plugged, volumes connected, and encryptors attached on the host. It
also means that when we try to restart the instance, we assume all
these things are correctly configured. If they are not, the instance
may fail to start at all, or may be incorrectly configured when
starting.

For example, consider an instance with an encrypted volume after a
compute host reboot. When we attempt to start the instance, power_on
will call _hard_reboot. The volume will be coincidentally re-attached
as a side-effect of calling _get_guest_xml(!), but when we call
_create_domain_and_network we pass reboot=True, which tells it not to
reattach the encryptor, as it is assumed to be already attached. We
are therefore left presenting the encrypted volume data directly to
the instance without decryption.

The approach in this patch is to ensure we recreate the instance as
fully as possible during hard reboot. This means not passing
vifs_already_plugged and reboot to _create_domain_and_network, which
in turn requires that we fully destroy the instance first. This
addresses the specific problem given in the example, but also a whole
class of potential volume and vif related issues of inconsistent
state.

Because we now always tear down volumes, encryptors, and vifs, we are
relying on the tear down of these things to be idempotent.  This
highlighted that detach of the luks and cryptsetup encryptors were not
idempotent. We depend on the fixes for those os-brick drivers.

Depends-On: I31d72357c89db53a147c2d986a28c9c6870efad0
Depends-On: I9f52f89b8466d03699cfd5c0e32c672c934cd6fb

Closes-bug: #1724573
Change-Id: Id188d48609f3d22d14e16c7f6114291d547a8986
2017-11-18 00:22:02 +00:00
api-guide/source Update "SHUTOFF" description in API guide 2017-10-11 16:33:47 -04:00
api-ref/source Merge "api-ref: Fix an example in "Delete Assisted Volume Snapshot"" 2017-11-21 05:31:11 +00:00
contrib trivial: Remove "vif" script 2017-08-07 16:00:10 +01:00
devstack Blacklist test_extend_attached_volume from cells v1 job 2017-10-05 17:31:05 -04:00
doc Merge "VMware: serial console log (completed)" 2017-11-21 10:57:15 +00:00
etc/nova Move contrail vif plugging to privsep. 2017-11-02 12:09:27 +11:00
gate move gate hooks to gate/ 2017-01-04 11:05:16 +00:00
nova libvirt: Re-initialise volumes, encryptors, and vifs on hard reboot 2017-11-18 00:22:02 +00:00
placement-api-ref/source Update placement api-ref: allocations link in 1.11 2017-10-27 15:47:16 +00:00
releasenotes Merge "VMware: serial console log (completed)" 2017-11-21 10:57:15 +00:00
tools xenapi: cached images should be cleaned up by time 2017-10-23 16:29:16 +00: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 Fix test runner config issues with os-testr 1.0.0 2017-09-13 17:11:57 -04:00
.testr.conf [placement] Adjust the name of the gabbi tests 2016-09-20 19:14:44 +00:00
CONTRIBUTING.rst Workflow documentation is now in infra-manual 2014-12-05 03:30:37 +00:00
HACKING.rst doc: fix link to creating unit tests in contributor guide 2017-11-14 11:22:43 -05: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 List system dependencies for running common tests 2016-08-24 06:49:32 +02:00
requirements.txt Updated from global requirements 2017-11-16 11:16:21 +00:00
setup.cfg Move the idmapshift binary into privsep. 2017-10-24 18:50:23 +11:00
setup.py Updated from global requirements 2017-03-02 11:50:48 +00:00
test-requirements.txt Updated from global requirements 2017-11-16 11:16:21 +00:00
tests-functional-py3.txt Remove invalid URL in gabbi tests 2017-01-17 21:10:45 +00:00
tests-py3.txt Skip unit tests for SSL + py3 2017-03-02 14:30:16 +08:00
tox.ini Make setenv consistent for unit, func, and api-samples 2017-10-05 21:45:46 +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: