Open 2011.3.2 development

Change-Id: I9a2491f04eab13795fe6e69f665ab9e64744a7f2
Fix bug #917615.

Partial Cherry-Pick of 52d58ad583350f2448b3971eeb3f1df541cfbfe5.

Changes to nova.compute.manager.recover_live_migration() discarded as they are unnecessary for diablo.

Conflicts:

	nova/compute/manager.py

Change-Id: I773b3f026fd7ebcb2aefcd2ef348cca0c5477238
Fixes bug #919390 - Block Migration fails when keystone is un use.

I've Updated the calls to nova.virt.libvirt.utils.fetch_image() to match the rest of the class.

Additionally, nova.virt.images.fetch() currently makes no use of the user/project id supplied.

Change-Id: I2db4b8c1b6542909fcc2b452fc961e22fe2557bf
Bug #920497 fix X-Server-Management-Url for v1.0 noauth API

This regression was introduced in commit 2aa5bb96,
which discounted the v1.0 case

Change-Id: I44e03fbea6b79b1c2e2705b1f39e6c7aaaed9265
Merge "Fixes bug #919390 - Block Migration fails when keystone is un use." into stable/diablo
Merge "Bug #920497 fix X-Server-Management-Url for v1.0 noauth API" into stable/diablo
Provides flag override for vlan interface

This means you can have your vlan_interface be different on
different hosts machines by setting vlan_interface differently
on each host.

 * Allow non-homogenous vlan networks
 * Fixes bug 833426
 * Includes failing test for linux_net

(cherry picked from commit 8efe15209aaee6b15c8edb21362c08137294a7de)

Resolved Conflicts:

	nova/tests/test_linux_net.py

Change-Id: I68aa52e745318cedfbefb6fbac8187fceb1ae06b
Don't log sensitive data in compute log file.

Sanitize run_instance's admin_password argument from
nova.rpc 'received' debug logging. Fixes bug 915025.

Sanitize new_pass from set_admin_password.  Fixes bug 920687.

Manually merged from:
  ccbc940211c348940ca9766ef60328302a080f9a
  fa10e7ad5b3f6ab5de5b7b187da7a8bf05a263d5

Change-Id: I3af8263f88ef2e68d5d7f6d8c4824737fffcf461
Fix nova-manage floating delete with --ip_range.

This patch fixes an error when trying to delete a range of floating IPs
as reported in bug 932070.

This was fixed in master as a part of:
	9e21a2228c191896223daae2379fcf1352cc736c

Change-Id: I165e59a258d728c222cfea0406d4bc78cfab669c
Bump python-novaclient version to 2.6.0.1.

Bump the python-novaclient version in pip-requires to 2.6.0.1. The
previous python-novaclient version 2.6.0 was broken and thus
Diablo tests were failing.

Also nails the Glance version in pip-requires to 2011.3.1. This
should fix 'No module named iso8601' errors when running
Diablo tests with the latest Diablo trunk builds.

Change-Id: Idc9bcceaff91afa69fbc255bc39a68d854ac1127
Add validation for OSAPI server name length.

Diablo Fix for LP Bug #962515.

Change-Id: Ifa1ca56a33ca517679fa80bfd10b962eeebe3a76
Fix undefined glance_host in get_glance_client

get_glance_client is stubbed in the tests, so they didn't catch it.
Added tests to catch it.

This is related to bug 883328.

Also, add myself to Authors file.

[Backported from
7a5b8822791dc9af0afe7166af34c6fb5277f81c and
c7532c62ea6afb4bfcf3d00e42a58cc72b12405b]

Change-Id: Idbe6c06c22ca1a50df589e016ea5e5924b0cc29d
Implement quotas for security groups.

Fixes LP Bug #969545 for Diablo.

Change-Id: Ibc02256b6debd29c56307320acc48e9cfae85ba9
Add INPUT chain rule for EC2 metadata requests (lp:856385)

On Fedora, the default policy for the INPUT chain in the filter table
is DROP. This means that EC2 metadata requests from guests get dropped.

Add this rule to let it through:

$> sudo iptables -t filter -A nova-network-INPUT \
                 -s 0.0.0.0/0 -d $ec2_dmz_host \
                 -m tcp -p tcp --dport $ec2_port -j ACCEPT

However, this only works if nova-network and nova-api are on the same
host.

Change-Id: Ic99ba9249ce5219cd2631184154add82d25d9d6d
Have nova-api add the INPUT rule for EC2 metadata (lp:856385)

It makes no sense to have nova-network add an iptables rule for the EC2
metadata service, since they may not actually be on the same host.

Instead, nova-api should add it directly. In order to do that, we add a
manager class for API services and allow the EC2 manager use the network
driver to add the rule.

Change-Id: I7c1f973c662a6d290e555b6a2ce8fc301f27b543
Allow the user to choose either ietadm or tgtadm (lp:819997)

(Actually authored by Chuck Short <zulcss@ubuntu.com> but Gerrit won't
allow me to push it with Author: set to that)

Change-Id: Ia350345a25a5f39b8aa26c8daf2a9987590d4b62
Remove VolumeDriver.sync_exec method (lp:819997)

We always use the same functions for sync_exec and execute.

The execute method is always synchronous, so the distinction doesn't
appear to make sense.

Finally, it looks like it would make sense for execute to ever be
async, so the distinction isn't even serving a useful documentation
purpose.

Change-Id: I86d491cfbf8be73672df7cfdf22e465627a86034
Refactor ietadm/tgtadm calls out into helper classes (lp:819997)

Add a new TargetAdmin abstract base class and implement it using ietadm
and tgtadm. This cleans up the code greatly and gets us some code reuse.

Change-Id: I1c0064e5d35483a6c4059cfc61a484f5f576b2da
Fix tgtadm off by one error. Fixes bug #871278

(cherry picked from commit 15cc877cc2af71135b896974f17cb4a63291a08c)

Change-Id: Ia359045465ada9753b86d1a08cc947966b3ac899
Signed-off-by: Chuck Short <chuck.short@canonical.com>
Bug#898257 abstract out disk image access methods

Rather than providing two mutually exlusive image
access methods (loop and qemu-nbd), try each in turn.
This is to prepare for a follow up patch which will
add libguestfs as a method to try.

* nova/virt/mount.py: A new Mount class to abstract the
devce allocation, partition mapping and file sys mounting,
for each access type.
* nova/virt/disk/loop.py: A specialization of the base Mount class
to provide loop back mounting support.
* nova/virt/disk/nbd.py: A specialization of the base Mount class
to provide qemu-nbd mounting support.
* nova/virt/disk/base.py(img_handlers): A new list of access methods
to try, with the order being honored.
(_DiskImage): An internal helper class that uses the plugin classes
above, to provide the operations available on a disk image file.
When mounting, iterate over each access method until one succeeds.
If a hint is provided about a CoW format image, the list of
methods to try will be reduced accordingly.
Note expected errors are no longer raised as exceptions during mounting.
Instead, on failure to mount an image, errors are collated and raised.
Interveining errors are logged in debug mode for successful mounts.
* nova/virt/libvirt/connection.py: Adjust the function parameter
names to be more general, rather than referencing specific
implementations like 'nbd' and 'tune2fs'.
Simplify the destroy_container() by storing and passing
back a reference to the _DiskImage object, which has the
necessary state to unmount.
* nova/utils.py (trycmd): A helper function to both deal with,
commands that issue ignorable warnings to stderr,
and commands that EXIT_SUCCESS while issuing errors to stderr.

Change-Id: If3a4b1c8f4e2f2e7300a21071340dcc839cb36d7