Revert "Whitelist external netaddr requirement"

This reverts commit de59c55e77ead72df42c0445c09cf4d63131f6bd.

The netaddr developers have agreed to go back to uploading releases
to PyPI, so this workaround is no longer necessary. For details see
https://github.com/drkjam/netaddr/issues/57#issuecomment-31796111 .

Change-Id: Ieeb3e8e549d9e4b53dba0165277fa2423d2eba01
Enable compute_node_update to tolerate deadlocks

When running the CI there were cases when the aformentioned method would
throw a DBDeadlock exception.

Change-Id: I98d1a804c51e1bf3bb96193d82ffe7e5d064e134
Closes-bug: #1253455
Ignore duplicate delete requests

Stop delete requests from queueing up in the compute manager if the
task_state is already set to DELETING. This prevents exhausting thread
pools when the service is stuck on a lock/external request.

Dealing with delete requests that never got executed is not in scope of
this change and will be submitted separately.

Change-Id: I2f97f93bd714e0ea3b6d4fa3ac457ab43eed00e1
Partial-Bug: #1248563
Cleanup 'deleting' instances on restart

In case some instance was marked as deleting but for some reason didn't
finish (for example request was stuck in libvirt), retry the delete at
startup. This happens at startup and on the host owning the instance,
so there's no reason to use the lock.

Change-Id: Iad18e9a7c6cb8e272e67a82284127ad895441dcf
Partial-Bug: #1248563
Closes-Bug: 1247174
Implements: blueprint recover-stuck-state
Add API schema for v3 multinic API

By defining the API schema, it is possible to separate the validation
code from the API method. The API method can be more simple.
In addition, a response of API validation error can be consistency for
the whole Nova API.

Partially implements blueprint nova-api-validation-fw

Change-Id: I62a55c498a1164ff56f82495f720cba67da8483b
Add preserve_ephemeral option to rebuild

The preserve_ephemeral option for rebuild will preserve the content of
the ephemeral partition, making stateful golden image based
deployments possible even when clouds haven't deployed Cinder, or the
hypervisor doesn't support Cinder (e.g. BareMetal / Ironic).

Partial-Bug: #1174154
blueprint: baremetal-preserve-ephemeral
Co-Authored-By: Robert Collins <rbtcollins@hp.com>

Change-Id: Id33d5d4107f89814842a3f0b7f33690dd7e3aadc
Show bm deploy how to preserve ephemeral content.

This changes the baremetal deploy helper to be able to preserve the
ephemeral partition, if the deploy requests that. The next patch in
the series makes it possible to store that intent in the deploy and
connects it to the deploy() method.

Partial-Bug: #1174154
blueprint: baremetal-preserve-ephemeral
Change-Id: I6bf01e52589c5894eb043f2b57e915d52e81ebc3
Support preserve_ephemeral in baremetal.

We need to be able to capture the semantic intent of a rebuild with
ephemeral preservation for the baremetal helper, which means another
column in bm.modes.

Partial-Bug: #1174154
blueprint: baremetal-preserve-ephemeral
Co-Authored-By: Roman Podoliaka <rpodolyaka@mirantis.com>
Change-Id: Icf627f38dac02b7d06ff0f1816741e5513a4fcf3
Add API schema for v3 evacuate API

By defining the API schema, it is possible to separate the validation
code from the API method. The API method can be more simple.
In addition, a response of API validation error can be consistent for
the whole Nova API.

Partially implements blueprint nova-api-validation-fw

Change-Id: I7587fd8c27b820b2a9b751f9c9ae30da0aa41ec7
remove redundant __init__() overwriting when getting ExtensionResources

As described in #1266344, some of child class in
<nova>/nova/api/openstack/compute/contrib/ has overwrited __init__()
without specified needs. Removing that could help keeps codes clean and
consistent (nearly all others don't overwrite __init__()).

Change-Id: I87dfd9c1622bc8250f620ef591391a0e98573f78
Closes-Bug: #1266344
disable debug in eventlet.wsgi server

the debug flag basically just means that we get lines like:

 ....wsgi.server [-] (6966) accepted ('127.0.0.1', 51944)

After *every single* wsgi request, filling up the logs with
completely irrelevant data at info level because eventlet.wsgi
does not use python logging.

Change-Id: I508b963a0c84e17df845aad260dd8ee157abbea8
Add explicit discussion of dependencies to README.rst

Noted that building the documentation has more dependencies
than merely running Nova.
Noted that the standard development environment is sufficient.
Noted that the standard runtime environment plus oslo.sphinx
is sufficient.

Change-Id: I37b84a1bdfbc906b005c0a53c2c570c0695937b3
Closes-Bug: #1266623
Small edits on help strings

These were initially noted during import into the manuals at
https://review.openstack.org/67502

Fixes include rework of text, missing or extra spaces, wrong
capitalization and no sentence style capitalization.

A hacking check has been added that tests that all config options
start with a capital letter.

Change-Id: I0a1c333bbb3a812932d3972a7403f94da0bff341
Co-Authored-By: Daniel Berrange <berrange@redhat.com>
Co-Authored-By: Diane Fleming <diane.fleming@rackspace.com>
Additional check for qemu-nbd hang

/sys/block/*device*/pid check is not enough. I see that the unix
socket used by the device my be stuck as well, so let's add another
check for the path to the unix socket for the device as well to
figure out if the device is free. Complain loud and clear that the
qemu-nbd is leaking resources.

Change-Id: I28cedffba7a9915ef6f7888989e40e4d0de475c6
Closes-Bug: #973413
Partial-Bug: #1254890
libvirt: Fix root disk leak in live mig

This patch makes sure that i_create_images_and_backing method of the
libvirt driver (called in several places, but most problematic one is
the call in the pre_live_migration method) creates all the files the
instance needs that are not present.

Prioir to this patch - the method would only attempt to download the
image, and if it did so with the path of the ephemeral drives, it could
expose the image to other users as an ephemeral devices. See the related
bug for more detaiis.

After this patch - we properly distinguish between image, ephemeral and
swap files, and make sure that the imagebackend does the correct thing.

Closes-bug: #1251590

Co-authored-by: Loganathan Parthipan <parthipan@hp.com>

Change-Id: I78aa2f4243899db4f4941e77014a7e18e27fc63e
Allow delete when InstanceInfoCache entry is missing

The existing code wouldn't allow you to delete 'broken' instances that were
(for whatever reason) missing their InstanceInfoCache entry. This patch fixes
it such that those instances can be deleted.

Adds a test case to cover the new exception handling.

Closes-Bug: #1266919

Co-Authored-By: Matt Riedemann <mriedem@us.ibm.com>
Change-Id: I3d566a25e340b5d5de86740141e1eaa5b3742915
Remove unused method from network rpcapi

Remove get_vifs_by_instance from the nova network rpcapi.  It's unused,
so we can go ahead and remove the client side of this.  The server
(manager) side can be removed on a major rpc api version bump.

Change-Id: Iab90e87e7a82abcf290c2fc799001cc4ee8299b2
Remove get_vif_by_mac_address from network rpcapi

This method is no longer used.  It was added to network.api and runs on
the API side now instead.  We can remove it from the rpc client code.
We can later remove it from the manager side when we do a major version
bump of this rpc API.

Change-Id: I8933bcc022558a9befed7478047422959fa47f1c
Updated from global requirements

Change-Id: I27ec5dc38549666a4ee63f0d29f4ef35f81f465d
Imported Translations from Transifex

Change-Id: I424099233bb3e5dea63c3c9a81e1282c8327e7d8