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 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
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
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
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
Use a task subclass instead of a functor + task wrapper

Instead of using a functor that activates the scheduler driver
instead incorporate and use a task subclass, this avoids the less
meaningful information that is presented when a functor is used
as well as allows for a more straightforward path for future
subclassing and derivations of work.

Change-Id: Ice66e109968c28f36156edf3dd47a89f94494bb8
Merge "I/O rate limit for volume copy with dd"
Merge "I/O rate limit for volume copy with qemu-img convert"
Merge "Minor cleanups in test_volume"
Add cgroups related commands to rootwrap filters

Adds rootwrap filters to allow commands to create/setup cgroups and
to put commands into cgroups in order to limit bandwidth usage,
that are used in setup_blkio_cgroup() (volume/utils.py).

Change-Id: Id74cdd4d2fdfffb12aff8cb3b977324bb5b45173
Signed-off-by: Tomoki Sekiyama <tomoki.sekiyama@hds.com>
Implements: blueprint limit-volume-copy-bandwidth
3PAR volume manage/unmanage support

HP 3PAR support for managing and unmanaging volumes.

Partially Implements: blueprint add-export-import-volumes
Change-Id: Ibb0c34eccad4f8bb028025d055d9a59c2a3a6204
Don't use ModelBase.save() inside of transaction

'with session.begin()' makes some operations in one transaction.
session.begin() returns a transaction instance, then does some operations,
and will commit or rollback automatically before leaving the block.
ModelBase.save() always submit a commit, and that is not expected.
When we get a persistent object from database, we just modify the
object inside of block 'with session.begin()' and sqlalchemy will
update it, don't need method session.add() or ModelBase.save().

Closes-Bug: #1224429
Change-Id: I4af58e98b2783d3945d92e57680d58e7ae356a67