Check that an image is active before spawning instances.

Resolves bug/1054163.

Change-Id: I4095fcac300a161e6da93bdc14eb43257d4f1aee
Modified 404 error response to show specific message

User-friendly messages are returned for invalid
floating-ip and volume inputs

Fixes bug 1056038

Change-Id: I659323b81ac435793152f9b49335b350c0801d81
Fix issues deleting instances in RESIZED state

DB API call migration_get_by_instance_and_status requires admin
context...and it'll also raise an exception if no migration matches.

_delete() in compute/api was not using admin context, and was checking
for a false return from the DB call vs checking for an exception.

Added a test that covers both problems.

Fixes bug 1056601

Change-Id: Ib3c631dccbb2776761cf5acb8bab1d814bf3e282
Replaced default hostname function from gethostname to getfqdn

Fixes bug 1055503

The standard behaviour of the 'gethostname' function in Python differs from
Linux to Windows. A common Linux configuration returns the FQDN, while a
Windows one returns only the host name.

To resolve inconsistent node naming in deployments that mix windows and
Linux, it is proposed to use 'getfqdn' as default function instead of
'gethostname'. This is function is more predictable in all cases.

Change-Id: I3164d9a36df2b8484bbf9a57879c31fa0e342503
xenapi: increase timeout for resetnetwork agent request

Windows can take longer than the default 30 seconds for resetnetwork
requests. Double the timeout for the command to 60 seconds, but add
a flag so it can be changed without code changes in the future.

At the same time, add a flag for all other agent requests too.

Change-Id: Iba91c37fd5596ea0dd63c20f74925972df1ca715
Support for several HA RabbitMQ servers.

Port from openstack-common: https://review.openstack.org/#/c/10305/

Change-Id: Ib44abf115b42c3df42771344f6722ce1db043bbd
Merge "Fix issues deleting instances in RESIZED state"
optimize slightly device lookup with LXC umounts

Only canonicalize the path once, rather than for
each entry in /proc/mounts.

Change-Id: I6e582b44f171a1c4cc151d615e9dcfae1e590a53
Reported-by: Kevin L. Mitchell
Bump the version of SQLAlchemy in pip-requires

Fixes bug 1057145

Change-Id: I5960b28f4c4feb3f68b21ae09c6d7de0f098b8e5
Remove unnecessary check if migration_ref is not None

migration_get_by_instance_and_status will raise MigrationNotFoundByStatus
if the migration isn't found, so the extra check is unnecessary since
migration_ref can never be None.

Change-Id: I640c4f64234f3991e03fcf23789c428854becc87
Merge "Remove unnecessary check if migration_ref is not None"
xenapi: make it easier to recover from failed migrations

If a migration/resize fails, the source VM may or may not have it's name
changed in xapi. This makes recovering from a failed migration more
difficult than it needs to be. Moving the rename to be done first
ensures that it always be renamed.

Change-Id: I9296aa67af01d4a832bc63bcb9b71ee20b1221cc
Merge "Replaced default hostname function from gethostname to getfqdn"
Merge "Support for several HA RabbitMQ servers."
Loosen anyjson dependency to avoid clash with ceilometer

Ceilometer depends on anyjson 0.3.1, whereas nova requires
exacly 0.2.4.

The net effect is a devstack with ceilometer installed will
appear to work initially, as ceilometer is sparked up after
nova. However, if any of the nova services are subsequently
restarted, they fail with:

  pkg_resources.DistributionNotFound: anyjson==0.2.4

By simply allowing the nova anyjson dependency version to
be greater than as opposed to an exact match, we can avoid
the clash.

Change-Id: I21737a2504705f15dd16e6762b44624678177442
Merge "Check that an image is active before spawning instances."
Merge "Modified 404 error response to show specific message"
Enable list with no dict objects to be sorted in api samples

So far we had only dicts to be sorted. Although Aggregates extension has a
response case which a list of strings is returned and the current key
attribute didn't checked if the instance was a dict or another object which
caused a break in the use case above. This fix this, and use None as key to
compare if the element is not a dictionary instance.

Change-Id: Id5d31d1d2ad88fb538d8a9637a1969b179dd93ab
Pass block_device_info to destroy in revert_resize

Fixes bug #1056285

Passing block_device_info allows the driver to clean up block
device mappings (detaching) properly on the newly resized instance

Change-Id: I2527f883883c741dbf4d20be0ca33dbef6f9f36a
Merge "Loosen anyjson dependency to avoid clash with ceilometer"