]> review.fuel-infra Code Review - openstack-build/cinder-build.git/log
openstack-build/cinder-build.git
9 years agoMerge "Windows SMBFS: fix volume extend" into stable/kilo
Jenkins [Wed, 22 Apr 2015 15:23:42 +0000 (15:23 +0000)]
Merge "Windows SMBFS: fix volume extend" into stable/kilo

9 years agoMerge "Verify all quotas before updating the database" into stable/kilo
Jenkins [Wed, 22 Apr 2015 15:22:18 +0000 (15:22 +0000)]
Merge "Verify all quotas before updating the database" into stable/kilo

9 years agoMerge "Include boot properties from glance v2 images" into stable/kilo
Jenkins [Wed, 22 Apr 2015 15:20:13 +0000 (15:20 +0000)]
Merge "Include boot properties from glance v2 images" into stable/kilo

9 years agoMerge "Add locking to PureISCSIDriver around creating Purity Host objects." into...
Jenkins [Wed, 22 Apr 2015 15:18:00 +0000 (15:18 +0000)]
Merge "Add locking to PureISCSIDriver around creating Purity Host objects." into stable/kilo

9 years agoWindows SMBFS: fix volume extend
Lucian Petrut [Fri, 27 Mar 2015 12:15:25 +0000 (14:15 +0200)]
Windows SMBFS: fix volume extend

The Windows SMBFS driver inherits the Linux SMBFS driver,
overriding Windows specific methods.

This commit Ic89cffc93940b7b119cfcde3362f304c9f2875df added the
volume name as an extra argument to the _do_extend_volume in order
to check if differencing images are pointing to backing files other
than the according volume disks.

Although this is not required on Windows, this method should accept
this extra argument in order to have the same signature as the
method it overrides. At the moment, this raises the following
exception:

TypeError: _do_extend_volume() takes exactly 3 arguments (4 given)

Closes-Bug: #1437290
(cherry picked from commit dca29e9ab3cdde210d3777e7c6b4a6849447058a)
Change-Id: I868d7de4a2c68f3fc520ba476a5660a84f440bb1

9 years agoupdate .gitreview for stable/kilo
Thierry Carrez [Fri, 17 Apr 2015 08:31:32 +0000 (10:31 +0200)]
update .gitreview for stable/kilo

Change-Id: I64a4fc6af6f83b2d8a6bb5fe9aa0dc3acd58e4ce

9 years agoUpdated from global requirements
OpenStack Proposal Bot [Thu, 16 Apr 2015 12:04:22 +0000 (12:04 +0000)]
Updated from global requirements

Change-Id: I49730dab41606a457645ca33d6af79639001a0f4

9 years agoVerify all quotas before updating the database
ankitagrawal [Tue, 17 Mar 2015 09:08:12 +0000 (02:08 -0700)]
Verify all quotas before updating the database

Update quota multi-value in one request is not an atomic operation, so
even if a quota is invalid (e.g., volumes has a non-integer value),
some values may change but the response code is 400.

This patch will make sure the quota limits are of integer type for all
the requested quota keys before updating the database.

Closes-Bug: 1432972
Change-Id: If83af0a80489887098e52b03b9c4012e3ef061b5
(cherry picked from commit 197299985a52535ad995dbd111491b58462f140a)

9 years agoAdd locking to PureISCSIDriver around creating Purity Host objects.
Patrick East [Wed, 15 Apr 2015 01:42:19 +0000 (18:42 -0700)]
Add locking to PureISCSIDriver around creating Purity Host objects.

This will prevent us from getting conflicting credentials for
connection methods which will result in iSCSI attach operations to fail.

Change-Id: Ia206e7b5ff330c8fccb49ed23a31b120a5c04eb3
Closes-Bug: 1444224
(cherry picked from commit a712afe42833443878898bb42851376cd8615ff9)

9 years agoInclude boot properties from glance v2 images
Jon Bernard [Tue, 7 Apr 2015 17:57:36 +0000 (13:57 -0400)]
Include boot properties from glance v2 images

In order for users to take advantage of COW volumes created from
a glance image, Cinder must be configured to use Glance API version
2 (default is 1). In version 2, the required boot metadata (kernel_id
and ramdisk_id) are no long stored in the 'properties' dict, but as
standalone fields in the GET response from glance. The existing cinder
parser for the glance request is not aware of this and the volume
created form a v2 image will lack this required metadata.

This was causing the recent Ceph CI gate failures for
test_volume_boot_pattern.

Change-Id: I688898b3841691369d73887f7eabdceb05155db1
Closes-Bug: #1439371
(cherry picked from commit ea109b5f24dca93fd6f660bc436a685d6101bcea)

9 years agoMerge "Create initiator id if not exist in VMAX driver"
Jenkins [Thu, 9 Apr 2015 10:08:50 +0000 (10:08 +0000)]
Merge "Create initiator id if not exist in VMAX driver"

9 years agoMerge "Fix the unicode encode error when create volume"
Jenkins [Thu, 9 Apr 2015 04:41:50 +0000 (04:41 +0000)]
Merge "Fix the unicode encode error when create volume"

9 years agoMerge "GlusterFS: Returning provider location of volume from snapshot"
Jenkins [Thu, 9 Apr 2015 02:41:14 +0000 (02:41 +0000)]
Merge "GlusterFS: Returning provider location of volume from snapshot"

9 years agoMerge "Fix multipath device discovery when UFN is enabled."
Jenkins [Wed, 8 Apr 2015 20:27:27 +0000 (20:27 +0000)]
Merge "Fix multipath device discovery when UFN is enabled."

9 years agoMerge "Revert "Removing Windows drivers""
Jenkins [Wed, 8 Apr 2015 18:52:14 +0000 (18:52 +0000)]
Merge "Revert "Removing Windows drivers""

9 years agoMerge "Delete the temporary volume if migration fails"
Jenkins [Wed, 8 Apr 2015 12:52:51 +0000 (12:52 +0000)]
Merge "Delete the temporary volume if migration fails"

9 years agoMerge "Rbd update volume stats in wrong way"
Jenkins [Wed, 8 Apr 2015 12:52:39 +0000 (12:52 +0000)]
Merge "Rbd update volume stats in wrong way"

9 years agoGlusterFS: Returning provider location of volume from snapshot
Bharat Kumar Kobagana [Wed, 8 Apr 2015 06:32:32 +0000 (12:02 +0530)]
GlusterFS: Returning provider location of volume from snapshot

This patch returns the provider location of volume, which is
created from snapshot.

Partial-Bug: 1441050
Reported-By: Deepak C Shetty <deepakcs@redhat.com>
Change-Id: I5994f2f6c125888d442055d9e65355f0af1b22f4

9 years agoMerge "Correct cinder hacking check numbering"
Jenkins [Wed, 8 Apr 2015 09:15:43 +0000 (09:15 +0000)]
Merge "Correct cinder hacking check numbering"

9 years agoMerge "Add hacking check for print() statements"
Jenkins [Wed, 8 Apr 2015 08:28:34 +0000 (08:28 +0000)]
Merge "Add hacking check for print() statements"

9 years agoDelete the temporary volume if migration fails
Vincent Hou [Tue, 3 Mar 2015 08:04:41 +0000 (16:04 +0800)]
Delete the temporary volume if migration fails

Issues resolved in this patch include the following changes:
* A temporary volume is created on the destination host before migrating
the data from the source. However, if the creation of this volume fails,
its record will be left in the database as redundant information. This
patch will remove the database record if the creation fails.

* If attaching the remote dest volme fails at initialize_connection
due to timeout, we need to terminate the connection. Otherwise, the dest
volume will not be released and successfully deleted.

Closes-bug: #1398177
Change-Id: I5bc75bd7652841fddd66481ee001fb682168215c

9 years agoRevert "Removing Windows drivers"
Mike Perez [Wed, 8 Apr 2015 06:06:57 +0000 (23:06 -0700)]
Revert "Removing Windows drivers"

This reverts commit 85f0814e1a96ea043e8048cf7081f70fa024f20b.

Change-Id: I0b078a60e8d9c95d12185d1ff3ffe74fb71f10ab

9 years agoMerge "Partial Revert "Removing ZFSSA driver""
Jenkins [Tue, 7 Apr 2015 23:56:57 +0000 (23:56 +0000)]
Merge "Partial Revert "Removing ZFSSA driver""

9 years agoMerge "Add missing copy_volume_to_image method to Sheepdog driver"
Jenkins [Tue, 7 Apr 2015 21:40:17 +0000 (21:40 +0000)]
Merge "Add missing copy_volume_to_image method to Sheepdog driver"

9 years agoMerge "Partial Revert "Removing Huawei drivers""
Jenkins [Tue, 7 Apr 2015 21:37:35 +0000 (21:37 +0000)]
Merge "Partial Revert "Removing Huawei drivers""

9 years agoMerge "Set volume_attachment to [] for the temporary volume creation"
Jenkins [Tue, 7 Apr 2015 20:28:49 +0000 (20:28 +0000)]
Merge "Set volume_attachment to [] for the temporary volume creation"

9 years agoCorrect cinder hacking check numbering
Jay S. Bryant [Mon, 6 Apr 2015 19:02:31 +0000 (14:02 -0500)]
Correct cinder hacking check numbering

We have a couple of hacking checks that are specific to
Cinder that were written a while back.  Unfortunately, when
they were written the numbering scheme for hacking checks was
not understood.  We used N3xx when we should have used C3xx.

This patch corrects that mistake.

Change-Id: Ia17797005d444ab53a45b47b80b97799114001ee
Closes-bug: 1440833

9 years agoAdd hacking check for print() statements
Jay S. Bryant [Mon, 6 Apr 2015 16:22:09 +0000 (11:22 -0500)]
Add hacking check for print() statements

We are frequently having to -1 patches because people
forget print() statements that were used for debug in
their development.  Can save everyone time and trouble by
adding this simple hacking check.

The check excluded the cinder/cmd directory as the files in there
legitimately need to use the print() command.  Also wsgi.py and
the test_hds_nas_backend.py files make use of print, so I have
excluded those from checking as well.

Change-Id: I2066eeb2bdc6c9af294d0b9befb7e0b32abd1378

9 years agoRbd update volume stats in wrong way
wuyuting [Fri, 20 Mar 2015 10:41:11 +0000 (18:41 +0800)]
Rbd update volume stats in wrong way

Cinder volume uses a RADOS pool to store volumes and
update storage stats periodically. However, rbd driver
reports the whole cluster stats but not the pool's. This
is wrong. The right way is to report the pool stats but
not the whole cluster.

Change-Id: Ie18324ebd8b85f7b63dc034ba20857ae9e470804
Closes-Bug: #1434441

9 years agoAdd missing copy_volume_to_image method to Sheepdog driver
YAMADA Hideki [Wed, 4 Mar 2015 18:11:23 +0000 (18:11 +0000)]
Add missing copy_volume_to_image method to Sheepdog driver

Copy Volume to Image feature is required since Havana release.
The Sheepdog driver has not implemented it.

Change-Id: I940095be7ed3721cc8f1bafde821fbb420d305d0
Closes-Bug: #1426431

9 years agoPartial Revert "Removing Huawei drivers"
Mike Perez [Mon, 6 Apr 2015 04:40:47 +0000 (21:40 -0700)]
Partial Revert "Removing Huawei drivers"

This reverts commit 5e26b0c1d1ae1984e51ae47441e8a243f224bf29.

Change-Id: Iad7c1afff1a932876255a37fc0b5bf5993246aaa

9 years agoMerge "More error handling on EMC VNX migration failure"
Jenkins [Tue, 7 Apr 2015 04:36:22 +0000 (04:36 +0000)]
Merge "More error handling on EMC VNX migration failure"

9 years agoMerge "Fixed encrypted property for 3PAR FC and iSCSI drivers"
Jenkins [Tue, 7 Apr 2015 03:47:40 +0000 (03:47 +0000)]
Merge "Fixed encrypted property for 3PAR FC and iSCSI drivers"

9 years agoCreate initiator id if not exist in VMAX driver
Xing Yang [Sat, 4 Apr 2015 22:25:48 +0000 (18:25 -0400)]
Create initiator id if not exist in VMAX driver

This problem was discovered in a customer's environment. If the
initiator id (hardware id SMI-S instance) does not exist on the
array, the attach volume operation will fail. In this patch,
the initiator id will be created if it doesn't exist.

Change-Id: I868118528d831a9f49081a6393e64eb7a414b36f
Closes-Bug: #1440427

9 years agoMerge "Revert "Removing Netapp FC drivers for no reported CI""
Jenkins [Mon, 6 Apr 2015 16:59:13 +0000 (16:59 +0000)]
Merge "Revert "Removing Netapp FC drivers for no reported CI""

9 years agoFixed encrypted property for 3PAR FC and iSCSI drivers
Anthony Lee [Fri, 3 Apr 2015 05:07:27 +0000 (22:07 -0700)]
Fixed encrypted property for 3PAR FC and iSCSI drivers

3PAR FC and iSCSI drivers were not returning the 'encrypted'
property when initialize_connection was called. This patch
adds that property to the returned info.

Closes-Bug: #1439917
Change-Id: Icfbebd055ea1bae1fc4749b441eb4f90fa1bfacd

9 years agoPartial Revert "Removing ZFSSA driver"
Mike Perez [Mon, 6 Apr 2015 05:13:03 +0000 (22:13 -0700)]
Partial Revert "Removing ZFSSA driver"

This reverts commit c742566a6920f7260573fbd0dc71a5cc1e4a2311.

However, the ZFSSA iSCSI driver is still left out because there is no CI
for it.

Change-Id: Ibf830f295043624ca9a5dc90f1e3a897cb64915f

9 years agoMerge "Check volume status in detach db api"
Jenkins [Mon, 6 Apr 2015 13:40:26 +0000 (13:40 +0000)]
Merge "Check volume status in detach db api"

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 multipath device discovery when UFN is enabled.
Lee Yarwood [Thu, 2 Apr 2015 14:46:38 +0000 (15:46 +0100)]
Fix multipath device discovery when UFN is enabled.

This currently returns an invalid path of `/dev/mapper/${WWID}`
when UFN is enabled leading to failures later on when we attempt to
use the device.

The output of `multipath -l ${path}` or `multipath -l ${wwid}`
should always list the correct device identifier to use with this
path as the first word on the first line.

Closes-Bug: 1401799
Change-Id: Ib371b699fadcbbbb666e08eb0124c442e94a55e8

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 agoMore error handling on EMC VNX migration failure
Jeegn Chen [Tue, 10 Feb 2015 03:26:24 +0000 (11:26 +0800)]
More error handling on EMC VNX migration failure

If a LUN migration session is stopped or faulted after started,
current implementation of VNX Cinder Driver only wait for timeout
and no logic will clean up the broken migration session.

This patch adds logic to detect and clean up the stopped/faulted
migration session.

Change-Id: If66109ca45fce303390c4144b4120e75f1aae138
Closes-Bug: #1420075

9 years agoSet volume_attachment to [] for the temporary volume creation
Vincent Hou [Tue, 24 Mar 2015 08:30:13 +0000 (16:30 +0800)]
Set volume_attachment to [] for the temporary volume creation

A new table volume_attachment has been added recently. During the
creation of the temporary volume in migration, the attribute
volume_attachment is not empty if an attached volume is going to be
migrated, because all the properties are simply copied.
This non-empty attribute volume_attachment leads to the failure of
the volume creation. This patch removes this attribute before the
temporary volume creation.

Besides, detach the volume should consider multi-attach as well by
adding the attachment id parameter.

Change-Id: I7c2f69945ee8d72b2dba4e68a91b872207df5310
Closes-bug: #1433019

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 agoRevert "Removing Netapp FC drivers for no reported CI"
Alex Meade [Fri, 27 Mar 2015 18:15:00 +0000 (14:15 -0400)]
Revert "Removing Netapp FC drivers for no reported CI"

This reverts commit 3ee75e73938a8ca069674269bc21f13720e4b6d5.

Change-Id: Idd7e3bd0df393f61ba9c5011166b7d5ba196753b

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 agoCheck volume status in detach db api
Abhijeet Malawade [Thu, 22 Jan 2015 13:53:42 +0000 (05:53 -0800)]
Check volume status in detach db api

If a volume is detached while uploading volume to image is in progress then
it sets volume status to available and then it is allowed to delete it
immediately while uploading is still running in background.

Set the status to available in the detach db api only when the volume
is not migrating and status is not uploading.

Closes-Bug: 1413887
Change-Id: I6df9c6918825fba7c8d7cd6521752b399dd61610

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