Remove deprecated config option names: Juno Edition

Just like the beginning of every other release, remove the deprecated
config option aliases that were marked as deprecated in Icehouse.

Equivalent Icehouse patch: I64548e40f6cea42275a6f0f3ebdc0c4cd9324804

DocImpact: Configurations that were deprecated in the Icehouse release are not
recognized in Juno.

Change-Id: I346ee0248c03e60716bd7dc4a5ee4493610867cb
Improve performance for checking hosts AZs

When updating aggregate metadata or when adding a host into aggregate,
a check is done to make sure that hosts can't be in multiple AZs.

In order to do the check, the routine was looping over each host to look
in the DB which AZs the host is part of.
As it's quite hungry in terms of DB accesses, here the proposal is to
extend the helper method for getting all AZs by also having their hosts,
and so only do memory iterations.

Partial-Bug: #1277230

Change-Id: I7c5bc980acb17f0a0e1f8c1403dac66c305866fb
Delete image when backup operation failed on snapshot step

when we snapshot an instance, we will use @delete_image_on_error to
delete any failed snapshot, however, the image will not be removed
by backup code flow, it will be an issue if too many backup failed
at last ,all useful image will be removed and we have only 'error'
image left in host

Change-Id: Ib527ade86aef52a8445b57fa03fed434578c4204
Closes-Bug: #1288574
Shrink devref.unit_tests, since info is in wiki.

Don't keep a copy of the run_tests.sh flag list here since it
inevitably will get out of sync with the real list.

No need to go into detail on how unit testing is set up, since we already have a wiki
on how to run tests that applies for all OpenStack projects. Keep
section with tox examples since that is the most commonly used command.

Change-Id: Ia8eb059be164d9df3edfd69aedcebfd028da45ff
Related-Bug: 1219040
minor corrections to devref rpc page

Correct wording to proper English and remove extra space between words while
in there.

DocImpact

Change-Id: If4b3d9d81d7193107e84867e4ab713c413a4976d
Properly skip coreutils readlink tests

Some tests in VirtDiskVFSLocalFSTestPaths class are skipped
if we're running on OSX by doing a check using is_osx() function
from tests.utils. However, these tests actually require readlink
from coreutils, so replace OS X check by more general check
for coreutils readlink presence.

This change allows to run a complete test suite on OSes rather than
Linux and OSX, such as FreeBSD.

These tests were the only consumer of tests.utils.is_osx, but
it's kept because it could be still potentially useful.

Change-Id: I7593560b84bda3719de811fbc214b1f52e1a121f
Correct exception handling when create aggregate

when create an aggregate, InvalidAggregateAction might be raised,
this patch translates the InvalidAggregateAction to HTTPBadRequest.
Also, 2 unnecessary logs was removed becuase log is not output in
most BadRequest.

Change-Id: I3dac808d8edab6118e347eb5d78b96f96b9d40ca
Correct exception info format of v3 flavor manage

The existing flavor manage may raise HTTPBadRequest exception,
But the msg info didn't use '_' prefix. This patch adds it.

Change-Id: I736bf4b0e78ecc0bb753d376ee162f19fafc09e1
Don't return from a finally block

The code in the finally block always executes, even if an exception is
raised. If a return is done, that will cause exceptions to be silently
ignored.

Some unit tests have been failing because of API changes to the
nova.compute.manager:ComputeManager._delete_instance method but the
use of finally/return ended up silently ignoring that error and
caused the test to appear as if it was passing. Another unit test
fails because of a missing uuid attribute.

It could also potentially cause other exceptions to be ignored at
runtime (such as SystemExit) which is likely not the intended
behavior.

Change-Id: I083ee7215296e35a0027be5b3ddf8b764f44cc5b
Closes-bug: 1324277
Adds IVS unit tests for new VIF firewall logic

Adds new unit tests for the IVS VIF driver to
cover the various possible plugging behaviors
added by the vif_details based logic introduced
in change I3bbcfc67036ab7389c82720add0bc0fc627bfee0.

Closes-Bug: #1301087
Change-Id: I7f0a1460b948a852c2d61d24217bbf27a4d85859
VMware: remove unused parameters in imagecache

Trivial patch to remove some unused parameters in
timestamp_cleanup().

Change-Id: Id3c6e8c6c504591fdf09e8871cf3358d265a678c
Check if volume is bootable when creating an instance

Cinder provides a bootable flags for volumes that's not being
checked when creating an instance.

If a user select a non-bootable volume, then the VM became unusable
since nothing will be booted at all.

This check is done only in case that a volume is selected as root
device for a VM.  Boot from snapshot will still work (even that the
volume will be marked as non-bootable by cinder, but will boot the
attached snapshot instead)
If the attribute bootable is not present, we keep the old behaviour
and allow the instance creation.

Change-Id: I8e028d40d6a11beeac4f043afccb17eb61f6ce62
Closes-Bug: #1321334
Allow user to specify image to use during rescue - V3 API changes

This commit includes the V3 changes.
Making changes in V3 API to take an extra parameter rescue_image_ref
as part of the rescue action API.
If specified, this image_ref will be used to rescue the instance.
If the image is not specified, then the base image ref is used by
default.

Partially Implements: blueprint allow-image-to-be-specified-during-rescue

DocImpact

Change-Id: I7a9d88bf4dfe73879247f5b82a52928fdde76510
VMware: spawn refactor - DatastorePath class

Part of spawn refactor work to consolidate a lot of the datastore path
manipulation code. The DatastorePath class is a simpler version of a
class of the same name in earlier versions of
https://review.openstack.org/#/c/87002, and is intentionally limited in
the ways that DatastorePath objects can be constructed. No attempts are
made to ensure that the datastore, directories and files referenced in
these objects are valid on the remote system.

partial blueprint vmware-spawn-refactor

Change-Id: Id65d0308d32835048229e7a3d98b84af2b13583c
VMware: remove dsutil.split_datastore_path

The functionality of split_datatore_path has been subsumed by
the DatastorePath utility class, so remove it and convert
all callers to use the latter.

Change-Id: I07a2cfe15fccaca4aee25bc43157e6c604b91831
VMware: spawn refactor - Datastore class

Introduces the start of a simple Datastore class to encapsulate relevant
data of a datastore.

partial blueprint vmware-spawn-refactor

Change-Id: Ic0ee6cdd47e7cbd66cf456776c61d0b85fb51a0a
Add tests to avoid inconsistent extension names

On v2.1/v3 API, extension names should be camelcases.
I0dc6c23ffcdcf97fc52d3575d521692805ffd9e3 has fixed inconsistent
names already.
This patch adds tests for blocking these inconsistent name/alias
additions in the future.

Change-Id: I3c9ee3f59fd17394b251fedf8df592e5d6304962
Related-Bug: #1315597
Update HACKING.rst to include N320

Commit 9235ada8c2c250603dc5b299cc08bb7a982d4fc6 did not add in
the updated hacking rule.

Change-Id: If2daf6d2e7008c36d0aba6270ac034522dcb2e2b
Closes-bug: #1325812
Add missing translation support

Update a number of files to add missing translation support.

The patch adds a new hacking check - N321. This ensures that
all log messages, except debug ones, have translations.

A '# noqa' indicates that the validation will not be done on
the specific log message. This should be used in cases where
the translations do not need to be done, for example, the log
message is logging raw data.

Closes-bug: #1290261
Change-Id: Ib2ca0bfaaf432e15448c96619682c2cfd073fbbc
Use no_timer_check with soft-qemu

The Linux kernel timer check not working properly
when the hypervisor's thread preempted by the host CPU scheduler.

The timer check is automatically disabled with other types
of hypervisors including the hardware accelerated kvm,
but timer_check is not disabled when qemu used without hardware acceleration.

This issue is frequently mischaracterized as an SSH connectivity issue and
causes rechecks and occasional boot failures.

This change adds no_timer_check kernel parameter when we are using
uec images with qemu.

Closes-Bug: #1312199
Change-Id: I3cfdfe9048fe219fc12cdac8a399b496f237e55e