Only load necessary instance info for use in sync power state

During sync power state, instance is refreshed from the db. If the
instance gets deleted, this can result in InstanceInfoCacheNotFound
being thrown due to info_cache being loaded and therefore refreshed.

Sync power state does not make use of any extra instance attrs, so
this problem can be avoided by not loading any extra attrs in the
first place.

Two callers of _sync_instance_power_state() are updated to not load
extra attrs. 1) The periodic sync and 2) the lifecycle event handler.

Change-Id: I150bd95da65263981608dd9a033232bd142e737f
Closes-Bug: #1367845
Don't modify columns_to_join formal parameter in _manual_join_columns

The _manual_join_columns method was modifying the columns_to_join list
passed to it which, if not copied by the original caller, can introduce
bugs in the calling code if the original columns_to_join list is re-used
later, e.g. making nova objects with an expected_attrs list that has
been mutated by the DB API call.

This change makes a copy of the original list and passes back the new
list for the DB API methods to use, and adds some documentation to
hopefully clarify intent and usage.

A test is added to demonstrate the expected behavior of the utility
method.

Closes-Bug: #1393491

Change-Id: I49511f608291b66642ced00a3c13833e18fab3d7
Compute: Catch binding failed exception while init host

While compute starts it will init all instances,
if an exception is raised from one instance
(e.g NovaException during plug_vifs), then the
compute process exits unexpectedly because of
this unhandled exception.
This commit changes the NovaException to more
appropriate VirtualInterfacePlugException and
catches it during init host, as well as the
instance is set to error state, with this change
the compute process can be started normally even
if this VirtualInterfacePlugException is raised.

Closes-bug: #1324041

Change-Id: Ia584dba66affb86787e3069df19bd17b89cb5c49
Share server access ips tests between V2 & V2.1

As server access ips should behave same in V2 and V2.1,
access ips tests can be shared among V2 & V2.1 to cleanup
duplicated test code.

This patch share those tests between V2 & V2.1

Partially implements blueprint v2-on-v3-api

Change-Id: Ife0b3f35ec6bd0d3c0052d2a8c0f314638a07ca3
Check for floating IP pool in nova-network

There are no checks in nova-network to see if a specified
floating IP pool exists or not before attempting to allocate
an IP address. If a pool does not exist, nova throws an
unrelated error - 'No more floating ips available'. The
following patch adds a check for the existence of the IP pool
and throws a FloatingIpPoolNotFound if it is not found.

Change-Id: I72cb8dd044f7ac094287bad7df9167b8e77a4b5b
Related-Bug: #1355623
Modify v21 alias name for compatible with v2

This patch changes some of the alias names to be compatible with v2.
so the extension info output will be as same with v2.
 consoles -> os-consoles
 flavor-extra-specs -> os-flavor-extra-specs
 flavor-manage -> os-flavor-manage

Partially implements blueprint v2-on-v3-api

Change-Id: Ia8c6a0144e43134667636db9ba862b26f265a433
VMware: remove flag in tests indicating VC is supported

The ESX driver is no longer supported so this code is no longer
needed.

Change-Id: I03d2ea7935040b656c4a32de219d018f0ab89161
simplify database fixture to the features we use

The Database fixture has existed for a long time, and has a large
amount of vestigial code that is no longer usable as it's masked by
other test setup. For instance, the conf fixture always sets the db
connection string to in memory db.

Simplify what the Database fixture is doing to just the inmemory
schema caching and reconstruction. Also provide a test case
demonstrating that this both sets up the db correctly, as well as
resets it after we've made changes.

Change-Id: Idc9b587c705c1c1ab4e1173ad1e8e244037284d7
Inline _instance_extra_get_by_instance_uuid_query

This function didn't do anything special, and only had 1 caller.

Change-Id: I8ff717a05893d8e2adbdf0c17bd4b81677d15b8c
Merge "Inline _instance_extra_get_by_instance_uuid_query"
Merge "VMware: remove flag in tests indicating VC is supported"
Merge "Only load necessary instance info for use in sync power state"
Merge "Check for floating IP pool in nova-network"
Merge "simplify database fixture to the features we use"
Merge "Modify v21 alias name for compatible with v2"
Merge "Share server access ips tests between V2 & V2.1"
Merge "Don't modify columns_to_join formal parameter in _manual_join_columns"
Merge "Compute: Catch binding failed exception while init host"
Add backoff to ebtables retry

We need a backoff between ebtables retries. In some tempest tests we
have seen the retries complete in 100ms and still fail.

We now sleep for ebtables_retry_interval * loop count seconds. With
a default of 1.0 this means by default we sleep for 1.0s, 2.0s, and
3.0s before we finally giving up.

Change-Id: I0b9b664a592364bedd11124a1ec921d8ea011704
Partial-Bug: #1316621
Merge "Add backoff to ebtables retry"