Merge "ec2 _format_security_group() accesses db when using quantum_driver"
Merge "Shrink size of aggregate_metadata_get_by_host sql query"
Make compute manager revert crashed migrations on init_host()

This should provide a path to cleanup partial migrations by reverting
them back to the original state instead of leaving them in limbo. Note
that libvirt needs a change to make this work, in the case where the
unconfirmed instance's directory is still present and needs to be
removed before the rollback.

The libvirt, xenapi and powervm drivers are modified here, and tests
are added to confirm their compliance with the proper behavior.

Addresses bug 1131588

Change-Id: I85bc0f6e9cda10aa85328199d107a3ff6e240b96
Add instance_type_get() to virt api

...and remove the use of instance['extra_specs'] from the libvirt and
baremetal virt drivers. Also remove the hack in instance_update()
which places them there in the first place.

Fixes bug 1133572

Change-Id: I39e9fabb28b48dc52ec47f58d76b0bf2c6ee0204
Merge "Remove duplicate options(joinedload) from aggregates db code"
Merge "Adds API Sample tests for Volume Attachments"
Merge "Fix crash in quantumapi if no network or port id is specified"
Fallback coverage backdoor telnet connection to lo

This commit adds a fallback condition for the telnet connection.
If trying to establish a connection to the backdoor fails with
ECONNREFUSED the extension will then try to connect to the same
port on the lo device. Eventlet backdoors currently open on the
lo interface and this is to cover the common (and CI) use case
where the hostname doesn't resolve to 127.0.0.1.

Using the fallback was done to avoid adding a new config option
to specify that the hostname that is in the DB for the service
doesn't resolve to the lo device, and that the extension should
use just use localhost.

Change-Id: I0321db68cbccf0cddf13d91a77dfb744bb456d87
Don't use instance['instance_type'] for scheduler filters in migration

Instead, pull a fresh copy from the database, which has the proper
extra_specs cleanup which everyone downstream of us expects.

Fixes bug 1136430

Change-Id: Ifcb9feff8291096eed7c198b8e7a35c3c38ca93e
Fixes a Hyper-V live migration issue

Fixes Bug: 1129091

Adds return values to check_can_live_migrate_destination
and check_can_live_migrate_source and some debug log notifications.

Removes the deprecated compare_cpu method.

The base class documentation currently does not specify any return
value constraint for the aforementioned methods so the return type
has been inferred from nova/compute/manager.py.

Change-Id: Ic4b09be4f3958f6d22a9ee41bc8037d2c2e95c0b
Imported Translations from Transifex

Change-Id: I80b55241f6fb46f71ec90c059fbe47d4a770c88b
Fixes the Hyper-V driver's method signature

Fixes Bug: 1132772

Corrects an issue in the Hyper-V driver's destroy method argument list.

Change-Id: Ieb15df80a2d3738a46f7bdd56ba0de57b68fac14
Fix deprecated network api

The rpc-only network api is deprecated in Grizzly, but it should still
be able to function.

Change summary:
* Remove update_cache kwyword argument to get_instance_network_info
* Add conductor_api keyword argument to get_instance_network_info
* Add blanket **kwargs for future compat to get_instance_network_info
* Pass instance['uuid'] as instance_id kwarg in _get_instance_nw_info
* Add conductor_api keyword argument to remove_fixed_ip_from_instance
  and add_fixed_ip_to_instance
* Add blanket **kwargs for future compat to remove_fixed_ip_from_instance
  and add_fixed_ip_to_instance
* Pass empty rxtx_factor in remove_fixed_ip_from_instance and
  add_fixed_ip_to_instance for rpcapi compat
* Add blanket **kwargs for future compat to deallocate_for_instance
* Add conductor_api and security_groups to allocate_for_instance
* Add blanket **kwargs for future compat to allocate_for_instance
* Pass instance['uuid'] as instance_id kwarg in allocate_for_instance

Fix Bug 1134512

Change-Id: I6791df1bf1ac2456c5e83ec5ae47b0226409cf95
Pep8/pyflakes cleanup of deprecated_api

* Reformats code better in line with hacking guidelines

Change-Id: I27fa5d7321c56155d1f1f3b6a35105e35e95e0f1
don't stack trace if long ints are passed to db

If we pass a integer, which is longer than the id field in the
database, but a valid python integer into any of the REST API
calls SQLalchemy throws a DataError, and the user sees a 500
instead of InstanceNotFound. This can be triggered by using a
id of 9223372036854775808 (for instance).

This issue is seen on postgresql, mysql and sqlite don't hit it.

Instead, catch the DataError exception, and return an InvalidID
exception. If InvalidID is thrown catch that at the API layer
and return the expected not found.

This was caught when reenabling tempest tests for bug #1046870
and is one of serveral patches in nova needed to enable
test_servers_negative.py in tempest.

Change-Id: I6130863a95567eabd3ae05a09e4a9f26bb5f5098
Merge "Fixes a Hyper-V live migration issue"
Merge "Fixes the Hyper-V driver's method signature"
Fix ephemeral devices on LVM don't get mkfs'd

Fixes bug 1083424

Updated imagebackend to run the necessary callback conditionally
based on whether LVM is configured for use and ephemeral_size is
defined. The callback function was updated not to invoke qemu-img
for LVM, since the ephemeral disk is already present/created via
LVM. Lastly, the mkfs call had to be changed to be run as root,
since we are dealing with raw devices.

Change-Id: Ieb1febb0ea086f8e5063d92ca376d349fcd43a43
Merge "Add a 'hw_' namespace to glance hardware config properties"
Regenerate nova.conf.sample

Fix generate_sample.sh script so that we include options from the bin/
scripts too. In order to make this work, sync a zmq-receive fix from
oslo-incubator to delay parsing its config file.

Change-Id: Ia3f9083b2ebc16425dbad8a2a55c2d45f1ff2be3