]> review.fuel-infra Code Review - openstack-build/cinder-build.git/log
openstack-build/cinder-build.git
9 years agoMerge "Added provider_id to volume and snapshot object"
Jenkins [Mon, 6 Apr 2015 11:10:50 +0000 (11:10 +0000)]
Merge "Added provider_id to volume and snapshot object"

9 years agoMerge "VMware: Fix instance_uuid access in volume retype"
Jenkins [Mon, 6 Apr 2015 08:52:00 +0000 (08:52 +0000)]
Merge "VMware: Fix instance_uuid access in volume retype"

9 years agoMerge "Use six.text_type instead of unicode"
Jenkins [Mon, 6 Apr 2015 08:51:49 +0000 (08:51 +0000)]
Merge "Use six.text_type instead of unicode"

9 years agoMerge "Logging not using oslo.i18n guidelines"
Jenkins [Mon, 6 Apr 2015 08:51:38 +0000 (08:51 +0000)]
Merge "Logging not using oslo.i18n guidelines"

9 years agoMerge "Fix argument order in assertEqual: tests/test_service.py"
Jenkins [Mon, 6 Apr 2015 08:51:27 +0000 (08:51 +0000)]
Merge "Fix argument order in assertEqual: tests/test_service.py"

9 years agoMerge "VMware: Skip vSAN for preallocated image download"
Jenkins [Sun, 5 Apr 2015 23:15:44 +0000 (23:15 +0000)]
Merge "VMware: Skip vSAN for preallocated image download"

9 years agoMerge "Fixes nits in check_no_contextlib_nested"
Jenkins [Sun, 5 Apr 2015 18:31:45 +0000 (18:31 +0000)]
Merge "Fixes nits in check_no_contextlib_nested"

9 years agoMerge "Add project_id to barbican keymgr wrapper"
Jenkins [Sun, 5 Apr 2015 18:17:28 +0000 (18:17 +0000)]
Merge "Add project_id to barbican keymgr wrapper"

9 years agoMerge "Dell SC driver has insufficient iscsi logging"
Jenkins [Sun, 5 Apr 2015 14:58:20 +0000 (14:58 +0000)]
Merge "Dell SC driver has insufficient iscsi logging"

9 years agoMerge "Fix incorrect invocation of _add_to_threadpool"
Jenkins [Sun, 5 Apr 2015 01:12:31 +0000 (01:12 +0000)]
Merge "Fix incorrect invocation of _add_to_threadpool"

9 years agoMerge "Tests: Fix v6000 test failure with random hash seed"
Jenkins [Sat, 4 Apr 2015 16:52:41 +0000 (16:52 +0000)]
Merge "Tests: Fix v6000 test failure with random hash seed"

9 years agoMerge "Enable H238 hacking rule"
Jenkins [Sat, 4 Apr 2015 16:52:30 +0000 (16:52 +0000)]
Merge "Enable H238 hacking rule"

9 years agoMerge "Storwize: Replication status still active when primary copy is offline"
Jenkins [Sat, 4 Apr 2015 16:46:32 +0000 (16:46 +0000)]
Merge "Storwize: Replication status still active when primary copy is offline"

9 years agoMerge "Fix: Boot from image with HNAS iSCSI"
Jenkins [Sat, 4 Apr 2015 16:14:56 +0000 (16:14 +0000)]
Merge "Fix: Boot from image with HNAS iSCSI"

9 years agoMerge "Fix ISCSIDriver initialized connection volume type"
Jenkins [Sat, 4 Apr 2015 02:27:04 +0000 (02:27 +0000)]
Merge "Fix ISCSIDriver initialized connection volume type"

9 years agoMock wait_for_volume_removal in test_brick_connector
Jay S. Bryant [Fri, 3 Apr 2015 19:19:28 +0000 (14:19 -0500)]
Mock wait_for_volume_removal in test_brick_connector

Systems where /dev/disk/by-path did exist were failing unit
test for test_connect_volume, test_connect_volume_with_alternative_targets
and test_connect_volume_with_alternative_targets_primary_error in
cinder.tests.test_brick_connector .  The problem was that the test
cases were mocking out os.path to return exists.  This resulted in
the new code from commit 43029941219505bc3861dd285e3393e08c76b433
never being able to exit the wait_for_volume_removal loop.

To avoid this problem I am mocking out wait_for_volume_removal for these
test cases.  wait_for_volume_removal is tested elsewhere and not relevant
for these test cases.

Change-Id: Ib7f75c852f9c79f261e319be0c1e3fd21acab8f1
Closes-bug: 1440153

9 years agoMerge "Only use operational LIFs for iscsi target details"
Jenkins [Fri, 3 Apr 2015 17:54:21 +0000 (17:54 +0000)]
Merge "Only use operational LIFs for iscsi target details"

9 years agoDell SC driver has insufficient iscsi logging
Tom Swanson [Thu, 2 Apr 2015 22:55:44 +0000 (17:55 -0500)]
Dell SC driver has insufficient iscsi logging

In the case where a volume was mapped but the server could not
locate the volume not enough information was being logged to
sort out the failure. Added logging to Dell SC ISCSI driver.
Now returns much more connection information on trying to map
a volume. Also tries to return iscsi properties associated with
the controller on which the volume in question is active.

Updated tests.

Minor comment change.

Change-Id: I76bf501152802c5421be316703615fdc27a49072
Closes-Bug: 1439852

9 years agoMerge "Fix missing clone_image API support for sheepdog driver."
Jenkins [Fri, 3 Apr 2015 12:33:08 +0000 (12:33 +0000)]
Merge "Fix missing clone_image API support for sheepdog driver."

9 years agoVMware: Skip vSAN for preallocated image download
Vipin Balachandran [Wed, 7 Jan 2015 06:09:43 +0000 (11:39 +0530)]
VMware: Skip vSAN for preallocated image download

Copying preallocated image to volume involves creating
a virtual disk using the image. The virtual disk has a
descriptor and an extent. The preallocated image is used
as the flat extent to create the virtual disk.

To create virtual disk from preallocated image, we first
create a temporary virtual disk (with a descriptor and
flat extent), then replace its flat extent with the
downloaded image. Since vSAN datastores do not support
flat extent, the above operation fails if such a datastore
is selected for virtual disk creation. This patch fixes
the problem by not selecting vSAN datastores for temporary
virtual disk creation.

Change-Id: Ib4c0fcf5c379b137e70378f137d996bf510f05b3
Closes-Bug: #1301943

9 years agoMerge "Fix wrong command for _rescan_multipath"
Jenkins [Thu, 2 Apr 2015 17:30:38 +0000 (17:30 +0000)]
Merge "Fix wrong command for _rescan_multipath"

9 years agoEnable H238 hacking rule
Anton Arefiev [Thu, 2 Apr 2015 16:12:52 +0000 (19:12 +0300)]
Enable H238 hacking rule

Hacking 0.10 introduces new hacking rule H238 - old style classes
are deprecated (they are converted to new style classes - inherit
from `object`). In order to avoid any unwanted side effects all
classes should be declared using new style.

See reference on the differences:
https://www.python.org/download/releases/2.2.3/descrintro/

Change-Id: Iec5620e8f9da2d051a3754391eab4e75faf644e0

9 years agoUse six.text_type instead of unicode
Ivan Kolodyazhny [Thu, 2 Apr 2015 14:55:48 +0000 (17:55 +0300)]
Use six.text_type instead of unicode

Add hacking checks for unicode() calls

Change-Id: I27062986e69a90e3f4fc26a76080b146e825149b
Closes-Bug: #1380806

9 years agoFix ISCSIDriver initialized connection volume type
Aviram Bar-Haim [Thu, 2 Apr 2015 14:37:04 +0000 (17:37 +0300)]
Fix ISCSIDriver initialized connection volume type

ISCSIDriver initialize connection is a duplicated function
left in kilo to serve drivers that don't use the new targets model.

In Kilo there is a new parameter of iscsi_protocol, that is set to
iscsi by default and can be changed to iser in order to enable RDMA.

In order support RDMA in drivers that still inherit from ISCSIDriver,
driver_volume_type should be set to iscsi_protocol parameter value
instead of a hard coded value until this function duplication will be solved.

Closes-Bug: #1438833

Change-Id: If51ff933b75bf475c779d2599776f8a83acc08e5

9 years agoFix missing clone_image API support for sheepdog driver.
Ray Chen [Thu, 10 Jul 2014 15:01:17 +0000 (23:01 +0800)]
Fix missing clone_image API support for sheepdog driver.

If image is backend by sheepdog, it will use create_cloned_volume
function to help to clone this image. Normally sheepdog can clone
only from snapshot.

This patch set is derived from abandoned change:
Ibd355082e7c3215c00f6576404566577f7a2601c

Change-Id: I6f6834ff5443f2d1a21d4ae10e26e1cab3664a01
Closes-Bug: #1140177

9 years agoMerge "Be safe with getting attachment"
Jenkins [Wed, 1 Apr 2015 22:24:06 +0000 (22:24 +0000)]
Merge "Be safe with getting attachment"

9 years agoMerge "Catch more general exception in manager's create_volume"
Jenkins [Wed, 1 Apr 2015 17:29:44 +0000 (17:29 +0000)]
Merge "Catch more general exception in manager's create_volume"

9 years agoOnly use operational LIFs for iscsi target details
Tom Barron [Wed, 25 Mar 2015 15:28:08 +0000 (11:28 -0400)]
Only use operational LIFs for iscsi target details

When Nova invokes our cDOT driver's initialize_connection() method
in order to attach an iSCSI volume to an instance, we have been
returning the first target from the list of targets returned from
the filer API call to get iscsi target details.  In failover mode,
this may be a target with a LIF that is down, causing the attach
attempt to fail in Nova.

This commit fixes that issue so that attaches still work in
failover by returning the first target with an *operational* LIF.

Closes-bug: 1437419

Change-Id: I3f53c3644f7d94f5188151c16d70e565b745ad4a

9 years agoCatch more general exception in manager's create_volume
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.

Change-Id: I36058eacd1eb6b42c6a4311bd3382ddc9f47550c
Closes-Bug: 1438744

9 years agoMerge "Fix the format of the system name in VMAX driver"
Jenkins [Wed, 1 Apr 2015 10:22:22 +0000 (10:22 +0000)]
Merge "Fix the format of the system name in VMAX driver"

9 years agoMerge "Convert all eqlx tests from mox to mock"
Jenkins [Wed, 1 Apr 2015 06:28:48 +0000 (06:28 +0000)]
Merge "Convert all eqlx tests from mox to mock"

9 years agoMerge "Fix potential access to missing key"
Jenkins [Tue, 31 Mar 2015 23:16:17 +0000 (23:16 +0000)]
Merge "Fix potential access to missing key"

9 years agoMerge "Remove LP bug ref in remove_iscsi_device"
Jenkins [Tue, 31 Mar 2015 23:00:47 +0000 (23:00 +0000)]
Merge "Remove LP bug ref in remove_iscsi_device"

9 years agoMerge "VMware: Fix exception logging"
Jenkins [Tue, 31 Mar 2015 22:19:09 +0000 (22:19 +0000)]
Merge "VMware: Fix exception logging"

9 years agoMerge "Fix HNAS iSCSI driver error on LUN creation"
Jenkins [Tue, 31 Mar 2015 19:53:14 +0000 (19:53 +0000)]
Merge "Fix HNAS iSCSI driver error on LUN creation"

9 years agoMerge "Fix broken fetch_to_volume_format log message"
Jenkins [Tue, 31 Mar 2015 18:59:47 +0000 (18:59 +0000)]
Merge "Fix broken fetch_to_volume_format log message"

9 years agoMerge "Brick: Fix race in removing iSCSI device"
Jenkins [Tue, 31 Mar 2015 18:59:21 +0000 (18:59 +0000)]
Merge "Brick: Fix race in removing iSCSI device"

9 years agoMerge "Enhance VNX Cinder volume creation logic"
Jenkins [Tue, 31 Mar 2015 18:59:11 +0000 (18:59 +0000)]
Merge "Enhance VNX Cinder volume creation logic"

9 years agoMerge "Fix logging to catch original exceptions and tracebacks"
Jenkins [Tue, 31 Mar 2015 18:26:43 +0000 (18:26 +0000)]
Merge "Fix logging to catch original exceptions and tracebacks"

9 years agoMerge "Fix for inconsistent cinder-services state change"
Jenkins [Tue, 31 Mar 2015 18:23:39 +0000 (18:23 +0000)]
Merge "Fix for  inconsistent cinder-services state change"

9 years agoMerge "Change volume and snapshot stuck creating to error"
Jenkins [Tue, 31 Mar 2015 15:33:10 +0000 (15:33 +0000)]
Merge "Change volume and snapshot stuck creating to error"

9 years agoFix broken fetch_to_volume_format log message
Eric Harney [Tue, 31 Mar 2015 13:31:06 +0000 (09:31 -0400)]
Fix broken fetch_to_volume_format log message

Format arguments are not passed correctly, leading
to a "TypeError: not enough arguments for format string"
failure.

Fix the same issue introduced in hosts.py _list_hosts().

Closes-Bug: #1438607

Change-Id: Id2d4fe2eeb401361fac2ff24c3b04df7944aea9f

9 years agoTests: Fix v6000 test failure with random hash seed
Eric Harney [Mon, 30 Mar 2015 19:45:39 +0000 (15:45 -0400)]
Tests: Fix v6000 test failure with random hash seed

If PYTHONHASHSEED is set to a non-zero value, this test
will fail due to a dependency on dict ordering.

Rework the test to handle randomly ordered dictionaries.

Partial-Bug: #1348818

Change-Id: I92e780db5805e59ac9eef98a07cfbb7a4be54110

9 years agoFix wrong command for _rescan_multipath
Hahyun [Tue, 31 Mar 2015 00:31:00 +0000 (09:31 +0900)]
Fix wrong command for _rescan_multipath

The _run_multipath command is wrong, it should be 'multipath -r'
not 'multipath - r'.

Closes-bug: 1437794

Change-Id: I9a40265ba2a53e024626829f892b523672160e07

9 years agoStorwize: Replication status still active when primary copy is offline
TaoBai [Wed, 11 Feb 2015 10:45:48 +0000 (02:45 -0800)]
Storwize: Replication status still active when primary copy is offline

If primary backend is in abnormal state, even secondary backend is in good
state, we should report error status.

Closes-Bug: #1384040

Change-Id: I777ea6e7ba8c0a4aab77021a561b94285b36b402

9 years agoVMware: Fix instance_uuid access in volume retype
Vipin Balachandran [Mon, 30 Mar 2015 13:29:03 +0000 (06:29 -0700)]
VMware: Fix instance_uuid access in volume retype

Retype implementation still uses volume['instance_uuid'] to
check in-use volumes. This patch replaces it with a check
for non-empty volume['volume_attachment'] list.

Change-Id: I268d30ed259a04f8bcf05fb0d45ba1d8e8332c34
Closes-Bug: #1438185

9 years agoLogging not using oslo.i18n guidelines
Sean McGinnis [Fri, 20 Mar 2015 23:42:50 +0000 (18:42 -0500)]
Logging not using oslo.i18n guidelines

Multi-patch set for easier chunks. This one addresses
the backup and common cinder directories.

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!").

Change-Id: I2560d9dee564f5a9b214fd63ccd2600d78a30464
Partial-bug: 1433216

9 years agoMerge "Hitachi: Fix access to volume instance_uuid"
Jenkins [Mon, 30 Mar 2015 19:57:21 +0000 (19:57 +0000)]
Merge "Hitachi: Fix access to volume instance_uuid"

9 years agoRemove LP bug ref in remove_iscsi_device
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.

Change-Id: I98bca9e3a98383c994bc49426a71d944e10fae17

9 years agoFix potential access to missing key
Walter A. Boring IV [Mon, 30 Mar 2015 17:10:45 +0000 (10:10 -0700)]
Fix potential access to missing key

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.

Change-Id: I45496e4325122ba20e79351f85945ca9804eaa61
Closes-Bug: 1438141

9 years agoBrick: Fix race in removing iSCSI device
Walter A. Boring IV [Fri, 27 Mar 2015 22:34:40 +0000 (15:34 -0700)]
Brick: Fix race in removing iSCSI device

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.

Change-Id: I5db9744da6b865b7d903503db8a895b409f32f5c
Closes-Bug: 1437441

9 years agoMerge "SMBFS: Fix missing volume provider location"
Jenkins [Mon, 30 Mar 2015 16:05:24 +0000 (16:05 +0000)]
Merge "SMBFS: Fix missing volume provider location"

9 years agoMerge "Properly remove host object from ISE"
Jenkins [Sun, 29 Mar 2015 19:08:39 +0000 (19:08 +0000)]
Merge "Properly remove host object from ISE"

9 years agoMerge "Use cached values for stats on query failures for vmem drivers"
Jenkins [Sun, 29 Mar 2015 06:33:46 +0000 (06:33 +0000)]
Merge "Use cached values for stats on query failures for vmem drivers"

9 years agoFix the format of the system name in VMAX driver
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.

Change-Id: Ie7e349db13d6ad2562a296d3d0cb66089a54b800
Closes-Bug: #1437490

9 years agoHitachi: Fix access to volume instance_uuid
Walter A. Boring IV [Thu, 26 Mar 2015 05:04:00 +0000 (05:04 +0000)]
Hitachi: Fix access to volume instance_uuid

The instance_uuid and attached_host no longer exists
in the volume object.  It's part of the attachments that
show up in volume['volume_attachment'].

This patch now tests to see if there are any volume
attachments at all via the volume['volume_attachment'] list.

Change-Id: I6b06adaf408e9458a9d4d8c73a6749bd3a282340
Closes-Bug: 1436605

9 years agoVMware: Fix ImageNotAuthorized during copy volume
Vipin Balachandran [Fri, 27 Mar 2015 13:09:04 +0000 (06:09 -0700)]
VMware: Fix ImageNotAuthorized during copy volume

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.

This bug was introduced by commit 960cbb21e359a3526e9ff9bf4ca78db1eca3a743.

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.

Change-Id: Ib7778b6c7a3e8dd501216173a26d7ba246aa85e4
Closes-Bug: #1437319

9 years agoFix: Boot from image with HNAS iSCSI
Rafael Toschi Chiafarelli [Mon, 23 Mar 2015 16:36:35 +0000 (13:36 -0300)]
Fix: Boot from image with HNAS iSCSI

Number of the logical unit was passed to the run_cmd function as a integer and
should be passed as a string.

Change-Id: I9a66c46294f85fb19b2a01f0cde8f231467f936f
Closes-Bug: #1430778

9 years agoSMBFS: Fix missing volume provider location
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.

Change-Id: Id7435676052885d301a48fa5ac224071e18ecf5b
Closes-Bug: #1437271

9 years agoEnhance VNX Cinder volume creation logic
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.

Change-Id: Ifb152b3b9c59ce0d5c875129a7bf0503740d5a3a
Closes-Bug: 1436241

9 years agoMerge "Properly use obj_extra_fields in objects"
Jenkins [Thu, 26 Mar 2015 23:35:50 +0000 (23:35 +0000)]
Merge "Properly use obj_extra_fields in objects"

9 years agoMerge "Create unit tests for volume objects"
Jenkins [Thu, 26 Mar 2015 23:35:17 +0000 (23:35 +0000)]
Merge "Create unit tests for volume objects"

9 years agoMerge "Windows: Fixes wintypes import issue in vhdutils"
Jenkins [Thu, 26 Mar 2015 22:54:00 +0000 (22:54 +0000)]
Merge "Windows: Fixes wintypes import issue in vhdutils"

9 years agoMerge "Windows iSCSI: fix volume clone"
Jenkins [Thu, 26 Mar 2015 22:19:19 +0000 (22:19 +0000)]
Merge "Windows iSCSI: fix volume clone"

9 years agoMerge "Eager load volume extra specs"
Jenkins [Thu, 26 Mar 2015 22:12:54 +0000 (22:12 +0000)]
Merge "Eager load volume extra specs"

9 years agoProperly use obj_extra_fields in objects
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.

Change-Id: Ie2b8dc66c897f89f941e9ad3b80ec4f4ab346430
Closes-Bug: #1429889

9 years agoCreate unit tests for volume objects
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.

Change-Id: I9febfdf94c4d8c82defedf0ceaec03800552affe
Implements: blueprint cinder-objects
Closes-Bug: #1434571

9 years agoMerge "VMware: Fixed usage of volume instance_uuid"
Jenkins [Thu, 26 Mar 2015 19:11:02 +0000 (19:11 +0000)]
Merge "VMware: Fixed usage of volume instance_uuid"

9 years agoMerge "Imported Translations from Transifex"
Jenkins [Thu, 26 Mar 2015 17:58:32 +0000 (17:58 +0000)]
Merge "Imported Translations from Transifex"

9 years agoMerge "Move to hacking 0.10"
Jenkins [Thu, 26 Mar 2015 17:57:06 +0000 (17:57 +0000)]
Merge "Move to hacking 0.10"

9 years agoFix incorrect invocation of _add_to_threadpool
Ian Denhardt [Thu, 26 Mar 2015 01:47:47 +0000 (21:47 -0400)]
Fix incorrect invocation of _add_to_threadpool

_add_to_threadpool expects to be passed the function and which is to be
run in an alternate thread, and the function's arguments. Instead, the
function (self.delete_volume) was being invoked directly, and it's
result passed to _add_to_threadpool. This results in a TypeError being
raised (the result is a bool, which is not callable), but more
importantly, it defeats the purpose of the statement - to offload the
invocation of delete_volume to another thread.

Change-Id: I524156cbffe0f6f5a2da902c6a62417d1ec425b9
Closes-Bug: #1436624

9 years agoMerge "Syncing versionutils from oslo-incubator"
Jenkins [Thu, 26 Mar 2015 14:52:40 +0000 (14:52 +0000)]
Merge "Syncing versionutils from oslo-incubator"

9 years agoVMware: Fixed usage of volume instance_uuid
Walter A. Boring IV [Thu, 26 Mar 2015 05:09:59 +0000 (05:09 +0000)]
VMware: Fixed usage of volume instance_uuid

instance_uuid and attached_host no longer exist in the volume object.
They have been moved into the volume_attachment list attachments.

This patch now tests for non-empty volume_attachment list instead of
testing the existence of a non None value of instance_uuid.

Change-Id: I04c46dc49849fb1e0abf955dcc6d7ec1ce5e57a5
Closes-Bug: 1436603

9 years agoChange volume and snapshot stuck creating to error
Yasuaki Nagata [Thu, 22 Jan 2015 08:45:08 +0000 (17:45 +0900)]
Change volume and snapshot stuck creating to error

Service of volume goes down after the status of
the volume is turned 'creating', volume to remain with
the status of the 'creating'.

Status of the volume is still 'creating' even if
volume service is restarted, it is impossible for user
to remove it without force-delete.

With this patch, in order to keep consistence with Nova,
volume state 'creating' should be shifted to the 'error' properly.

Closes-Bug: #1310526
Co-Authored-By: Ivan Kolodyazhny <e0ne@e0ne.info>
Change-Id: I89ef201f25b739cc443cb2920de2bd6ce89d97e1

9 years agoMerge "The value of netapp_storage_protocol should default to none"
Jenkins [Thu, 26 Mar 2015 07:41:31 +0000 (07:41 +0000)]
Merge "The value of netapp_storage_protocol should default to none"

9 years agoMerge "Fixed access to instance_uuid in retype"
Jenkins [Thu, 26 Mar 2015 07:41:21 +0000 (07:41 +0000)]
Merge "Fixed access to instance_uuid in retype"

9 years agoMerge "Sort list of cinder_object.changes"
Jenkins [Thu, 26 Mar 2015 07:41:11 +0000 (07:41 +0000)]
Merge "Sort list of cinder_object.changes"

9 years agoMerge "Fix typo in cinder/cinder/volume/drivers/emc_vmax"
Jenkins [Thu, 26 Mar 2015 07:36:15 +0000 (07:36 +0000)]
Merge "Fix typo in cinder/cinder/volume/drivers/emc_vmax"

9 years agoImported Translations from Transifex
OpenStack Proposal Bot [Thu, 26 Mar 2015 06:08:06 +0000 (06:08 +0000)]
Imported Translations from Transifex

For more information about this automatic import see:
https://wiki.openstack.org/wiki/Translations/Infrastructure

Change-Id: I77d55f05ea387e764539231006a35ec46b7c18aa

9 years agoFixed access to instance_uuid in retype
Walter A. Boring IV [Wed, 25 Mar 2015 23:33:16 +0000 (16:33 -0700)]
Fixed access to instance_uuid in retype

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.

Change-Id: I8844cd8c2947845f9efb11a2a1371efee2d28bbe
Closes-Bug: 1436604

9 years agoMerge "Added the missing attachment to detach_volume"
Jenkins [Wed, 25 Mar 2015 23:01:45 +0000 (23:01 +0000)]
Merge "Added the missing attachment to detach_volume"

9 years agoEager load volume extra specs
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.

Change-Id: Iffdb160a4a968067261aa90638832782caed5ed0
Closes-Bug: #1436418

9 years agoBe safe with getting attachment
Walter A. Boring IV [Mon, 23 Mar 2015 23:39:37 +0000 (16:39 -0700)]
Be safe with getting attachment

The volume manager wasn't being safe with trying to pull an
attachment out of the attachments list.  It's possible someone
is calling the manager to detach a volume that has no attachments.

This patch raises an InvalidVolume exception if we detect that
there are no attachments left to detach.

Change-Id: I684ed870d13a4efc6f64b0144c987e355428bc54
Closes-Bug: #1435574

9 years agoAdded the missing attachment to detach_volume
Walter A. Boring IV [Wed, 25 Mar 2015 16:35:51 +0000 (09:35 -0700)]
Added the missing attachment to detach_volume

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.

Change-Id: I895c163e67d35df202a5490a7a31ee7fc13a0cb4
Closes-Bug: #1436367

9 years agoMake lio iSCSI changes persistent to avoid lost
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.

Closes-Bug: #1427301
Change-Id: I74bd09ed16a2e0e584d3e04762aec8cbdf101f6d

9 years agoMerge "Updated from global requirements"
Jenkins [Wed, 25 Mar 2015 15:17:15 +0000 (15:17 +0000)]
Merge "Updated from global requirements"

9 years agoSort list of cinder_object.changes
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.

Change-Id: I3a80396c5c897de26e982fa6426e7720a09c1375
Closes-Bug: #1434154

9 years agoMove to hacking 0.10
Joe Gordon [Tue, 24 Mar 2015 23:15:19 +0000 (19:15 -0400)]
Move to hacking 0.10

Release notes: http://lists.openstack.org/pipermail/openstack-dev/2015-January/054165.html

Ignore some new rules that have more then 10 failures, fix ones that
have fewer.

Removed deleted hacking rules from tox.ini

Note: One of the main benefits of the new hacking, is flake8 enables
concurrency by default now, so it should be much faster.

Change-Id: Ie650fa3dc91434967ad05e61edd3bcc1d833bfb1

9 years agoSyncing versionutils from oslo-incubator
Michal Dulko [Wed, 25 Mar 2015 11:03:51 +0000 (12:03 +0100)]
Syncing versionutils from oslo-incubator

This is to fix deprecation warnings caused by a fact that version
that's currently in Cinder imports oslo.config instead of
oslo_config.

Change-Id: Iaf0bea76e5bb389cb052de1ecb34a8b24ae39343
Closes-Bug: 1436270

9 years agoMerge "Enable request-id in cinder API logs"
Jenkins [Wed, 25 Mar 2015 04:38:17 +0000 (04:38 +0000)]
Merge "Enable request-id in cinder API logs"

9 years agoMerge "Fix: Synchronise Quobyte Share mounting"
Jenkins [Wed, 25 Mar 2015 00:31:52 +0000 (00:31 +0000)]
Merge "Fix: Synchronise Quobyte Share mounting"

9 years agoMerge "Dell Storage Center API change fails init_conn"
Jenkins [Tue, 24 Mar 2015 23:00:18 +0000 (23:00 +0000)]
Merge "Dell Storage Center API change fails init_conn"

9 years agoMerge "Simplify cxt test_create_export() unit test"
Jenkins [Tue, 24 Mar 2015 22:29:34 +0000 (22:29 +0000)]
Merge "Simplify cxt test_create_export() unit test"

9 years agoProperly remove host object from ISE
Richard Hedlind [Fri, 20 Mar 2015 02:30:39 +0000 (20:30 -0600)]
Properly remove host object from ISE

This removes host object from ISE when terminate_connection
detects no more allocations for that host.

Change-Id: I31cc27bc95efaab3dca0c9a4c833655c43b73abf
Closes-Bug: 1433450

9 years agoDell Storage Center API change fails init_conn
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.

Change-Id: I6ae6870d46937089bd6ed8799895f7068eebf01d
Closes-Bug: 1435935

9 years agoWindows iSCSI: fix volume clone
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.

Change-Id: I07d45fa9324a34ef45ed2aa8051338ee6a0f8a5b
Closes-Bug: #1435865

9 years agoEnable request-id in cinder API logs
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.

Change-Id: If312f419fb465c9128bcfa0a280d6c35a46cb29b
Closes-Bug: #1435588

9 years agoUse cached values for stats on query failures for vmem drivers
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.

Change-Id: I218a54897361d739c04963b4c36d93620be01fb3
Closes-Bug: 1433990

9 years agoMerge "Change leftover oslo.* to oslo_*"
Jenkins [Mon, 23 Mar 2015 22:03:14 +0000 (22:03 +0000)]
Merge "Change leftover oslo.* to oslo_*"

9 years agoMerge "Tests: Fix az test failure when PYTHONHASHSEED != 0"
Jenkins [Mon, 23 Mar 2015 21:45:36 +0000 (21:45 +0000)]
Merge "Tests: Fix az test failure when PYTHONHASHSEED != 0"