Kurt Martin [Fri, 2 Aug 2013 22:06:31 +0000 (15:06 -0700)]
Add new persona value in the 3PAR driver
A new persona type, '12 - OpenVMS' was added to the list of valid
personas in the 3PAR drivers. This persona was introduced in the
3.1.2 MU2 firmware update on the 3PAR storage array.
Roman Podolyaka [Wed, 24 Jul 2013 14:13:07 +0000 (17:13 +0300)]
Call get_session() only when necessary
A Session instance should be retrieved only when it's
really needed, e. g. to make a few DB queries inside a
single transaction or to pass the session to a private
DB API method, etc. At the same time, many queries are
simple and can be expressed by the means of auxiliary
model_query() function.
Roman Podolyaka [Wed, 24 Jul 2013 13:37:48 +0000 (16:37 +0300)]
Fix volume_create()/snapshot_create() DB methods
volume_create() and snapshot_create() DB API methods create
entities and return information about them by calling
_volume_get() and snapshot_get() methods. There is no need
to create a new transaction to call the corresponding 'getter'.
Unfortunately, fixing this breaks two existing tests, which rely
on the current behaviour of these DB API methods: both volume_create()
and snapshot_create() raise exceptions, nevertheless new entities are
created.
Roman Podolyaka [Mon, 22 Jul 2013 15:27:51 +0000 (18:27 +0300)]
Execute DB API methods in a single transaction
Many DB API methods do a few queries to a DB (e. g. SELECT
and then UPDATE, or SELECT and then DELETE, etc). By default,
a Session instance is used with autocommit=True, which means,
that each query to a DB is done in a separate transaction. This
is error-prone (as it may lead to race conditions or returning
of unexpected results) and makes rollbacks harder (if one of
transactions fail, the previous ones can not be rolled back).
This patch ensures that all DB API methods, which do a few
queries (or call private DB API methods), are executed inside
a single transaction.
Pop out 'offset' and 'limit' before use for filter
In previous code of _items() from api/v{1,2}/snapshots.py,
and also the _items)_ from api/v1/volume.py.we didn't pop
out the 'offset' and 'limit' fields from HTTP get params
before we use such params for filter.This is the root cause
for bug #1205956
For non-admin user, since 'offset' and 'limit' is not in the
allowed_search_options, so the volumes.remove_invalid_options
will help to filter them out. As a result, it walks around this
bug.
But for admin user,the volumes.remove_invalid_options will not
try to filter the search_options.So for admin user, the 'limit'
will appear in search_options, then obviously get no result.
Roman Podolyaka [Fri, 26 Jul 2013 15:44:19 +0000 (18:44 +0300)]
Fix running of migrations tests by Jenkins gate
DB schema migrations tests are always skipped for MySQL
and PostgreSQL backends, when running gate jobs. This is
due to the bug in the function, which checks, if given DB
backend is available.
Update Cinder rootwrap to the latest from oslo-incubator. This allows
to import the latest filters and bugfixes, in preparation for the
havana release.
All the changes are coming directly from the Oslo "rootwrap" module
sync.
Make unicode-to-utf8 conversion universal in ceph backup driver.
librbd does not like unicode strings. A patch was
recently applied (c98cf2d8) to make all config
values utf8 but there are other areas of the ceph
backup driver where this also applies. This patch
adds a new method which converts strings to utf8
and replaces all relevant uses of str() with this
new conversion.
John Griffith [Mon, 29 Jul 2013 15:11:35 +0000 (09:11 -0600)]
Add more info to delete error message.
Our cases for what we allow delete on are limited, this is
fine, however we should log the status of a volume that we
are unable to delete so there's some feed-back as to exactly
why the delete call failed.
Tom Fifield [Sun, 28 Jul 2013 19:07:49 +0000 (12:07 -0700)]
Update references with new Mailing List location
Yesterday, openstack@lists.launchpad.org was migrated with
all users to openstack@list.openstack.org.
This patch updates references to the old mailing list with the
new, to ensure that people encountering them don't accidentally
try and join the old list!
Currently the brick code raises exceptions if it cannot determine the
initiator name or FC HBA information. This patch makes this information
optional, as Nova does.
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.
Michael Kerrin [Mon, 22 Jul 2013 13:35:37 +0000 (13:35 +0000)]
Fix oslo.config.cfg.NoSuchOptError when running individual tests
We need to import cinder.common.config wherever we are using an olso
configuration option from this module. Otherwise it is not necessarily
the case that olso knows about the option and it complains.
cinder.tests imports this configuration module but it not the case that
this module has been imported when you you are running individual tests.
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.