Tomoki Sekiyama [Tue, 29 Dec 2015 03:35:52 +0000 (12:35 +0900)]
Fix image volume creation error
When "image_upload_use_cinder_backend = True" is specified to
the volume backend and the Glance cinder store is enabled,
upload-to-image command fails with the following error:
Create clone_image_volume: xxx for image xxx failed
(Exception: An object of type VolumeAttachmentList is required
in field volume_attachment, not a )
This is due to unnecessary attributes specified in the volume
params, such as 'volume_attachment' or 'consistencygroup'.
This patch removes the unnecessary attributes from the params.
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.
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.
Szymon Borkowski [Thu, 17 Dec 2015 12:18:31 +0000 (13:18 +0100)]
Quota API is now compatible with keystone API v2
Before, the quota API used to fail to perform calls with specified
keystone API v2, because the keystone client used in code was set
to v3 and all quota operations used to assume that the user would
use only keystone API v3.
Now, we use the generic client, which discovers the version of the
keystone API, so depending on that, the quota API can perform
appropriate operations.
wangxiyuan [Mon, 14 Dec 2015 08:27:48 +0000 (16:27 +0800)]
Add pagination support to Qos specs
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 Qos specs.
peter_wang [Mon, 21 Dec 2015 10:37:12 +0000 (05:37 -0500)]
Remove name_id when creating volume with cache enabled
When image_volume_cache_enabled = True, Cinder will create
a cached image volume. But when creating this image volume,
the name_id is set to id of newly created volume, which causes
the image volume is unable to be created in the underlying storage
system.
This fix will remove the name_id so that volume.name can refer to
correct LUN on storage system
Also, a minor fix: passing volume.id to delete_volume since
it only accept volume id.
Patrick East [Thu, 17 Dec 2015 23:28:16 +0000 (15:28 -0800)]
Enhance the stats reported from the Pure Volume Drivers
This change provides some improvements for older scheduler hints and
stats along with a few new stats that can be used for filtering and
goodness functions. These new stats include:
Latency:
usec_per_read_op - Average arrival-to-completion time, measured in
microseconds, for a host read operation.
usec_per_write_op - Average arrival-to-completion time, measured in
microseconds, for a host write operation.
queue_depth - Average number of queued I/O requests.
IOPS:
reads_per_sec - Number of read requests processed per second.
writes_per_sec - Number of write requests processed per second.
Bandwidth
input_per_sec - Number of bytes read per second.
output_per_sec - Number of bytes written per second.
Metadata:
total_hosts - Total number of Purity hosts created.
total_snapshots - Total number of snapshots (includes pending
deletion).
total_pgroups - Total number of Protection Groups (includes
pending deletion).
Note: All of these stats are for the entire array and are not specific
to the Cinder volumes, snapshots, hosts, latency, etc.
As part of the new and improved stats the drivers will respect the
cinder.conf backend “reserved_percentage” option. Previously it was set
to 0.
Last but not least there is a new config option called
“pure_automatic_max_oversubscription_ratio”. This defaults to True, and
when enabled gives the older behavior of automatically calculating the
thin provisioning ratio which was allowed for the backend. If disabled
the driver will now respect the “max_over_subscription_ratio” config
option.
Currently, once they are in ‘error’ or ‘failed-over’ states you can’t
do anything with them. We need to allow enable_replication after the
admin has resolved any issues that may have prevented the operation.
Same thing for after a fail-over, you cannot enable replication on it.
This change allows for more states to be recoverable via enable
replication. It also more uniformly sets the state to ‘error’ when
something bad happens.
'enabled' --> replication is on.
'disabled' --> replication is off by design.
'failed-over' --> we have just failed over. Replication is off.
'error' --> an error occurred during the last operation.
Patrick East [Thu, 17 Dec 2015 00:59:51 +0000 (16:59 -0800)]
Add config option to enable reporting discard
The way for a client of Cinder (read: Nova) to know whether or not it
can and should use the discard feature for the block device attachment
is to report back discard=True in the connection info. Previously a
driver would need to be updated to provide this functionality, which is
kind of a pain with so many drivers in Cinder.
This change adds a shared boolean config option called
‘report_discard_supported’ which can be set to enable reporting this
functionality to the caller of initialize_connection.
Jacob Gregor [Fri, 18 Dec 2015 16:27:02 +0000 (10:27 -0600)]
Storwize: Split up __init__ into separate files
This patch is one in a series of patches with the aim to
bring the storwize_svc driver in line with other san based
Cinder drivers.
Currently all the iSCSI and FC code are all together in a single
file. This patch goes into the __init__.py and splits it up into
storwize_svc_iscsi.py, storwize_svc_fc.py, and storwize_svc_common.py.
This new structure is consistent with other san based drivers.
In addition, tests were also updated to reflect the changes listed
above.
Since the driver has been split into two, we need to update how
to enable each new driver. The user now needs to set different
values for volume_driver, as shown below.
Tomoki Sekiyama [Fri, 18 Dec 2015 11:38:36 +0000 (20:38 +0900)]
Fix volume upload failure with glance_api_version=2
When the volume has additional image properties, upload-to-image
using glance API version 2 will fail with the following error.
Failed validation u'type' in schema[u'additionalProperties']:
{u'type': u'string'}
This is due to non core properties passed as a dict to the key
'properties'. It is valid in Image API v1, but the additional
properties must be passed just like core properties in v2.
abhiram moturi [Sat, 19 Dec 2015 17:31:10 +0000 (17:31 +0000)]
Fix bugs caused by porting to python3
In previous python version base64.encodestring() adds '\n'.
at the end. This is removed when we use oslo encode_as_text()
This causes a regression as we manually removed the last
character earlier. This fix removes manually deleting the
last character.
Kurt Martin [Wed, 16 Dec 2015 23:37:45 +0000 (15:37 -0800)]
Disable capabilities based on 3PAR licenses
The 3PAR firmware is now reporting which licenses are enabled on the
storage array. The 3PAR drivers will now use this information to
enable/disable standard stat reporting for thin provisioning,
QoS support and replication
The root cause is that these test cases try to use 8776 port,
but the port is used by c-api if the service exists.
This patch override default port number to avoid the error.