Michal Dulko [Wed, 1 Apr 2015 11:28:34 +0000 (13:28 +0200)]
Catch more general exception in manager's create_volume
When fixing issues with inaccurate allocated_capacity tracking when
create_volume flow fails (Icd6b04ac60c17cbda225d3be8bcc4435ea0cd7a8)
it was ignored that drivers may raise all kinds of exceptions and these
aren't repacked into CinderException in the flow. This commit broadens
except clause to catch Exception when deciding if rescheduling
occurred while creating a volume. Also regression unit test is added.
John Griffith [Mon, 30 Mar 2015 19:22:04 +0000 (13:22 -0600)]
Remove LP bug ref in remove_iscsi_device
Some like referencing bugs in code comments, others don't. In
general we try and avoid it, but I certainly don't agree with
blocking a patch solely for that reason. So instead this patch
tries to modify the previous commit to fix it up rather than
having a contest of wills to see who will bend first.
This patch puts a simple check around the 'extra_specs'
key, and makes sure it's there, while trying to inject
the multiattach capabilities filtering.
If we want to change the approach, we can do so in early
Liberty, when we enable multiattach for drivers. At this
stage of the release, lets just do the simple and safe thing.
Some folks are seeing race conditions on overloaded
or slow machines, where the time between issuing the
remove volume command, and the volume being from
/dev/disk/by-path by the kernel isn't long enough.
This patch adds a simple verify loop for iSCSI only.
It will try 3 times and wait 2 seconds between tries.
Also, This patch will only fix attaches that happen
in cinder for copy volume <--> image operations.
Nova needs a separate patch to fix any potential
issues there.
Xing Yang [Fri, 27 Mar 2015 21:07:58 +0000 (17:07 -0400)]
Fix the format of the system name in VMAX driver
There is a change in the format for system name in SMI-S for VMAX V3.
It was "SYMMETRIX+xxxxxx" previously and now it is changed to
"SYMMETRIX-+-xxxxxx". In this patch, the VMAX driver was modified
accordingly to support this format.
Copy volume to image by non-admin user fails with ImageNotAuthorized.
This is because we are setting image's is_public meta-data to True
while calling image update (for writing to image). This patch fixes
this by setting is_public using the image-meta passed in by Cinder.
Note: The oslo.vmware API which we use for upload requires is_public
meta-data which may not be needed at all for writing to image.
Till we update oslo.vmware API, we have to pass a value for is_public.
Lucian Petrut [Fri, 27 Mar 2015 11:42:22 +0000 (13:42 +0200)]
SMBFS: Fix missing volume provider location
In case of cloning volumes or creating volumes from snapshots, the
volume provider location is not set, making the volumes unusable.
This also leads to disk image leaks, because the delete volume
operation will pass without deleting the disk image if the provider
location is not present.
The SMB driver wraps base RemoteFS methods in order to set locks.
The issue is that it does not return the wrapped method return
value, which signals volume updates, in this case the provider
location.
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.
Ryan Lucio [Thu, 19 Mar 2015 10:17:17 +0000 (03:17 -0700)]
Use cached values for stats on query failures for vmem drivers
This change allows vmem drivers to return previously cached
values for free_capacity_gb and total_capacity_gb if the queries
to the backend for those stats succeed but do not contain
the data. This can happen when the mgmt plane is under heavy load.
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.