Fix xml metadata for volumes api in nova-volume.

Fixes bug 1040891

Change-Id: I6295e4084adc33999bfdf66728623b278895b2d6
Signed-off-by: Matthew Treinish <treinish@linux.vnet.ibm.com>
Add a tunable to control how many ARPs are sent.

This new flag, send_arp_for_ha_count, controls how many
ARPs are sent when binding a floating IP address to an
instance.  Also increased the default number to 3 from 1,
to make this more robust and guarantee other network
devices see them.

Fixes bug 1043796.

Change-Id: Ib9118fcc5334ef4a8c5d7a5e765364e26fea68da
Fix synchronized decorator path cleanup

Fix bug 1047029

nova/tests/nova.compute.manager/ folder was being left behind during tests

Change-Id: If56f719ebcb1f5d1d57a2a36c5f4cb59c7a1e285
Fix EC2 cinder volume creation as an admin user.

Updates the EC2 API _format_volume function so that it
only tries to add project_id and host to responses if those
keys are present.  This resolves a KeyError that would occur when
using Cinder because volumes from it don't contain this
information.

Fixes LP Bug #1046464.

Change-Id: I56b977cfd1ae482f2559a3f1fda8d1543d3ea227
Specify the conf file when creating a volume.

Updates the tgt-admin command to actually use the config file
we create for the volume being created.

This fixes an issue introduced in
66f6a9edce3ccd624aba5d2a6bf3362901ed57f7 which breaks iscsi
volume creation.

Fixes LP Bug #1046985.

Change-Id: I58bd23ef6dd0055a329ace8e4b09d86886aa38e9
Simplify setting up test notifier

Rather than duplicating the test notifier module name, just use the
__name__ attribute on the module itself.

Also, where we were using stubout to set the notification_driver
flag, switch to using cfg's set_override() mechanism.

Change-Id: I46f705f71a4a220c235618491e06602fa4ea7a47
Merge "Fix synchronized decorator path cleanup"
Merge "Simplify setting up test notifier"
Implement paginate query use marker in nova-api

1.add limit and marker param to db.instance_get_all_by_filters()
2.set the filter use marker
3.execute limit before sqlarchmy get_all()
4.add testcase 'test_db_api.test_instance_get_all_by_filters_paginate'
5.related testcase:
    test_get_servers_with_marker()
    test_get_servers_with_limit_and_marker()
  in nova/tests/api/openstack/compute/test_servers.py
    test_instance_get_all_by_filters_paginate()
  in nova/tests/test_db_api.py
6.add InvalidSortkey exception

Implement bp:efficient-limiting.

Change-Id: Iea3eeb7b51194b6017d624506aafc6469d7338e4
Fake requests in tests should be to v1

v2 does not exist, yet.

(cherry-picked from cinder commit ac1b465)

Change-Id: Id3a332c4d78c87882a7db1a8b98479a3881b0a5f
Use volume driver specific exceptions

Change generic use of exception.NovaException in the nova/volume directory
to specific exceptions. The exceptions used in this patch are:

 exception.VolumeBackendAPIException
 exception.InvalidInput
 exception.InvalidVolume
 exception.VolumeAtatched

Patch includes updates to the appropriate tests as well.

(cherry picked from cinder commit 3905a99)

Change-Id: I10407ff3f5babe64e88f445d3529269b7665ee16
rbd: implement create_volume_from_snapshot

In an upcoming release, rbd will support creating volumes from
snapshots ('cloning'). To clone a snapshot, it must first be
'protected', which means it cannot be deleted until it is unprotected.
A snapshot can only be unprotected if no clones depend on it. Thus,
translate a failure to unprotect into a SnapshotIsBusy exception.

Also check for remaining snapshots before deleting a volume,
and raise VolumeIsBusy if any exist. While we're here, tidy up
the shell arguments to be more readable.

This is backwards compatible since it does not use the new features
unless they are available in the installed version of rbd.

(cherry picked from cinder commit ff45e32)

Change-Id: If4105e7af7ba33f09a15103b53ad675aceb2ebb4
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
Call driver for attach/detach_volume

The volume driver may want to know which guest is going to be
attached to a volume. The manager now calls down into the driver
on attach_volume and detach_volume.

Fixes bug 1038109.

(cherry picked from cinder commit 17538890)

Change-Id: I084c2d09a1871fa158312f9ba479abb474da1d28
Fix typo in tgtadm LOG.error() call

Fixes bug #1046875

Fix typo in LOG.error, it should be vol_id rather than volume_id.

(cherry picked from cinder commit d6a5d0f)

Change-Id: Id162c6f185a110b63e8f9f509f5cde75f3626cbf
Signed-off-by: Chuck Short <chuck.short@canonical.com>
Nail the pip requirement at 1.1.

The most recent version of pip (1.2.1 as of a couple days ago) fails
to install the required Nova .venv packages. Nailing the installed
pip version when using run_tests.sh seems like a reasonable solution
to this issue.

Fixes LP Bug #1047120.

Change-Id: Ic947c04603cf9423c0cf2835351785d4fe795c4b
Handle missing 'provider_location' in rm_export.

Updates the remove_export function in the ISCSIDriver so that
it handles the case where provider_location isn't set on
a volume. This can occur if a volume is created but not exported.

This was a regression from a previous commit
(66f6a9edce3ccd624aba5d2a6bf3362901ed57f7) which changed the way
iscsi targets are created/deleted.

With this commit the Nova Smoke Test volume tests should once
again pass.

Fixes LP Bug #1046484.

Change-Id: I4539d73691a058d8fdc6c864dee06c0d4e4813f7
Stop lock decorator from leaving tempdirs in tests

In some versions of python 2.7, we must use the nonlocal keyword to
give an inline function access to a variable in the enclosing scope.
This leads to a tempdir not beaing cleaned up because a boolean in
the synchronized decorator doesn't get set properly. Since we are
still supporting python 2.6, this patch removes the method call
completely so we don't have to worry about locality.

The patch also moves acquiring the lock  inside the try, except to
make sure the tempdir is still cleaned even if there is some issue
with getting the lock.

Fixes bug 1047530

Change-Id: Ie3da18262e67de076b1e474c24edd2e4e5208646
Merge "Fix EC2 cinder volume creation as an admin user."
Merge "Add a tunable to control how many ARPs are sent."
Correct ephemeral disk cache filename.

Fixes a typo that was added in 23987c19c4f10f31b3000c75a2431e170e78daa4.

Fixes LP Bug #1047628.

Change-Id: Ia525288b758c2f5a4825394b24810c509962c961