Allow for deleting VMs from  down compute nodes.

Fix bug 872899

If compute node service_is_up returns false, just delete the VM from
the database. If compute node recovers, setting
running_deleted_instance_action=reap will clean up the node.

Change-Id: Ibb5f1e22c2e482d304c59a485a04b882ead0c67d
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>
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
Improve floating IP delete speed.

This is similar to the change to improve bulk creation speed. Before:

./bin/nova-manage floating delete --ip_range 10.250.0.0/16
337.20user 10.22system 44:07.10elapsed 13%CPU (0avgtext+0avgdata 119536maxresident)k
400inputs+0outputs (4major+11704minor)pagefaults 0swaps

After:

./bin/nova-manage floating delete --ip_range 10.250.0.0/16
6.95user 0.16system 1:04.04elapsed 11%CPU (0avgtext+0avgdata 120016maxresident)k
0inputs+0outputs (0major+11750minor)pagefaults 0swaps

Resolves bug 1023560.

Change-Id: If4f23222025cae88576f469022e0f7d907c9c4fa
Adds get_available_resource to hyperv driver

Fixes Bug #1048263

update_available_resource was changed to get_available_resource.
This fix implements implements the method in the hyperv driver

Change-Id: Id018877c563aab7f75618ada318b6422ab06c7b7
Update SolidFire volume driver

Implements blueprint update-solidfire-driver

* Updates driver to reflect changes in the release version of SF API
* Modify SF naming scheme
* Implement snapshot functionality
* Implement setting qos on create via metadata
* Update/Add tests

(cherry picked from cinder commit df5c4ba)

Change-Id: I08f7aac31e9d95f971d297a19c285dfa7151b931
delete a module never used

delete the utils in this code, which never used

Change-Id: I9e0f484c507b913bcee91d62c9d118c0219cc13c
Add a criteria to sort a list of dict in api samples

Add 'key' parameter in the sorted call to order the list of dictionaries by a
specified criteria: the __tag__ value.
So far the sorted method considered an unspecified criteria (it seems it
considered the whole dict content) when ordering and this was causing some few
cases fail.

Change-Id: I1ebb295a7a3a53267e8f9f4286093f5b63d48eb3
xapi: Fix live block migration

Fixes bug 1040332.

Xapi VM.migrate_send and VM.assert_can_migrate calls require that
vdi_map parameter is a (source_vdi_ref -> target_sr_ref) mapping, for block
live migration to work, as of XenServer 6.0 RC1.

On the destination side:
This fix modifies the check_can_live_migrate_destination call, so that the
value returned contains the "destination_sr_ref" (XenAPI specific data is
stored under the "migrate_send_data key").

On the source side:
check_can_live_migrate_source and live_migrate calls assemble the
vdi_map by mapping all the local sr contained vdis of the VM to
destination_sr_ref, and passing this parameter to the VM.migrate_send and
VM.assert_can_migrate Xapi calls.

Change-Id: I95f3dca651d2e72fc727646580092a25f558d6ba
Fix auth parameter passed to libvirt openAuth() method

The 'auth' parameter for the libvirt 'openAuth' method
should be a list of 3 values, a list of credential types,
a function callback and an opaque data value. For unknown
reasons the libvirt driver is passing the string 'root'
instead of the function callback.

This causes any attempt to invoke the callback to fail
with a python exception, which gets swallowed since it
is called asynchronously from libvirt. The upshot of
this is that it is not possible to connect Nova to a
libvirt instance that requires authentication.

Although Nova has no way to provide custom credentials
to libvirt, it is possible to rely on libvirt's client
auth file to provide credentials. ALl that is required
is for the auth callback to return '0' if no credentials
were asked for.

Fixing the Nova params for openAuth() thus enable use of
SASL or Kerberos auth+encryption with Nova eg for SASL

 # augtool -s set /files/etc/libvirt/libvirtd.conf/auth_unix_rw sasl
 Saved 1 file(s)

 # saslpasswd -a libvirt nova
 Password: XYZ
 Again (for verification): XYZ

 # su - nova -s /bin/sh
 $ mkdir -p $HOME/.config/libvirt
 $ cat > $HOME/.config/libvirt <<EOF
 [credentials-nova]
 authname=nova
 password=XYZ

 [auth-libvirt-localhost]
 credentials=nova
 EOF

Finally just restart libvirtd and nova compute services

Change-Id: I011b406e54728a01eb90a7851ae2b1f536674197
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Add and fix tests for attaching volumes.

Change-Id: I94ecd429266823369be6fd168256e9f3a1cd5287
Merge "delete a module never used"
Merge "Adds get_available_resource to hyperv driver"
Merge "Nail the pip requirement at 1.1."
Merge "Handle missing 'provider_location' in rm_export."
Add documentation for scheduler filters scope

Add documentation for bug 1039386

Fix other devref typos

Change-Id: Ife19ee5feb72dd75b91a03c4167d8f4e578a4a04
Make size optional when creating a volume from a snapshot.

This patch makes the field optional, defaulting to the same
size as the snapshot (and therefore the origination volume).

Mirror of change I3fea7fe1c0415d10e549c66a242cf2a336a7204e from
Cinder.

Change-Id: I940a048ecf8a7b8212fa4945e3aadf2de8176554
Signed-off-by: Matthew Treinish <treinish@linux.vnet.ibm.com>
Merge "Add and fix tests for attaching volumes."
Fix flavor deletion when there is a deleted flavor

If there is a deleted flavor with the same ID as an undeleted flavor,
the flavormanage delete code attempts to delete it again, which fails.
This patch makes sure to pass read_deleted='no' when the flavor is
retrieved for deletion so we get the undeleted flavor. Includes a
failing test to make sure the value is passed properly.

Fixes bug 1048678

Change-Id: If6a20de2526b7ba90ada4a40317a98f79b2141dc