Only return the total from du rather than
a full listing.
The parsing code here expects du's output to
only be one line.
Closes-Bug: #1781276
Change-Id: Id398ad1ce3f30ccc029bfcfb1663654946d42c91
There was a few places where we were shelling out
to mkdir instead of just calling the built in python
implementation.
Change-Id: I6f232f81e36dc750e064af6047c137a3bccbdc0a
Signed-off-by: Chuck Short <chucks@redhat.com>
Remove the 'blockdev' command from the volume.filters since
the block-device driver has been deprecated since 2016.
Change-Id: Ifb554898287b139d6ec07f73b012509b7d59c005
Signed-off-by: Chuck Short <chucks@redhat.com>
The 'dmsetup' command is not being used anywhere so remove it
from the volume.filters.
Change-Id: I0619713c5159cf8988804f1949346e238f09445f
Signed-off-by: Chuck Short <chucks@redhat.com>
The 'mkdir' command was not being used anywhere
so remove it.
Change-Id: Ib0894a606df78112a86d444339db4bb5df81110b
Signed-off-by: Chuck Short <chucks@redhat.com>
Now that we have privsep support in cinder,
we can start using privsep in various drivers
so we can drop rootwrap support.
Change-Id: I3cff61b4cde16e00ad23d534c5281a2f1afcd29f
Signed-off-by: Chuck Short <chucks@redhat.com>
In terminate_connection method, if the host can't be found in the
storage and the lun type is non-replication, driver will log an error
instead of raising an exception and the return value should be
lowercase.
Change-Id: Idf4e9b966a1b0f9154ca600e088ceb6929a1fb0e
Closes-Bug: 1776227
If the pools defined in the config file but these can't be queried
from the storage. The driver should catch this exception and ignore
it to support the Report Backend status feature.
Change-Id: I8d77b9b172df963063b38ccbd32e805dd7db1e00
Closes-Bug: 1780095
The Automatic thin-provisioning/oversubscription ratio section
incorrectly defines the default value.
Rewrite section to be correct.
Change-Id: I3e84e54eb5cd9eb81604740732ea2d717a7e25e9
Closes-Bug: 1779911
create_child method was deprecated in favor of create_snapshot
in infinisdk package. This is an internal change and should have
no customer impact.
Change-Id: I1e89dd2324a6fcd05e2c5336bb0816abf7c5ca2e
Since the default get_backup_device method doesn't
return enough Ceph connection information, RBD
incremental backup will fail, resulting in full backups
being performed when an incremental is requested.
Closes-Bug: #1578036
Co-Author: Gorka Eguileor <geguileo@redhat.com>
Change-Id: I41d1ec84db58f4bf0f7362cec022f2c3380e5ee2
The parameters 'cinder_id', 'reason_not_safe', 'extra_info' can be None,
but are required in the response body of listing detail of managable
volumes or snapshots.
Change-Id: Iade148d2afeaae486aab4dc789d52e9522f206ee
When volume is created via restoring backup action, the volume
status would change into 'restoring-backup' from 'creating', this
state change would confusing end user. This patch updates this
and keep volume status in 'creating' when creating.
Change-Id: I82d741ea8278de75ed817379b0a04f1f919a27c7
This patch adds the ability to get manageable snapshots to RBD driver.
Partial-Implements: blueprint ceph-list-manageable-volumes-and-snapshots
Change-Id: I2f979f445aeb2664c93c6810dcf2e82aed92a8cf
Since Nova had deprecated the iscsi_use_multipath option, we should
updates the config docs for this change.
Change-Id: I320c6a7481978976394403edde6e9e85174d3b36
The converted time differs via different timezones, this patch replace
the expected value with 'mock.ANY' to avoid testcase failure.
Change-Id: Ifb778dd9d418e9a638a385db585add55698d7e21
Currently, NEC driver does not reuse iSCSI LUNs of detached volumes.
The driver always use the LUN of (max(LUNs used) + 1) to attach
a volume.
If multi-target mode of NEC Storage is enabled, the driver works
without the problem because only LUN0s are used in the multi-target
mode.
This patch changes the using LUN to min(LUNs not used) for reusing
a LUN of detached volume with multi-target mode disabled.
Change-Id: I067cb09928c4c9d4ebb7159950fff526ee70f1bb
Closes-Bug: #1778669
When deleting a volume, always use the admin context to fetch the
admin_metadata that indicates whether it's a temporary volume.
This fixes a bug where a non-admin user failed to retrieve the
admin_metadata, which caused the volume to not be treated as temporary.
This, in turn, caused quota usage to be incorrectly updated.
Closes-Bug: #1778774
Change-Id: I8e6b0c726dc6498b28795a1ea0520ef05e53f047