peter_wang [Wed, 25 Mar 2015 06:35:32 +0000 (02:35 -0400)]
Enhance VNX Cinder volume creation logic
Sometimes sysadmin needs to remove broken disks and replace them
with some new disks. Before the disks are replaced and fully rebuilt,
the pool would be in "Faulted" state, and all LUNs created in this
pool would be in "Faulted" state as well.
A LUN in this "Faulted" state is still OK for IO access.
Current implementation of create_volume in VNX Cinder Driver will
wait until the VNX LUN gets into Ready State or timeout.
Thus the new volume in the back end corresponding to the pool will
be stuck at creating state for a long time before disks are replaced.
This reduces the high availability of the back end.
The change allows new volume to get into available state as long as
the corresponding VNX LUN can serve IO.
Thang Pham [Tue, 17 Mar 2015 14:24:08 +0000 (10:24 -0400)]
Properly use obj_extra_fields in objects
The following patch fixes a bug in the snapshot object,
where fields that are not part of the Snapshot model,
i.e. name and volume_name, were not specified as
obj_extra_fields in the object. It also fixes the same
problem in the volume object, i.e. name and name_id.
With this patch, those extra fields are properly loaded,
e.g. snapshot.volume_name or volume.name.
Thang Pham [Mon, 16 Mar 2015 15:48:07 +0000 (11:48 -0400)]
Create unit tests for volume objects
This is a follow up patch to cinder objects that adds
missing unit tests for volume objects. It also adds
a @base.remotable decorator to the volume save method,
which makes sure a context is properly supplied to the
method, whether it is passed in or taken from the
context stashed in the object.
We missed an access to volume['instance_uuid']
in the multiattach patch. The instance_uuid and attached_host
were moved into the volume_attachment table.
This patch changes how we test to see if a volume is available
or not, but checking the new location.
Lucian Petrut [Wed, 25 Mar 2015 16:01:02 +0000 (18:01 +0200)]
Eager load volume extra specs
The Linux SMBFS driver uses volume extra specs in order to determine
the according image format when creating new volumes.
Accessing the extra_specs attribute can raise DetachedInstanceError
as this attribute is lazy loaded and the session might close by the
time this attribute is accessed.
This can be avoided by simply eager loading the volume extra specs.
I must have missed this driver in the multiattach
patch. The attachment object is passed in to
detach_volume to give drivers a chance to deal with
a detach call.
This patch just updates the signature of the method
to be the same as the parent.
Gorka Eguileor [Mon, 2 Mar 2015 14:51:07 +0000 (15:51 +0100)]
Make lio iSCSI changes persistent to avoid lost
To avoid losing iSCSI configuration when target.service is
started/restarted we make persistent any change Cinder makes to the
configuration.
This will allow us to coordinate access from multiple rtslib users
(target daemon, targetcli, cinder...)
This patch changes rtstool and adds an additional command "save" with
optional parameter the filename where we want to save current
configuration. If no parameter is provided it saves to default location
defined by rtslib.
Thang Pham [Wed, 25 Mar 2015 14:54:23 +0000 (10:54 -0400)]
Sort list of cinder_object.changes
If PYTHONHASHSEED is set to a non-zero value,
test_objects.TestObject.test_base_attributes unit test
fails. This is because 'cinder_object.changes' key is
an unsorted list when the object is converted to a
primitive. The following patch fixes this by sorting
cinder_object.changes.
Tom Swanson [Tue, 24 Mar 2015 17:57:22 +0000 (12:57 -0500)]
Dell Storage Center API change fails init_conn
An attribute in the dell storage center REST API containing
the world wide name of the target device changed. This meant
that on intialize connection we were returning None instead of
the wwn.
The driver has been changed to look for the new attribute and
to fall back to the old. If neither is found it will not
return a target wwn of None.
Lucian Petrut [Tue, 24 Mar 2015 12:08:07 +0000 (14:08 +0200)]
Windows iSCSI: fix volume clone
In some environments, volume cloning fails when using the Windows
iSCSI volume driver. This involves creating a new VHD image and
copying the data from the source volume on top.
This can raise an error, caused by the fact that the destination
path exists.
This patch slightly changes the workflow used when cloning an image.
Instead of first creating a new WT disk and then copying the cloned
image data on top, the source image is copied, resized if needed
and then imported as a WT disk.
John Griffith [Tue, 24 Mar 2015 03:08:15 +0000 (03:08 +0000)]
Enable request-id in cinder API logs
Using common.local:store.context doesn't work correctly with
the new oslo_log module. This change removes the calls to
common.local and removes the file altogether which allows the
proper settings to be passed in to the logging module and give
us back our request-id in the API logs.
Rushil Chugh [Thu, 19 Mar 2015 01:00:36 +0000 (21:00 -0400)]
The value of netapp_storage_protocol should default to none
The value of netapp_storage_protocol was changed from 'None' to 'iscsi'
in a recent commit. It needs to be reverted back to its correct default
value of 'None'.
Silvan Kaiser [Fri, 20 Mar 2015 13:30:26 +0000 (14:30 +0100)]
Fix: Synchronise Quobyte Share mounting
Quobyte ci tests show random failures with multiple similar shares.
A single share is listed in mounted shares twice after two (or more)
chronologically close successive calls to
_ensure_shares_mounted (examples see bug or similar Quobyte ci error
reports).
This is now prevented by synchronizing the method.
Patrick East [Fri, 20 Mar 2015 18:27:52 +0000 (11:27 -0700)]
Update file doc string for pure.py
The PureISCSIDriver now requires a higher version of the REST API, this
causes the required Purity version to go up to 4.0.0. The doc string
for the pure.py file was not updated to reflect this.
Sean Dague [Fri, 20 Mar 2015 12:26:08 +0000 (08:26 -0400)]
update oslo policy to remove policy.d log spam
After oslo policy added config dirs it started spamming the logs
relentlessly on if you didn't have a policy.d directory on your
system. This is a very unfriendly upgrade to operators.
A fix was provided in the incubator just before incubator policy was
deleted. This syncs in that fix.
Daniel Wilson [Fri, 20 Mar 2015 04:35:14 +0000 (21:35 -0700)]
Remove chap secret DEBUG logging in PureISCSIDriver
We are removing a small piece of code that caused the CHAP secret to be logged
in plain text in the log file when DEBUG level logging is turned on in Cinder.
This is undesirable so it is being taken out.
Mike Perez [Fri, 20 Mar 2015 01:32:04 +0000 (18:32 -0700)]
Removing Windows drivers for no reported CI
CI deadlines were set and pushed since last year. An email about this
requirement and the deadline of March 19th 2015 has been sent to each
individual driver maintainer, as well as the mailing list [1]. This
driver is being removed because the maintainer does not have a CI
reporting to ensure their driver integration is successful. Therfore, we
can not validate the driver is working in Cinder today in a continuous
way.
Michal Dulko [Thu, 19 Mar 2015 20:53:46 +0000 (21:53 +0100)]
Fix logging mistake in swift backup driver
After recent swift driver refactoring a small mistake was introduced
causing c-bak to log an exception because of wrong number of arguments
to format a string. This commit fixes the issue.
Mike Perez [Thu, 19 Mar 2015 20:37:32 +0000 (13:37 -0700)]
Removing Zadara driver for no reported CI
CI deadlines were set and pushed since last year. An email about this
requirement and the deadline of March 19th 2015 has been sent to each
individual driver maintainer, as well as the mailing list [1]. This
driver is being removed because the maintainer does not have a CI
reporting to ensure their driver integration is successful. Therfore, we
can not validate the driver is working in Cinder today in a continuous
way.
Mike Perez [Thu, 19 Mar 2015 19:38:55 +0000 (12:38 -0700)]
Removing Huawei drivers for no reported CI
CI deadlines were set and pushed since last year. An email about this
requirement and the deadline of March 19th 2015 has been sent to each
individual driver maintainer, as well as the mailing list [1]. This
driver is being removed because the maintainer does not have a CI
reporting to ensure their driver integration is successful. Therfore, we
can not validate the driver is working in Cinder today in a continuous
way.
Mike Perez [Thu, 19 Mar 2015 20:02:10 +0000 (13:02 -0700)]
Removing Netapp FC drivers for no reported CI
CI deadlines were set and pushed since last year. An email about this
requirement and the deadline of March 19th 2015 has been sent to each
individual driver maintainer, as well as the mailing list [1]. This
driver is being removed because the maintainer does not have a CI
reporting to ensure their driver integration is successful. Therfore, we
can not validate the driver is working in Cinder today in a continuous
way.
Mike Perez [Thu, 19 Mar 2015 19:12:45 +0000 (12:12 -0700)]
Removing Fujitsu driver for no reported CI
CI deadlines were set and pushed since last year. An email about this
requirement and the deadline of March 19th 2015 has been sent to each
individual driver maintainer, as well as the mailing list [1]. This
driver is being removed because the maintainer has chosen not to respond
to the CI deadline email and report a CI to ensure their driver
integration is successful. Therfore, we can not validate the driver is
working in Cinder today in a continuous way.
Mike Perez [Thu, 19 Mar 2015 19:44:38 +0000 (12:44 -0700)]
Removing DRBD driver for no reported CI
CI deadlines were set and pushed since last year. An email about this
requirement and the deadline of March 19th 2015 has been sent to each
individual driver maintainer, as well as the mailing list [1]. This
driver is being removed because the maintainer does not have a CI
reporting to ensure their driver integration is successful. Therfore, we
can not validate the driver is working in Cinder today in a continuous
way.
Mike Perez [Thu, 19 Mar 2015 19:29:30 +0000 (12:29 -0700)]
Removing FusionIO driver for no reported CI
CI deadlines were set and pushed since last year. An email about this
requirement and the deadline of March 19th 2015 has been sent to each
individual driver maintainer, as well as the mailing list [1]. This
driver is being removed because the maintainer has chosen not to respond
to the CI deadline email and report a CI to ensure their driver
integration is successful. Therfore, we can not validate the driver is
working in Cinder today in a continuous way.
Mike Perez [Thu, 19 Mar 2015 17:51:36 +0000 (10:51 -0700)]
Removing Nexenta driver for no reported CI
CI deadlines were set and pushed since last year. An email about this
requirement and the deadline of March 19th 2015 has been sent to each
individual driver maintainer, as well as the mailing list [1]. This
driver is being removed because the maintainer does not have a CI
reporting to ensure their driver integration is successful. Therfore, we
can not validate the driver is working in Cinder today in a continuous
way.
Mike Perez [Thu, 19 Mar 2015 18:15:01 +0000 (11:15 -0700)]
Removing Symantec NFS driver for no reported CI
CI deadlines were set and pushed since last year. An email about this
requirement and the deadline of March 19th 2015 has been sent to each
individual driver maintainer, as well as the mailing list [1]. This
driver is being removed because the maintainer does not have a CI
reporting to ensure their driver integration is successful. Therfore, we
can not validate the driver is working in Cinder today in a continuous
way.
Mike Perez [Thu, 19 Mar 2015 19:25:19 +0000 (12:25 -0700)]
Removing StorPool driver for no reported CI
CI deadlines were set and pushed since last year. An email about this
requirement and the deadline of March 19th 2015 has been sent to each
individual driver maintainer, as well as the mailing list [1]. This
driver is being removed because the maintainer does not have a CI
reporting to ensure their driver integration is successful. Therfore, we
can not validate the driver is working in Cinder today in a continuous
way.
Mike Perez [Thu, 19 Mar 2015 19:20:16 +0000 (12:20 -0700)]
Removing ZFSSA driver for no reported CI
CI deadlines were set and pushed since last year. An email about this
requirement and the deadline of March 19th 2015 has been sent to each
individual driver maintainer, as well as the mailing list [1]. This
driver is being removed because the maintainer does not have a CI
reporting to ensure their driver integration is successful. Therfore, we
can not validate the driver is working in Cinder today in a continuous
way.
Currently, the 3PAR drivers rely on the pool (CPG) existing
in the extra specs of a volume type. This is the way that the
3PAR drivers supported the idea of 'pools' prior to Cinder
itself supporting pools.
Now, the 3PAR drivers will not use the CPG specified in the
extra specs of a volume type. The drivers will log a warning
explaining that CPG is deprecated, and then override the CPG
setting with the pool name specified by the scheduler in the
volume['host'] entry. This fixes a few bugs in the 3PAR
drivers.
Existing 3PAR deployments will need to update their cinder.conf
to specify the list of CPGs they want the driver to support as
pools in the hp3par_cpg=[list of cpgs] entry. hp3par_cpg can be
a single CPG, or a comma separated list of CPGS.
The 3PAR best practice guide will be updated for the Kilo release
explaining how to upgrade from existing deployments and describe
how best to use CPGS as pools.
Mike Perez [Thu, 19 Mar 2015 18:08:37 +0000 (11:08 -0700)]
Removing HP MSA driver for no reported CI
CI deadlines were set and pushed since last year. An email about this
requirement and the deadline of March 19th 2015 has been sent to each
individual driver maintainer, as well as the mailing list [1]. This
driver is being removed because it's not supported, so it won't have
a CI reporting to ensure their driver integration is successful.
Therfore, we can not validate the driver is working in Cinder today in
a continuous way.
Mike Perez [Thu, 19 Mar 2015 04:56:39 +0000 (21:56 -0700)]
Removing Coraid driver for no reported CI
CI deadlines were set and pushed since last year. An email about this
requirement and the deadline of March 19th 2015 has been sent to each
individual driver maintainer, as well as the mailing list [1]. This
driver is being removed because the maintainer has chosen not to respond
to the CI deadline email and report a CI to ensure their driver
integration is successful. Therfore, we can not validate the driver is
working in Cinder today in a continuous way.
Mike Perez [Wed, 18 Mar 2015 09:19:45 +0000 (02:19 -0700)]
Add retry to create resource in Datera driver
If the volume is still in a creating state, wait, and retry a few times.
Otherwise, raise an exception for the manager to set the volume into an
error state.
Sean McGinnis [Thu, 19 Mar 2015 13:37:49 +0000 (08:37 -0500)]
Logging not using oslo.i18n guidelines
Part of multi-patch set for easier chunks.
There have been quite a few instances found where the
i18n guidelines are not being followed. I believe this
has helped lead to some of the confusion around how to
correctly do this. Other developers see this code and
assume it is an example of the correct usage.
This patch attempts to clean up most of those violations
in the existing codebase to hopefully help avoid some of
that confusion in reviews.
Some issues address:
* Correct log translation markers for different log levels
* Passing format values as arguments to call, not preformatting
* Not forcing translation via six.text_type and others
Guidelines can be found here:
http://docs.openstack.org/developer/oslo.i18n/guidelines.html
Hacking checks will not be able to identify all violations of
the guidelines, but it could be useful for catching obvious ones
such as LOG.info("No markers!").
Eric Harney [Thu, 19 Mar 2015 16:27:59 +0000 (12:27 -0400)]
Tests: Fix az test failure when PYTHONHASHSEED != 0
The test_list_availability_zones_enabled_service test calls
a method which returns a tuple that is generated from a dict.
This is compared to a tuple in the test, which can fail when
PYTHONHASHSEED is not 0, due to the tuples containing elements
in different orders. (Because the dict used to build the tuple
was ordered differently.)
For this test, we can convert to lists and sort them to do the
comparison, since the ordering is not important.