Remove rootwrap module

We use oslo.rootwrap now.

Change-Id: I4534ed17499909287df3707441c4a69e35ac509b
Add keyword argument missing at some exc.HTTPError subclass

Some exc.HTTPError subclass needs keyword argument ``explanation``.
If there is no ``explanation=``, the message of the argument is
recognized as ``detail``.

Change-Id: Idfc07b2bd71da31e44212d3296921e18d2024a63
Closes-Bug: #1264424
I/O rate limit for volume copy with dd

Currently, volume copy operations consumes disk I/O bandwidth heavily and
may slow down the other guest instances. This patch limits bandwidth for
volume copy to mitigate interference to other instance performance.

In this implementation, 'dd' is put in a blkio cgroup for throttling,
when CONF.volume_copy_bps_limit is set to non-zero.

Change-Id: I32347d2e28842725207a1b3afac7fe137a3fd3b4
Signed-off-by: Tomoki Sekiyama <tomoki.sekiyama@hds.com>
Implements: blueprint limit-volume-copy-bandwidth
I/O rate limit for volume copy with qemu-img convert

Currently, volume copy operations consumes disk I/O bandwidth heavily and
may slow down the other guest instances. This patch limits bandwidth for
volume copy to mitigate interference to other instance performance.

In this implementation, 'qemu-img' is put in a blkio cgroup for throttling,
when CONF.volume_copy_bps_limit is set to non-zero.

Change-Id: I8403d4bcafc4279654034da97aa9b6c097f9e649
Signed-off-by: Tomoki Sekiyama <tomoki.sekiyama@hds.com>
Implements: blueprint limit-volume-copy-bandwidth
Adding filter options to backup list

This patch adds filter options to backup list.
Like cinder list, now cinder backup-list accept
parameters.
This blueprint is complimented with the client part

https://blueprints.launchpad.net/python-cinderclient
/+spec/add-filter-options-to-backup-list

blueprint: add-filter-options-to-backup-list

DocImpact
Change-Id: I9e095ee44a03744eb3f319323d9130a89196614e
Fixes cinder volume from image on Windows

When creating a volume from an image, after the volume is created,
qemu-img is supposed to copy the downloaded image to the volume.
This fails as the disk is enabled and is not accessible.

Also, Windows does not support using dynamic vhds as iSCSI disks
and as qemu-img cannot create fixed vhd images, there must be an
intermediate conversion before importing the disk.

In order to be able to modify an iSCSI disk, it must be disabled
first.

Closes-Bug: #1300906

Change-Id: I726b23287c5b710227288d6215538f01dfb0f979
Fixes cinder volume create on Windows Server 2012 R2

Windows Server 2012 R2 does not support vhd images as iSCSI disks,
requiring VHDX images. For this reason, the cinder driver fails to
create volumes. For the moment, the default format is vhd.
On WSS 2012 R2, we should use vhdx images as default.

This patch introduces vhd/vhdx related methods for both v1 and v2
wmi virtualization namespaces.

Closes-Bug: #1299150
Change-Id: I272988dc5b0e3b8129c5e4d3c79bea1c292701c8
Fixes cinder volume from snapshot on Windows

When creating a volume from a snapshot on Windows, a shadow copy
volume is exported as an iSCSI disk. The issue is that this export
is readonly and cannot be mounted to instances.

As this export cannot be modified, to make the new volume usable,
the according image must be moved to a new path and imported .

Closes-Bug: #1306032

Change-Id: I3a936d30fdd7875059dc56c2681f453757c2605f
Fix retyping attached volumes requiring migration

Modifies retype method so that volume db entry only updated if the
volume isn't migrated.

The migrate_volume_completion method is made responsible for detaching
the old volume and attaching the new one. This takes the requirement
from nova because the calls need to be done in a certain order which
isn't guaranteed when performed by nova.

attach_volume now marks the migration_status as complete because it is
the final action by cinder.

Change-Id: Ia15636893be4f0077a4f75e746a8ab1a8798c44b
Partial-Bug: 1316079
Minor cleanups in test_volume

Fix incorrect parameter order for mock decorators.  This
just happened to work because they were used in the same way
in test_reserve_volume_success().

Remove incorrect comments.  These seem to mix up 'error' versus
'error_deleting' for expected states -- but the assertEqual args
are sufficiently explanatory by themselves.

Change-Id: I763265b8365d3b2fcece94b14639a1bed7b6a848
Remove check_volume_az_zone functor and associated passing

To make it easier to understand why a volume is being rejected
when its availability zone is not allowed remove the functor
that does this check and use the set of valid availability zones
as the master list of valid zones that can be used (and use this
inside the task that validates this data).

Change-Id: Ib8462dbbbc33242edbbf02a7c737746d3142d043
Make rbd driver string encoding checks consistent

All string checks should use strutils.safe_encode()

Closes-Bug: 1333446
Change-Id: I56c9ccbcedd34c83793620561da17c47cb5f551c
Fixed data copy issue of volume/driver.py

I found data copy issue on __init__ of ISERDriver class.
Some settings for iser should be copied to iscsi's.
But iser_port value was copied not to iscsi_port but to iser_port.
This patch will fix this issue as to be copied to iscsi_port.

Change-Id: I7621e690396049aabf3ced331e633158f45067f4
Merge "Make rbd driver string encoding checks consistent"
Merge "Fixes cinder volume from image on Windows"
Merge "Remove check_volume_az_zone functor and associated passing"
GlusterFS: Handle deletion of snapshot with no backing file

If a glusterfs volume is in-use, nova is called to delete a
volume snapshot.  It is possible for a timeout to occur, since
cinder is polling for nova task progress.  In such case, a
GlusterfsException is thrown, but nova continues to process the
snapshot delete and commits the changes.  Cinder is not aware of
this, and the actual snapshot entry in cinder is prevented from
being deleted, since no backing file exists for the out-of-sync
snapshot.  This patch allows a snapshot with no backing file to
be deleted from cinder and updates the volume info file.

Change-Id: I83c8a7242199edbfd1897297589ac7deb42c5865
Closes-Bug: #1311182
Merge "GlusterFS: Handle deletion of snapshot with no backing file"
Merge "Fixed data copy issue of volume/driver.py"
Fix BrcdFCSANlookupService to iterate multiple switches.

Changed close_connection to client.close_connection.
Fixed return map to key on fabric name instead of principal switch wwn.

Closes-Bug: 1303460
Change-Id: I3725c16cd416a028b85ac8ac6c0d895fd6900763