Storwize/SVC: Use VolumeDriver's copy vol<->image.
Inherit the VolumeDriver copy volume<->image functions. This patch also
creates a new SanDriver class which is protocol-agnostic, and leaves
the SanISCSIDriver class for drivers that wish to use it.
Mike Perez [Tue, 23 Jul 2013 21:58:06 +0000 (14:58 -0700)]
Adding driver minimum features and volume stats to dev doc
This is a first pass in getting information out of the wiki and into the
dev docs, so changes can be reviewed properly as discussed at the Havana
summit.
Bill Owen [Mon, 22 Jul 2013 00:35:50 +0000 (17:35 -0700)]
GPFS convert glance image to raw only when needed
Modify _gpfs_fetch_to_raw to check image format. If already in raw
format, no need to call convert_image. In that case, simply rename
to destination name.
John Griffith [Fri, 19 Jul 2013 23:05:55 +0000 (17:05 -0600)]
Add create & attach times to SolidFire attributes.
This change simply adds create_time and attach_time to
the SolidFire devices attributes.
Times are taken from the volume-ref object, attach_time
is only set/present after an attach, and is also removed
from the attributes list on a detach.
This also required that we actually set attach_time on the
volume in the db. We have the column, but we weren't actually
setting it, so this change required that be fixed.
In the future we should also look at changing the attach_time
from a string to a proper date-time object.
This implements the extend volume functionality for the Storwize/SVC
driver. Extending volumes with snapshots is not supported, as this
will require converting the snapshots into full copies, which will eat
up free space.
Kurt Martin [Thu, 18 Jul 2013 17:56:21 +0000 (10:56 -0700)]
3PAR Driver modifications to support QOS
Currently, the OpenStack HP 3PAR Fibre Channel (FC) and iSCSI Drivers
do not support Quality of Service (QoS) extra specs. The QoS settings
added in this patch include;
• maximum MB/second (maxBWS)
• maximum IO/second (maxIOPS)
These new extra specs will be scoped keys, the scoping will be
qos:maxBWS and qos:maxIOPS. A new key hp3par:vvs was also
added to allow the admin to predefine QOS settings on a 3PAR
virtual volume set and any volume created would be added
to that predefined volume set.
The 3PAR storage arrays set these values on virtual volume sets,
not the actual volume. So the change includes creating a virtual
volume set with these settings and then adding the volume to the
volume set.
1. Max IO/S & Max MB/S are not QoS guarantees
2. These are per volume maximums which the 3PAR is guaranteed
not to exceed.
3. Settings these values does not guarantee these performance
rates will be achievable
Moved to using brick to get connector info and fixed a small bug to get
tests working on real storage again. Also fixed up simulator to handle
the multihostmap case properly.
There are several copy-pastes of running dd, so moved the most
correct one (LVM) to volume/utils.py, and also updated
BlockDeviceDriver to use it. Other drivers (e.g., NFS, GPFS, Scality)
should be updated as well. Volume migration for detached volumes
is a future use case.
When a volume is deleted all rows in the volume_metadata table for that
volume are deleted as part of the database operation. This patch updates
the snapshot delete operation to delete corresponding rows in the
snapshot_metadata table.
If the async call to the manager/driver failed, the API still updated
the quota and volume size in the DB. Solution is to move these tasks
down to the manager, where we know if the extend succeeded.
Fixes race condition in LVMVolumeDriver create_cloned_volume method
When we create a clone volume, LVMVolumeDriver will firstly create a temp
snapshot for copying, the temp snapshot name is
"clone-snap-%s" % source_volume['id']. When we create multiple clone volumes
of the same volume simultaneously, which would trigger the race issuse.
I changes the temp snapshot name template to "clone-snap-%s" % volume['id'],
so temp snapshot name will be unique.
This patch adds the required code to do
Fibre Channel attach and detaches of volumes.
This code has been pulled over from Nova's
implementation of FC attach/detach.
Also adds a new driver config entry to enable
multipath support for iSCSI and FC attaches
during volume to image and image
to volume transfers.
John Griffith [Wed, 17 Jul 2013 00:27:19 +0000 (18:27 -0600)]
Increase timeout period for clone volume.
Current timeout value for clone volume in the
SolidFire driver is 20 seconds, this is fine
in many cases however there seems to be a
number of customers doing clones of
volumes >= 400G.
A populated 400G volume is taking upwards of
35 seconds to clone in some cases resulting in failure.
There's no reason not to bump this timeout value up
significantly to a worst case scenario (ie multi-terrabyte volume).
John Griffith [Fri, 12 Jul 2013 23:43:27 +0000 (17:43 -0600)]
Be sure to check deleted types on quota update.
If a volume-type is deleted, and later a volume
that's assigned that type is deleted the quota
update will fail and result in a trace for
VolumeTypeNotFound exception.
The volume is succesfully deleted, however the
quota information for the volume-type let alone
the other quota items for the volume are not
updated.
Jim Branen [Wed, 10 Jul 2013 19:34:09 +0000 (12:34 -0700)]
Adds multiple iSCSI port support to 3PAR
Added support to the 3PAR iSCSI OpenStack driver to provide the
ability to select the best fit target iSCSI port from a list of
candidate ports. The first time a volume is attached to a host,
all iSCSI ports configured for driver selection, are examined for
best fit. The port with the least active volumes attached will
then be selected as the path to the 3PAR array. Any subsequent
volume attach, to the same host, will use the established target
port.
In the swift driver the three methods prepare_nbackup, backup_chunk
and finalize_backup are used internally in the class only and are
not meant to be used from outside. Thus marked with prefix "_"
John Griffith [Mon, 15 Jul 2013 21:16:25 +0000 (15:16 -0600)]
Catch additional connect fail cases.
When fixing bug/1195910, some other failure
cases weren't considered (ie not authorized,
unreachable dest etc).
We should fix this up to handle the various
connection error states accordingly and also
add some hints to the log output to help
determine where to look in case of failure.
Jay S. Bryant [Wed, 19 Jun 2013 19:52:41 +0000 (14:52 -0500)]
Add flag argument to 'cinder-manage config list'
Unlike other cinder-manage 'list' commands the 'config list'
option doesn't allow users to specify a filter to limit
the output. This commit adds the ability to specify
the flag the user wishes to display.
If no flag is specified the default behavior is still to
display all the configured flags. If the flag requested
is not found, cinder-manage reports that the flag was not
found.
Mike Perez [Mon, 15 Jul 2013 01:48:54 +0000 (18:48 -0700)]
Use base ISCSI driver to fulfill some driver requirements
Cinder has a list of minimum features that must be implemented by each
driver. This uses the copy_volume_to_image and copy_image_to_volume
implementation from the base ISCSI class. Also use the base for raising
NotImplementedError. This touches the Nexenta and Zadara driver.
Joe Gordon [Fri, 12 Jul 2013 15:47:01 +0000 (16:47 +0100)]
Cleanup and make HACKING.rst DRYer
Reference the OpenStack hacking guide in HACKING.rst and remove
duplicate entries. Add placeholder section for cinder specific rules.
cinder specific rules can be created using hacking's local check
support.
Clone_image should return dict of vol properties, clone status.
The method will work fine in case of drivers not dependent
on volume properties like provider_location. It will fail to
restart in case of nfs drivers and also leave volume created as
result of clone_image functionality created in the
nfs share in dangling state after deletion as provider_location
is None. This fix requires dict of volume properties, cloned status
to be returned which facilitates passing back provider_location
in case of nfs drivers and hence resolves the issue.