Eric Harney [Wed, 13 Jan 2016 15:29:50 +0000 (10:29 -0500)]
Set LVM driver default overprovisioning ratio to 1.0
This introduces a config option, 'lvm_max_over_subscription_ratio',
which allows overriding the global max_over_subscription_ratio.
This is needed because the way we handle configuration with
multi-backend does not allow setting a value which will be applied
to each LVM backend without manually setting it in each backend,
and it would be better to default to a safe overprovisioning
ratio for the LVM driver. It is often used in smaller deployments
and POCs which may not have all of the capacity monitoring
infrastructure used with other drivers, so overprovisioning should
be an opt-in capability rather than opt-out.
Partial-Bug: #1472803
DocImpact: new config option lvm_max_over_subscription_ratio
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/
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.
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
Marc Koderer [Fri, 1 Jan 2016 19:03:45 +0000 (20:03 +0100)]
Fix issue with flake8 check and full paths
Currently hacking check_explicit_underscore_import is dependent
on a relative file path. A call of "flake8 ." works fine but
"flake8 $PWD" doesn't which shouldn't be any difference.
Michał Dulko [Thu, 31 Dec 2015 13:34:30 +0000 (14:34 +0100)]
Fix race conditions in migration 061
Migration 061 is supposed to add new `data_timestamp` field and populate
it with value of `created_at` column. This was done by selecting all the
backups and doing updates one-by-one. As it wasn't done in transaction
solution was prone to race condition when a new backup is added while
running the migration. This means that this migration could cause
problems when running in live environment. With blueprint
online-schema-upgrades we want to make Cinder able to perform migrations
live.
A solution is to change this statement to a single DB query which
updates all the rows. This commit also removes unnecessary update to
snapshot_id added there. As this column is nullable it will by default
be NULL, so there's no need to set it manually to that value.
As before and after this commit the migration does logically the same,
this should be safe even if someone is doing inter-release deployments.
An alternative would be to simply add transaction to the update step in
the migration, but that would effectively lock the table for longer
period of time than atomic one-query update.
Sheel Rana [Thu, 24 Dec 2015 05:31:12 +0000 (11:01 +0530)]
Updated "deleted" column of volume_type_access
Below changes are done in this commit:
a. replaced update()
update() is replaced with oslo.db's soft_delete() used in
volume_type_access_remove() function of sqlalchemy.db.api to keep
value of "id" in "deleted" column during volume type access remove
operation.
This bug will be solved after this change.
b. updated db schema
db schema of volume_type_projects if updated.
As tinyint can store maximum 127, "deleted" column type is modified
tinyint->integer so that it can store more than 128 entries in it.
c. release notes
release notes added to prohibit addition or deletion of
volume_type_access to a project during update operation.
Yusuke Hayashi [Tue, 6 Oct 2015 16:50:32 +0000 (01:50 +0900)]
Add Fujitsu ETERNUS DX Volume Driver (again)
This driver supports FUJITSU Storage ETERNUS DX.
The volume driver for ETERNUS DX dropped at Kilo,
because we could not prepare 3rd party CI until deadline (Kilo-3).
I upload it again for Mitaka release.
[Supported Protocol]
- iSCSI
[Supported Feature]
- 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
Michał Dulko [Thu, 22 Oct 2015 16:25:22 +0000 (18:25 +0200)]
Add backref relationships to ConsistencyGroup obj
ConsistencyGroup object was missing relationships that were defined on
the SQLAlchemy model as backrefs. This includes volumes and cgsnapshots
fields. This commit adds fields representing these relationships.
Xiaoqin Li [Sun, 20 Dec 2015 13:27:35 +0000 (05:27 -0800)]
Updates consistency group for ibm svc driver
The changes are:
1. ability to modify a consistecy group (update_consistencygroup)
2. ability to create a consistency group from a cgsnapshot or from
another consistency group (create_consistencygroup_from_src)
DocImpact
Change-Id: Ibdf60ca50d6ee2d25ed51b8f0adbb64ff2a3d17c
Implements: bp ibm-storwize-cg-updates
Yuriy Nesenenko [Mon, 28 Dec 2015 13:35:47 +0000 (15:35 +0200)]
Fix to allow RBD delete an unprotected snapshot
RBD creates snapshots and marks it as protected. Before deleting,
RBD tries to 'unprotect' a snapshot. In the case when the snapshot
was already marked as 'unprotected' RBD failed to remove it. This
patch allow RBD delete such a snapshot.
Jay S Bryant [Thu, 17 Dec 2015 17:53:45 +0000 (11:53 -0600)]
Remove the deprecated ibmnas driver
The ibmnas driver has been deprecated since the Liberty release.
In the Liberty release, NFS capabilities were added to the IBM
GPFS driver with commit: bf4ca3bcf099760ef145571b975badc80d42b2d6 .
The ability for the GPFS driver to use NFS based shares rendered
the ibmnas driver redundant.
This commit removes the ibmnas driver and its tests. The commit also
updates the opts.py file to remove reference to the ibmnas options.
hgangwx [Sat, 26 Dec 2015 12:45:17 +0000 (20:45 +0800)]
Wrong usage of "a"
Wrong usage of "a" in the mesages:
"Convert list of dicts to a indexted dict"
"Attempt to create a initiatorGroup"
"Return a empty"
"Return a object containing the parsed output"
"where volume is either a dict or a oslo_versionedobject"
"this is a update from legacy driver"
Should be:
"Convert list of dicts to an indexted dict"
"Attempt to create an initiatorGroup"
"Return an empty"
"Return an object containing the parsed output"
"where volume is either a dict or an oslo_versionedobject"
"this is an update from legacy driver"
This patch refactors the HP XP driver to be HPE XP.
This is being done because the company responsible for
this driver is now Hewlett Packard Enterprise (HPE).
The driver is now located in the cinder/volume/drivers/hpe folder.
Digvijay Ukirde [Tue, 22 Dec 2015 09:54:03 +0000 (15:24 +0530)]
Fix creating volume by snapshot for GPFS driver
For a operation of creating volume from volume snapshot,
GPFS driver is currently doing a full copy instead of clone when
it is creating a new volume. This happens when the source volume
is not in any consistency group.
With this patch, a GPFS file clone is created when both the volumes
(snapshot parent volume and new volume being created) are not in
any consistency group.