Joel Coffman [Tue, 30 Jul 2013 14:06:28 +0000 (10:06 -0400)]
Create key manager interface
This interface provides a thin wrapper around an underlying key
management implementation such as Barbican or a KMIP server. The key
manager interface is used by the volume encryption code to retrieve
keys for volumes.
This change is a copy-paste of the key manager interface accepted by
Nova. The major modifications are to the module imports (i.e.,
nova -> cinder).
Michael Kerrin [Tue, 23 Jul 2013 09:49:57 +0000 (09:49 +0000)]
Create volume from snapshot must be in the same AZ as snapshot
This issue and patch also apply to cloning volumes.
When creating a volume from a snapshot we need to pick the
availability zone of the snapshot's source volume. This patch
goes further and enforces that the new volume must be in the same
AZ as the snapshot. It raises an user error if the user tries
to create a volume in a different AZ to the snapshot.
This is enforced across all drivers because creating a volume from
a snapshot is implemented in the drivers and not all drivers are
guaranteed to support creating a volume from snapshot is a foreign
AZ. More to point if you don't support create a volume like this,
and we allow this then you can create volumes and instances that
get stuck in some weird states that require a support call to fix.
If you do support cross AZ functionality then you can override
the enforcement of that cloned volumes most be in the same AZ
as their source via the 'cloned_volume_same_az' option.
John Griffith [Fri, 19 Jul 2013 00:30:36 +0000 (18:30 -0600)]
Fix unit suffix and add no_suffix option.
In Cinder we've been using gibibytes, however
we have code in some places using Gigabytes, the brick
LVM code was one of those places.
This change sets the default suffix to gibibytes/mibibytes (1024 based)
and also provides an option to omit the suffix from the response now
that we can say that we're consistent in what is expected.
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.
Avishay Traeger [Tue, 18 Jun 2013 18:53:15 +0000 (21:53 +0300)]
Migration for detached volumes with no snaps.
Implementation of volume migration for detached volumes with no
snapshots. Migration is initiated by an admin API. The scheduler
confirms that the specified destination host can accept the volume.
The source driver is given the opportunity to migrate the volume on
their own. Otherwise, a new volume is created on the destination, both
volumes are attached, the data is copied over, the volumes are
detached, the source is deleted, and the destination is renamed. In
the database, the destination volume's attributes are copied to the
source so that the volume-id remains unchanged, and the destination
volume row is deleted.
DocImpact
Implements: bp volume-migration
Change-Id: Ib6fcf27051f45e60aa3ba5f599e88c1421db753e
get_snapshot should populate the snapshot metadata
Update the query in db api snapshot_get() to join with the table
snapshot_metadata, so that snapshot metadata is returned. This makes the
api snapshot_get() function in the same way as volume_get().
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 "_"