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
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>
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
Correct ephemeral disk cache filename.

Fixes a typo that was added in 23987c19c4f10f31b3000c75a2431e170e78daa4.

Fixes LP Bug #1047628.

Change-Id: Ia525288b758c2f5a4825394b24810c509962c961
Add Server Detail and Metadata tests

Change-Id: Ic5386478a706ee5af8301315bfd3a2842af5a781
Set install_requires in setup.py.

Updates setup.py to set install_requires using parse_requirements from
openstack-common.  This allows DevStack to install nova requirements, as
currently they are not handled.

Also relaxes the version requirement for lxml to >=2.3,<3.  This allows
DevStack to install nova requirements without needing to install lxml
over the installed python-xml system package, currently 2.3.2.

Change-Id: Iccebf9604ba5c6fcacb4c5fa5004f9fcb08944f3
Add ServerStartStop extension API test

Change-Id: I1671805e10ebc9c5d8037f67b78c47fbf8373ce9
Execute attach_time query earlier in migration 98

MySQL was blowing up when sqlalchemy tried to execute the subqueries
in up/downgrade for migration 98. SQLite wasn't blowing up on this so
the tests were passing in Jenkins.

There are no test changes as it depends on the functional environment
in which you run the tests, not the tests themselves.

Fixes bug 1047665

Change-Id: I6eb3c8dd03495cdda2574efc9b5fc2b495fbcb37
Merge "Execute attach_time query earlier in migration 98"
Merge "Correct ephemeral disk cache filename."
fix unmounting of LXC containers in the presence of symlinks

When looking up the mount dir in /proc/mounts we need
to canonicalize the path so that symlinks are resolved

Fixes bug: 1046313
Change-Id: Ib2bb8253e9cdfeda3c6ba13e56a0f907518ff558
remove a never used import

Change-Id: I33fd291ef2bf9ad1914abe51a402d8d492dd193f
Have device mapping use autocreated device nodes

Newer kernels detect partitions and create device
nodes when an image is opened with qemu-nbd. Calling
kpartx afterwards will always result in failures
and prevent injection of data into the current image.

The fix tries to handle this by detecting if a device
node exists and call kpartx only if needed.

Change-Id: I781158ea94f9f0762140e106dd6a1259017b8a3b
Merge "fix unmounting of LXC containers in the presence of symlinks"
Merge "Add Server Detail and Metadata tests"
Merge "Add ServerStartStop extension API test"
Merge "Set install_requires in setup.py."
Merge "rbd: implement create_volume_from_snapshot"
Create image of volume-backed instance via native API

Fixes bug 1034730.

Avoids 'qemu-img snapshot' failure when native API create_image action
is applied to a volume-backed instance.

Applies the same logic as is used to create a placeholder image from
a volume-backed instance via the EC2 API CreateImage operation, with
the now-common code refactored into the ComputeAPI class.

Change-Id: I624584ae9adbf30629f0e814d340da6b9e6e59bd