Copy the RHEL6 eventlet workaround from Oslo

Tests in oslo-incubator now need the horrendous hack to workaround an
issue with eventlet on RHEL6. We've moved the patch_tox_venv tool
and redhat-eventlet.patch into oslo-incubator, so add them to
openstack-common.conf.

Change-Id: I1acfec282b64d7582144b155119bedb1741db2f7
Include list of attached volumes with instance info

Fixes bug 1112998

Change-Id: I1c3eb578339aabbcfed107043f39e30daf633c4a
Architecture property updated in snapshot libvirt

During an instance snapshot if the architecture property is defined
in the image it is updated twice in the snapshot image.
The snapshot is created with the metadata values from the
"instance_system_metadata" table and then, if defined, the architecure
property is updated from the value in the base image in that moment.

There is no reason to treat this property differently from others.
Also, it didn't respect the "non_inheritable_image_properties" option.

This change removes the special behavior for the architecture property
in the libvirt driver during a snapshot.

Fixes: bug #1176173
Change-Id: Ic5b4e3d462c08df167e14522fa25a7cf857c6aad
Extract getting instance's AZ into a helper module.

An instance's availability zone logic may used by many modules,
so move it from extend API into helper module `nova.availability_zones`.
Also add some tests for the new method.

part of bp: different-availability-zone-filter

Change-Id: I5916a0b09d5dddec338e8e36503953720dfd6bcd
Detach volume fails when using multipath iscsi

Enabled multipath for libvirt iscsi volume driver. Attach volume worked,
however, detach volume failed. It failed because it can't find multipath
device "/dev/mapper/xxxxxxxx" from connection_info and block device
mapping table.

The fix is to retrieve multipath device info dynamically at detach time.

Fixes: bug #1178893

Change-Id: I53a3888daef93b57bf7f57438f74cee05e794b52
Refactor nova.volume.cinder.API to reduce roundtrips with Cinder

Make cinder.API methods accept volume_id instead of the whole volume object.
This will remove redundant roundtrip to get the volume before
passing it to other methods as in fact they only need the id.

Fixes bug 1172297

Change-Id: I5e7f944c1c29b2f211ece2ef86c0959c81e806df
Handle IPMI transient failures better.

Sometimes, IPMI "power status" doesn't return either "on" or "off".
When this happens, the IPMI driver shouldn't assume what the state is,
and the baremetal driver shouldn't assume that NOSTATE means SHUTDOWN.

This patch also improves the doc strings for the IPMI driver.

Fix bug 1178378.

Change-Id: I54a5e6309f68ab8e5601e65039366d7d87c03478
Reverse path SNAT for DNAT floating-ip.

This patch applies a reverse SNAT rule to allow instances that have an
assigned floating IP to communicate with other instances in the same
OpenStack deployment, security group rules permitting. The patch
allows members of the same private network to communicate with each
other using their floating-ips in a more consistent fashion. The rule
also addresses the situation where the target is on another private
network.

This will only work for interaction between two servers that both have
floating IPs assigned to them.

Specifically, this patch solves the problem where a target server
"sees" the private address of the client. By SNAT'ing to the client's
floating-IP, the "sees" the correct reply address and the reverse
route follows the same path that an actual external connection would
take. The SNAT ONLY occurs if a DNAT occurred before hand, allowing
communication on private networks using private IPs to remain fully
private and internal. The limitation is of course if a DNAT occurs for
other reasons, there may be issues.

Resolves bug 1178745

Change-Id: I55b7131cff5fd5a2ebf826945370d4d550e74136
Fix quantum security group driver to accept none for from/to_port

The quantum security group driver did not accept none values for
from_port/to_port which the nova security group api supports. This
patch allows None values to be passed in for those params and adds a unit test.

In addition the from/to_port responses would be different if using quantum
instead of nova. This patch fixes that and adds unit tests.

Fixes bug 1176027

Change-Id: Id57e253c9dd1787ee25fc5cbb562743692d7abe4
Cells: Don't allow active -> build

Adds support for passing 'expected_vm_state' in an instance_update dict
much like the current support for 'expected_task_state'.

For cells, when the API cell receives an instance update containing a
vm_state of BUILDING, raise an exception if the instance is in some
other state.  This addresses out-of-order messaging issues that can
cause an instance to appear to have a huge delay going ACTIVE.  (A
periodic task run can later heal the state, but it can take a long
while)

Fixes bug 1180283

Change-Id: I64252b30e2596812f3b84da64b1fc8681661d7f8
xenapi: ensure vdi is not too big when resizing down

Fix for bug 1155066

This change adds some rollback into the resize disk down
code within xenapi, and reports a better error message
when the disk is too big to resize down.

On a successful rollback, the user is notified of the error
by the instance actions, rather than leaving
the server in the error state.

The user is then able to free up some disk space such that
the resize can work correctly.

Change-Id: Ibad568ab3cfb9caaf4fe002572c8cda973d501a7
Add missing tests for db.fixed_ip_*(). functions.

Added new tests for fixed_ip*() functions.
Function fixed_ip_create() should return FixedIp instance rather than
FixedIp.address, because it is used in a tests later.
Fix calls of fixed_ip_create() respectively.

blueprint test-db-api

Change-Id: Id5e9d4486605bde9d9fd1e631d868603a7a7c604
Merge "Handle IPMI transient failures better."
Merge "xenapi: ensure vdi is not too big when resizing down"
Merge "Include list of attached volumes with instance info"
Merge "Extract getting instance's AZ into a helper module."
Merge "Refactor nova.volume.cinder.API to reduce roundtrips with Cinder"
Merge "Cells: Don't allow active -> build"
Merge "Fix quantum security group driver to accept none for from/to_port"
Merge "Reverse path SNAT for DNAT floating-ip."