nova-manage: remove redundant 'dest' args

Includes a hack to calculate 'dest' from the argument name. This hack is
removed in a later commit.

Change-Id: I60567ff232ab7699f3234b3bfc1618a17a648976
Update to Quantum Client 2.2.0

This patch updates tools/pip-requires to use the python-quantumclient 2.2
It also limits the version to <3.0.0 to prevent breaking something accidently
when 3.0.0 is released.

Fixes bug 1152695

Change-Id: Ic47deccac1df5a1b6b5171f1f7d80b250b57ebc9
Compile BigInteger to INTEGER for sqlite

Ensure BigInteger does not map to BIGINT for an auto-created
sqlite registry DB, as this type is not supported by sqlite.

Refactoring a test to use generic unsupported column type

Fixes bug 1147879

Change-Id: I590c798dd470def286802bc6e00bb4b621332b8d
Fix OS-DCF:diskconfig XML handling

Removes string to bool conversion for the OS-DCF:diskconfig
attribute during XML deserialising as the diskconfig extension
expects a string (MANUAL or AUTO) not a bool.

Fixes bug 1152439

Change-Id: Id9a5c2559a2891c2a21c437c9a5a534b9885c9bf
Prevent nova services' coverage data from combining into nova-api's

Now if combining a coverage report once, nova services' coverage
data are combined into nova-api's.
This renames nova-api coverage datafile to .nova-coverage.api and
creates a new coverage instance to combine when reporting.

Fixes bug: 1152475

Change-Id: I90b6535d490cf0123a127f8752986edd782ef37e
Fixes nbd device can't be released error

When the 'mount' operation is successful but stderr is not empty during
injecting key/file into image, there may be some warning messages output to
stderr, so we need to discard them and continue to inject files into image.

Fixes bug #1152519

Change-Id: Icc7d15196f3ee67674f9d815ddeef4378f363e2c
xenapi: Fix reboot with hung volumes

If a volume becomes inoperable (e.g. the ISCSI connection is severed)
and the user goes to reboot, the instance may enter a permanently halted
state.

The root cause is that a VBD that points to 'bad' volume prevents VM
operations ('reboot', 'start') from completing under XenServer.

The work around is to detect which volumes are bad, detach in the
virt-layer, retry the operation (or in the case of reboot, just 'start'
the halted instance), and then notify the compute manager via a
callback so it can detach the volume in Cinder.

Fixes bug 1148614

Change-Id: Id4e8e84bb5748cfa267c2a418f9405fd86829e8f
Prepare services index method for use with cells

Move the api.openstack.compute.contrib.services' index method's logic
out of the openstack api layer and into the compute api layer.

The addition of the availability_zone information is already done by the
host api. For this reason it was removed from the openstack api layer.
The behaviour of the call remains the same, only the functionality has
been moved.

This patch makes the functionality automatically work in cells.

Work towards: bug #1150499

Change-Id: Ia9489f11608167aed5168ccb3b670f395f7de5f7
Force resource updates to update updated_at

When there's no changes in resources, compute_node_update (and other
DB update calls) won't modify 'updated_at'.

'updated_at' is what is used to invalidate the cache in the scheduler's
host_manager.  Because of a race with the compute manager, the scheduler
could be out of sync with the compute_nodes table but have a newer time
on its cache.

By always updating 'updated_at' on resource updates, the periodic task
will be sure to invalidate any bad cache the scheduler has.

Fixes bug 1153778

Change-Id: I19b51a5b84f472cd0f4de6460a4edb540cc62da2
Fixes instance task_state being left as migrating

In a cross-hypervisor environment, such as KVM + Hyper-v. After negative test
which live migrate a KVM instance to Hyper-v host, there will be an exception
InvalidHypervisorType. As a result, the instance task_state is being
left as migrating. That leaves the instance in a broken state and most of the
requests on the instance will fail.

Actually, there are some other exceptions will cause this issue as well, such
as UnableToMigrateToSelf, DestinationHypervisorTooOld. All of them are thrown
from the driver of scheduler during live migration. But obviously, if the live
migration fails at the schedule stage, the task_state of the target instance
should be updated to None.

Fixes Bug: 1153283

Change-Id: Ide4b48653268c8dbe31de6964814830d2e82a5ba
Fix quota issues with instance deletes.

In order to keep quotas in sync as much as possible, only commit quota
changes for delete when:

1) An instance's vm_state is updated to be SOFT_DELETED.
2) The DB record is marked as deleted (and the instance's vm_state is
   not SOFT_DELETED)

If a host is down and we delete the instance in the API, this means
quotas are committed within the API.  Otherwise, quotas are committed
on the manager side.

Fixes bug 1098380

Also needed for proper testing: Fixed compute cells tests so that pseudo
child cells use NoopQuotaDriver.  This uncovered inconsistencies in the
NoopQuotaDriver wrt the DBQuotaDriver.  Those issues were fixed as well.

Change-Id: Ib72de1a457f0c5056d55a5c7dd4d8d7c69708996
Fix behaviour of split_cell_and_item

If you try to split a cell and item, with no path!to!cell@ in it, it'll
now return None for the cell, instead causing a ValueError when trying
to split the result.

Change-Id: I228b9f3b0f63f8c7a6004b3206f5312ed2a878bc
Fixes: bug #1153841
Remove the usage of instance['extra_specs'].

Instance type extra specs is remove from instance dict, so use inst_type['extra_specs']
instead of instance['extra_specs'].

fix bug #1146253

Change-Id: I1d3542e5142f490269607b779daa507f9d7b36e4
Pin SQLAlchemy to 0.7.x

0.7.10 has been released and is compatible with 0.7.x. Instead
of pinning to 0.7.9, simply pin to 0.7.x to avoid SQLAlchemy 0.8

Change-Id: Iea57598698b4faf906e82a2974497221d07f4d16
Fix nova-manage --version

Fixes bug #1138844

Pass the version kwarg to cfg.CONF() so that --version shows the
version number.

Change-Id: I589ebffec67ef00f8ba24f553bf3e81806aa50b6
Fix: Managers that incorrectly derive from SchedulerDependentManager

Change conductor and network managers to be ordinary managers. Also
remove some unnecessary imports from managers already declared with
base manager classes in nova/manager.py.

Resolves bug 1154070.

Change-Id: I6b87cd5d7d5ef66425d084db667a6eff247cf0b1
Fix more OS-DCF:diskConfig XML handling

Add handling in the deserialisation code to handle the
OS-DCF:diskConfig attribute in the rebuild and resize actions so
the diskConfig extension can handle it properly. Formerly only
the older auto_disk_config attribute was managed (and incorrectly so).

Fixes bug 1153133

Change-Id: I68479d258cf23083274dd21b1f9eabab2feeb093
Fix: nova-manage throws uncaught exception on invalid host/service

Add a test case for this too.

Fix bug 1154089.

Change-Id: I3a60e581a9fac945fddf72c4f037ca5cae0005fc
Sync rpc from oslo-incubator.

Changes include:

 * Fix Copyright Headers - Rename LLC to Foundation
 * Preserve exceptions in impl_zmq.
 * Don't log a traceback on rpc call timeout.
 * Redis-based matchmaker
 * AMQP: skip duplicate messages
 * some other minor fixes / cleanups

Fix bug 1154232.

Change-Id: I8afb6b9a919fca34b4a93f7fad1551a023eba6b2
Merge "Force resource updates to update updated_at"