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.
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.
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.
Anthony Lee [Sat, 5 Dec 2015 00:27:14 +0000 (16:27 -0800)]
3PAR: Implement un/manage snapshot support
Implements support for managing and unmanaging snapshots to
the HPE 3PAR FC and iSCSI drivers.
This patch now allows snapshots to be removed from OpenStack
management but still left on the 3PAR backend. Snapshots on
the 3PAR backend can also be managed by OpenStack.
Alex O'Rourke [Thu, 29 Oct 2015 22:04:32 +0000 (15:04 -0700)]
3PAR: Implement v2 replication (unmanaged)
This patch implements the unmanaged side of v2 replication in the HPE
3PAR driver.
Both sync and periodic replication modes are supported. Each
replication_device entry should have a replication_mode value set
to sync|periodic.
A volume type extra_spec value of replication:mode
should also be set. If replication:mode is periodic,
replication:sync_period should be set as well. Which replication_device
entry(s) are used is determined by the value of replication:mode set for
each volume type.
cinder.conf should have the replication config group:
Shay Halsband [Thu, 19 Nov 2015 13:51:31 +0000 (15:51 +0200)]
XtremIO: fix generic glance cache with XtremIO
* Identify the apropriate error for snapshot limit from the array
and raise the right error to invalidate the cache.
* Add an optional limit to the number of snapshot taken from the
volume representing a cached image
* Add unittest for snapshot limit
vCenter 6.0 added support for a new type of datastore called VVOL
datastore. A VVOL datastore represents a storage container which
is a logical grouping of virtual volumes in an array that supports
VVOL. A virtual disk in a VVOL datastore corresponds to a virtual
volume in the array. Since VVOL datastores are treated like VMFS
or NFS datastores by vCenter APIs, the changes in the VMDK driver
to support VVOL datastores are minimal.
This patch adds the following changes in the VMDK driver to support
VVOL datastores:
* Add VVOL datastore type to the list of allowed datastore types
* Skip VVOL datastore while creating a volume from a preallocated
glance image because it involves replacing the data file of a
temporary virtual disk with the downloaded preallocated image
which VVOL cannot support.
Samuel Matzek [Wed, 18 Nov 2015 19:40:42 +0000 (13:40 -0600)]
Preserve request id in Cinder logs
Several Cinder volume drivers make calls to get the admin context.
When the admin context is retrieved the user context and its request
ID is lost and all subsequent log entries have different request IDs.
The fix is to pass the overwrite parameter in Cinder's RequestContext
__init__ method to the parent oslo class.
Michał Dulko [Wed, 16 Dec 2015 15:19:42 +0000 (16:19 +0100)]
Add volume_extensions:quotas:delete to policy.json
Aformentioned entry was missing from default policy.json file, so the
call wasn't blocked for non-admin user. It was failing on Keystone
connection and resulted in 500 HTTP error. This addition fixes the
issue.
Michał Dulko [Wed, 16 Dec 2015 12:08:01 +0000 (13:08 +0100)]
Pass volume_id in request_spec for manage_existing
In order to _set_volume_state_and_notify in scheduler.manager to work
correctly and error out volume on failure we need to pass volume_id in
the request_spec from c-api to c-sch. This commit implements that and
adds check for it in the unit tests for manage_existing flow.
Apart from that it removes unnecessary test that was setting volume to
MagicMock(return_value=None), which isn't actually testing anything
(volume() will return None, but we're never doing calls on volume
object).
peter_wang [Mon, 14 Dec 2015 03:37:41 +0000 (22:37 -0500)]
Skip check whether volume is local if it's None
When force deleting a consistency group containing volumes,
manager.py tries to extract host field to check whether the volume
is local to this cinder node before deleting the volume.
Above logic is invalid if host field of faulted volume is None.
This fix will bypass above check to allow deletion of the volume.
Thang Pham [Tue, 24 Nov 2015 04:12:03 +0000 (20:12 -0800)]
Implement refresh() for cinder objects
The following patch implements the refresh functionality
in cinder objects. Instead of calling get_by_id() to get
the latest object attributes, refresh() can be called.
With this change, delete_volume() was updated to use
volume.refresh().
Helen Walsh [Tue, 1 Dec 2015 22:38:33 +0000 (22:38 +0000)]
EMC VMAX - get_short_host_name not called in find_device_number
The get_short_host_name needs to be called in find_device_number.
There are 2 reasons for this:
1. Sometimes the full host name is contained in the
connector['host'] object.
2. When the short host name still exceeds 38 characters,
it must be truncated, in order to guarantee a "contains string"
match between the host and the masking view name.
Nate Potter [Tue, 8 Dec 2015 22:12:27 +0000 (22:12 +0000)]
Move retype quota checks to API
Currently the retype quota check is done in the manager, where it will
raise an exception if the check fails. This patch moves the check to the
API so that the user is given feedback before the RPC cast is made.
Gorka Eguileor [Mon, 14 Dec 2015 15:02:20 +0000 (16:02 +0100)]
Refactor cinder.utils.is_valid_boolstr
Method is_valid_boolstr is currently doing 8 different checks against
the same variable. This patch refactors this method to be more pythonic
by using the in operator.
Yuriy Nesenenko [Thu, 3 Dec 2015 14:28:31 +0000 (16:28 +0200)]
Add synchronization in Block Device driver
Multiple calls can get the same device. This patch adds synchronization
to create_volume, delete_volume and create_cloned_volume to avoid race
conditions. The delete_volume method is modified to avoid code duplication
in the implementation of delete_snapshot method for snapshot in the next
patch. Also it adds update provider_location and host to mark device as
used to avoid race with other threads. It uses object notation instead
of dict notation to a volume and snapshot.
Vincent Hou [Mon, 14 Dec 2015 06:08:54 +0000 (22:08 -0800)]
Volume migration: add 'name_id' as valid skippable field
New Versioned Objects expect 'name_id' as a valid input, which
is able to change '_name_id' as well, so this patch adds
'name_id' into the fields, which are going to skip for the
creation of the target volume during migration.
John Griffith [Sat, 12 Dec 2015 18:32:57 +0000 (18:32 +0000)]
Fix invalid cache image-volume creation
During the volume ref creation in clone_image_volume
we were including a _name_id attribute which is invalid
in the base olso object. The result is silent failure
for a key error. Note that the comments for the column
in the db specifcally state "do not call directly".
The variable is also denoted as private by the _ prefix.
Fix this by just popping the "_name_id' attribute.
In addition there were a number of things that needed
some cleanup:
1. Don't iterate over list of tuples to get K/V for dict
Just use Dict(xxxx)
2. Don't use delete dict.key
This isn't safe, because if the key DNE you'll get a key exception
Instead use pop which is safe if key DNE
3. Add an error message when this fails, because currently the logs
don't give an operation a chance of knowing it failed, let alone
an opportunity to debug it
Finally the cache volume creation is still calling the db
directly and doing a resource create as opposed to
using the new volume object create handler. I went ahead
and converted this to use objects, however that resulted in
breaking two of the volume-->image unit tests that use cinder
as a glance backend.
I've opened bug 1525773 for those issues and added a skip
to the tests in question.
Marian Horban [Wed, 2 Sep 2015 12:35:50 +0000 (08:35 -0400)]
Remove eventlet WSGI functionality
This commit removes eventlet WSGI server and starts using
generic eventlet WSGI server from oslo.service library.
The change where the wsgi functionality was added to
oslo.service can be referenced here:
If8840168f10cc3561f4f01e6d456d6b4fd1de8b5.