Nikesh [Wed, 13 Jan 2016 13:39:33 +0000 (19:09 +0530)]
Add cinder backup driver for Google Cloud Storage
Implement cinder backup driver for Google Cloud Storage.
It supports:
- creating backup which is stored on Google Cloud Storage
- restoring backup from Google cloud storage
- incremental backup
- independent of any volume backend
Marc Koderer [Mon, 18 Jan 2016 07:11:16 +0000 (08:11 +0100)]
Activate sparse copy for Netapp
Activating sparse copy of files since using
"volume migration" or "retype" the size of the resulting
file is larger than before. Due to the reason that the
sparse blocks in the file are copied over completely. This
is inefficient performance wise and wastes space on the
storage itself.
Yusuke Hayashi [Wed, 6 Jan 2016 08:02:54 +0000 (17:02 +0900)]
Add Fujitsu ETERNUS DX Volume Driver (FC part)
As I explained in my blueprint,
this patch completes Fujitsu ETERNUS DX Volume Driver.
Fujitsu ETERNUS DX Volume Driver consists of two parts, iSCSI and FC.
The iSCSI part [1] had been reviewed and
thanks to the nice reviews, it's merged.
The iSCSI and FC parts have a lot of common codes,
and all the common codes are included in the iSCSI part.
Thelo Gaultier [Fri, 4 Dec 2015 07:29:44 +0000 (15:29 +0800)]
ITRI DISCO cinder driver
This commit adds a Cinder volume driver for ITRI DISCO product.
The DISCO driver supports the following features:
* Volume Create/Delete
* Volume Attach/Detach
* Snapshot Create/Delete
* Create Volume from Snapshot
* Get Volume Stats
* Copy Image to Volume
* Copy Volume to Image
* Clone Volume
* Extend volume
Implements: blueprint disco-driver-cinder
This patchset also includes the unit tests.
New config options for the cinder driver were also added.
related nova patchset : https://review.openstack.org/253353
related os_brick patchset : https://review.openstack.org/253352
Ankit Agrawal [Fri, 15 Jan 2016 09:56:56 +0000 (01:56 -0800)]
Python 3: Replace reduce and xrange with six.moves
1. Builtin function 'reduce' in Python 2 has been moved to standard
library module in Python 3 [1]. To make code compatible, replaced
reduce(expr) with six.moves.reduce(expr).
2. xrange is renamed to range in Python 3, replaced it with
six.moves.range
3. Added __bool__() method in FeatureState class to make it python 3
compatible because Python 3 calls the __bool__() method instead of
__nonzero__ when evaluating an instance in a boolean context.
4. Added this test case to tests-py3.txt.
In the case where a LUN is extended beyond it's supported geometry,
a new LUN must be created and only the used blocks should be copied
to the new LUN. Currently, we do not pass the block count, source
block, and destination block information. This causes the extend to
fail.
Lucian Petrut [Wed, 14 Oct 2015 12:40:00 +0000 (15:40 +0300)]
Refactor Windows drivers using os-win
A common library abstracting Windows specific operations has been
created in order to remove duplicated code among OpenStack projects,
also being easier to maintain.
This patch refactors Windows drivers, leveraging the os-win library.
The Windows iSCSI driver unit tests needed to be updated, for which
reason those where rewritten using mock.
Gorka Eguileor [Thu, 14 Jan 2016 14:35:15 +0000 (15:35 +0100)]
Fix ChunkedBackupDriver _create_container
Current _create_container method in ChunkedBackupDriver is not behaving
as expected.
According to update_container_name docstring the method should return
None if the container name that comes in to the driver is to be used,
but code was using backup_default_container instead.
Also, if None is returned by update_container_name the logging will
report that it will be using None instead of the name that it will be
really using.
If update_container_name returns the same value we already have in the
DB, driver will unnecessarily update the DB.
Patrick East [Tue, 12 Jan 2016 18:22:18 +0000 (10:22 -0800)]
Remove DB calls from Pure Volume Driver CG methods
After the updates to the CG API’s to pass in the objects we didn’t need
to call the DB anymore. This finally fixes that issue and updates to
return the actual database updates.
Alex O'Rourke [Mon, 23 Nov 2015 18:43:13 +0000 (10:43 -0800)]
LeftHand: Implement v2 replication (managed)
This patch implements the managed side of v2 replication in the HPE
LeftHand driver.
At this time, only periodic mode is supported with LeftHand arrays.
extra_spec value 'replication:sync_period' will specify the sync period
for the volume type. If it is not provided, it will be defaulted to 1800
seconds, or 30 minutes. 'replication:retention_count' determines how
many snapshots will be kept on the primary system. The maximum is 50,
and if the value is not specified, it defaults to 5.
'replication:remote_retention_count' determines how many snapshots will
be kept on the secondary system. The maximum is 50, and if the value is
not specified, it defaults to 5.
cinder.conf should have the replication config group (lefthandrep)
and at least one other target group (lefthand) as such:
Chris Morrell [Thu, 7 Jan 2016 23:06:22 +0000 (23:06 +0000)]
Enable trim/discard in SolidFire's driver
Pretty straight forward change to set a flag in the connection info
returned from initialize_connection. This change will work pending
upcoming Nova code reviews, as trim/discard support has been supported
by SolidFire since its inception.
Followed the Cinder Liberty spec titled
'cinder-backend-report-discard' for this change.
Sheel Rana [Mon, 11 Jan 2016 20:06:46 +0000 (01:36 +0530)]
Handling Invalid argument iflag=direct in dd
During volume/snapshot create/delete operations,
dd command is used to clear contents of disk.
Before invoking dd, it is checked if iflag=direct
supports dd or not by executing dd command with
iflag=direct and if=/dev/zero combination.
But this always results in invalid argument
error.
Handling for this argument is done to eliminate
unnecessary call to dd command when it is used
with iflag=direct and if=/dev/zero combination
to check if this argument supports dd or not.
Tom Patzig [Mon, 11 Jan 2016 19:55:01 +0000 (20:55 +0100)]
Execute mount.nfs check as root
Currently the existence of 'mount.nfs' is checked with a
non-root user, in this case cinder. This results, for example on SUSE,
in the error:
NfsException: mount.nfs is not installed
Because mount.nfs is located under /sbin, unprivileged users do not
have /sbin in their PATH to search for executables.
This change switches the parameter run_as_root to true, to find
the binary in privileged directories, as well.
Sean McGinnis [Fri, 8 Jan 2016 14:43:35 +0000 (08:43 -0600)]
Report discard support for Dell SC connections
Add reporting of discard in the properties returned from
initialize_connection. Dell SC arrays support trim/discard
with no special configuration needed, so this can always
be set to true.
Slade Baumann [Mon, 28 Dec 2015 16:44:34 +0000 (10:44 -0600)]
Add ConsistencyGroupStatus enum field
This change adds a new enum and field, ConsistencyGroupStatus and
ConsistencyGroupStatusField, that will hold the constants for the
'status' field of the ConsistencyGroup object. This enum and field
are based off the base oslo.versionedobjects enum and field. This
also changes over the ConsistencyGroup object to use the new field
(and bumps the version so newer versions know to enforce
valid values). Finally, all uses of strings for comparison and
assignment to this field are changed over to use the constants
defined within the enum.
Change-Id: Icee2727f0a550541876c63b6e7340acf3de553c8
Implements: bp cinder-object-fields
Anthony Lee [Tue, 22 Dec 2015 21:57:37 +0000 (13:57 -0800)]
3PAR: Adding volume checks to manage snapshot API
Updated the checks in the HPE 3PAR manage snapshot API to use
the volume object for comparison. Also added new checks to
prevent un/managing of snapshots from/to volumes that have a
status of 'failed-over' for replication status.
This is a follow-up patch for:
https://review.openstack.org/#/c/253760/
Thang Pham [Tue, 15 Dec 2015 00:19:24 +0000 (16:19 -0800)]
Add finish_volume_migration to volume object
The following patch adds finish_volume_migration() to
the volume object, so it could be used by
migrate_volume_completion() in cinder/volume/manager.py
to properly delete the destination volume on failure.
It also optimizes the call to finish_volume_migration
by using the existing volume objects instead of
performing additional volume lookups.
The 6000 series of arrays are no longer supported. They are now replaced
by the more recent 7000 series of arrays. Therefore, the 6000 drivers
are removed from here to free up the much needed CI resources.
Tom Swanson [Thu, 12 Nov 2015 21:09:55 +0000 (15:09 -0600)]
Dell SC: Implements Replication V2
This patch implements cinder Replication version 2 in the
Dell Storage Center Cinder driver.
Adds the check_result function to standardize the logging of
Dell SC Rest API errors.
Updated all todos to TODOs.
Updated all exceptions to standard formatting. (data=msg,
reason=msg, etc.)
Added support for replicating the active replay. This is
via extra spec replication:activereplay. Replication only
replicates the most current replay. Replicating the active
replay means that the destination will be as current as
possible.
Added support for replay profiles. This is via the extra
spec storagetype:replayprofiles. Currently replication profiles
are specified by the user preferences. These can now be set
by extra spec which means by volume type.
Chris Morrell [Fri, 18 Dec 2015 21:52:47 +0000 (21:52 +0000)]
Enable consisgroups in SolidFire driver
This patch enables Consistency Group support in the SolidFire driver.
SolidFire group snapshots are what is used to provide consistent
snapshots on the backend.
A variety of helpers were used to wrap the API requests, meanwhile
other helpers were utilized to jump through the necessary hoops to
adopt the SolidFire API/group snapshots for use in consistency groups.
Because the SolidFire array does not create logical groupings of
volumes as consistency groups, there are a lot of no-ops used to
satisfy the necessary Cinder functions as specified in driver.py.
In-line comments attempt to clarify this. In short, a lot of searching
is needed to create consistency groups on the fly per request.
Sheel Rana [Wed, 6 Jan 2016 09:17:19 +0000 (14:47 +0530)]
Constant defined for sqlAlchemy VARCHAR & INTEGER
sqlalchemy.types.VARCHAR and sqlalchemy.types.INTEGER are defined
and used as VARCHAR_TYPE and INTEGER_TYPE respectively in
cinder/tests/unit/test_migrations.py.
Alex O'Rourke [Mon, 4 Jan 2016 21:03:52 +0000 (13:03 -0800)]
Change minimum 3PAR API version for replication
Currently, the primary and all secondary 3PAR arrays must have an API
version of 1.4.2 or higher and all be on the same version. This is
changed to require version 1.5.0 or higher and does not force all
arrays to be on the same version.
Alex O'Rourke [Mon, 4 Jan 2016 17:06:10 +0000 (09:06 -0800)]
Optimize 3PAR array ID retrieval
Currently, we are making a call to the 3PAR array every time the
common driver is initialized, which is inefficient considering the
call is already made in get_volume_stats. Instead of making the call
every time, we can pass in the driver stats to common's do_setup and
use the array ID from there.
If the stats are not yet available, we will ask the array directly for
the ID.
Michał Dulko [Thu, 19 Nov 2015 18:36:27 +0000 (19:36 +0100)]
Add metadata aliases to Volume object
When writing Volume object we've renamed some fields from SQLAlchemy
model. This included volume_metadata (renamed to metadata) and
volume_admin_metadata (renamed to admin_metadata) and
volume_glance_metadata (recently added as glance_metadata). Some code
were relying on old names. As right now we're in the transitional phase
it's hard to tell if driver method will get versioned object or old
SQLAlchemy object.
To mitigate that and mimic old SQLAlchemy object behavior on versioned
object we should add properties to serve as aliases for older names.
This commit also fixes the tests for EMC VNX that were blocking the
patch. Tests were setting volume_metadata property on volume object,
which actually had no effect without this patch.
Another thing done is moving overriding __contains__ from
CinderObjectDictCompat to CinderObject class to solve MRO issue because
both of these classes were defining __contains__ method.
wanghao [Fri, 25 Dec 2015 09:08:20 +0000 (17:08 +0800)]
Add pagination support to volume type
In Liberty release, we have added pagination to backups
and snapshot. There are still some work that hasn't been
done yet.
This patch add pagination support to volume type.
APIImpact
Add pagination agrs like limit, marker, sort to query
volume type.
David Sariel [Tue, 5 Jan 2016 08:37:42 +0000 (10:37 +0200)]
Re-enabled hacking checks for H105
Following the upgrade to hacking version 0.10.0 the H105 issues were
ignored. There was a note left in tox.ini to clean up the H105 issues
and to re-enable the check.
Updated tox.ini to re-enable the check of H105 and fixed corresponding
pep8 issues. This way Cinder aligns rows with Nova, Neutron, Glance etc
that have H105 enabled.
Patrick East [Mon, 4 Jan 2016 20:02:50 +0000 (12:02 -0800)]
Don’t log warnings for image cache when disabled
Right now we do a check for the internal tenant and log a warning before
we check to see if the cache is even turned on for that backend. We
should be only checking for the internal tenant if the image cache has
been configured for the backend.
In addition we shouldn’t log a warning for this since there is already
a warning for the internal context when we try and create it if it is
not configured correctly… to reduce the warning spam this change
switches the log message to an info level.
Ryan Rossiter [Fri, 11 Dec 2015 20:28:02 +0000 (20:28 +0000)]
Add BackupStatus enum field
This change adds a new enum and field, BackupStatus and
BackupStatusField, that will hold the constants for the 'status' field
of the Backup object. This enum and field are based off the base
oslo.versionedobjects enum and field. This also changes over the Backup
object to use the new field (and bumps the version so newer versions
know to enforce valid values). Finally, all uses of strings for
comparison and assignment to this field are changed over to use the
constants defined within the enum.
Change-Id: I3df71e361f2bd37417133a4c1189e37466ed0b56
Implements: bp cinder-object-fields