]> review.fuel-infra Code Review - openstack-build/cinder-build.git/log
openstack-build/cinder-build.git
11 years agoMerge "Fix typo in cinder.tests.test_create_volume_flow"
Jenkins [Thu, 12 Sep 2013 00:12:19 +0000 (00:12 +0000)]
Merge "Fix typo in cinder.tests.test_create_volume_flow"

11 years agoMerge "Fix deleting qos specs key"
Jenkins [Wed, 11 Sep 2013 16:49:25 +0000 (16:49 +0000)]
Merge "Fix deleting qos specs key"

11 years agoMerge "Adds Dell EqualLogic volume driver for Cinder"
Jenkins [Wed, 11 Sep 2013 15:50:47 +0000 (15:50 +0000)]
Merge "Adds Dell EqualLogic volume driver for Cinder"

11 years agoMerge "Move novaclient to requirements.txt"
Jenkins [Wed, 11 Sep 2013 14:24:07 +0000 (14:24 +0000)]
Merge "Move novaclient to requirements.txt"

11 years agoMerge "fix missing unit in log message"
Jenkins [Wed, 11 Sep 2013 14:24:04 +0000 (14:24 +0000)]
Merge "fix missing unit in log message"

11 years agoAdds Dell EqualLogic volume driver for Cinder
Alexander Gordeev [Fri, 31 May 2013 09:22:38 +0000 (13:22 +0400)]
Adds Dell EqualLogic volume driver for Cinder

Change-Id: I9668c99de5e14b6a94a52f3ef0cbb8a8d7e18b85
Implements: blueprint eql-volume-driver

11 years agoMerge "Fixed erroneous force full copy in ceph backup driver"
Jenkins [Wed, 11 Sep 2013 12:29:39 +0000 (12:29 +0000)]
Merge "Fixed erroneous force full copy in ceph backup driver"

11 years agoMerge "NetApp NFS efficient clone_image impl"
Jenkins [Wed, 11 Sep 2013 11:16:30 +0000 (11:16 +0000)]
Merge "NetApp NFS efficient clone_image impl"

11 years agoFix deleting qos specs key
Zhiteng Huang [Tue, 10 Sep 2013 08:39:52 +0000 (16:39 +0800)]
Fix deleting qos specs key

Previously deleting a key in certain qos specs was accomplished via
'update' API. Unfortunately, 'update' isn't able to tell the
difference between setting a key with no value and deleting a key (and
its value).
This change adds an new API 'delete_keys' to qos_specs API extension.
'delete_keys' API allows client to specify a list of to-be-deleted keys
in one single request (batch mode!), which can be handy when removing
multiple keys in a qos specs.

Example URL and request body for 'delete_keys' API:
 PUT to http://127.0.0.1:8776/v2/qos-specs/QOS_SPECS_UUID/delete_keys
 with body: {'keys': ['foo', 'bar', 'zoo']}

Above example request will result in 'foo', 'bar', 'zoo' key/value
pairs of QOS_SPECS_UUID be marked as deleted in DB.  If QOS_SPECS_UUID
doesn't exist, a 404 error will return; if any key in 'foo', 'bar',
'zoo' couldn't be found in QOS_SPECS_UUID, a 400 error will return with
error message telling which key couldn't be found. Note that Cinder
will puke 400 and stop trying the rest once it encounters a
non-existing (or deleted) key amoung the given list of keys.

This change also fixes 'list'/'show' API includes deleted keys in
result.

Fix bug: # 1223660
Fix bug: # 1223677

Change-Id: Ia3cb07e204d655a9b837b317ce7117feb3c86a2d

11 years agoMove novaclient to requirements.txt
Eric Harney [Wed, 11 Sep 2013 02:44:08 +0000 (22:44 -0400)]
Move novaclient to requirements.txt

novaclient is a runtime requirement in Havana both for volume
migration and qemu-assisted-snapshots.

Closes-Bug: #1223484
Change-Id: Ie7e8be2d0edf00cdb04f980a6aa247e04807bf67

11 years agofix missing unit in log message
Kun Huang [Tue, 10 Sep 2013 15:34:26 +0000 (23:34 +0800)]
fix missing unit in log message

Bad log message:
    "extend volume 1 to 2"
Correct one:
    "extend volume 1 GB to 2 GB"

(also update my profile in .mailmap)

Change-Id: I6d229c4440f2f5443b45a10f3912c20e21c63f32

11 years agoMerge "Add check for qemu-img to image_utils fetch_to_raw"
Jenkins [Tue, 10 Sep 2013 22:33:47 +0000 (22:33 +0000)]
Merge "Add check for qemu-img to image_utils fetch_to_raw"

11 years agoMerge "Fix bug in Nexenta NFS driver _do_create_volume"
Jenkins [Tue, 10 Sep 2013 19:23:14 +0000 (19:23 +0000)]
Merge "Fix bug in Nexenta NFS driver _do_create_volume"

11 years agoAdd check for qemu-img to image_utils fetch_to_raw
Jay S. Bryant [Mon, 12 Aug 2013 17:55:48 +0000 (12:55 -0500)]
Add check for qemu-img to image_utils fetch_to_raw

Some platforms, particularly PowerPC systems running RHEL,
do not have qemu-img installed by default and do not
support image formats other than RAW.  For these systems,
functions/drivers that use fetch_to_raw() currently fail
because it is assumed that qemu-img will always be installed.

This change updates fetch_to_raw() to function more like the
upload_volume() function which checks the image format and skips
any conversion if the image is already in the RAW format. To
minimize the impact upon platforms that have qemu-img installed
this is being implemented by checking to see if qemu-img is
installed.  If it is installed, no changes are made to the flow
through fetch_to_raw.  If qemu-img is not available and the image
format is not already RAW, an exception is thrown.  Otherwise,
the image is downloaded and we do not progress to the portions of
fetch_to_raw that require qemu-img to be installed.

This commit also updates the test cases that touch this code.

Closes-bug: 1200800

Change-Id: I34540dfa238a8b8e61ff5c30c7e121130bad39b4

11 years agoFixed erroneous force full copy in ceph backup driver
Edward Hope-Morley [Fri, 6 Sep 2013 19:40:38 +0000 (20:40 +0100)]
Fixed erroneous force full copy in ceph backup driver

The following steps should not result in a forced full copy:

1. create vol
2. create backup (works fine i.e. uses incremental diff)
3. delete backup
4. create new backup (full copy forced because volume backup-snap exists and is not ignored)

This patch resolves the above problem.

Change-Id: I61c245219f54f7ee942e06e343c5d79d4cab947b
Fixes: bug #1221836
11 years agoMerge "Call to_primitive on volumes.rpcapi.create_volume"
Jenkins [Tue, 10 Sep 2013 12:01:56 +0000 (12:01 +0000)]
Merge "Call to_primitive on volumes.rpcapi.create_volume"

11 years agoCall to_primitive on volumes.rpcapi.create_volume
Flaper Fesp [Wed, 4 Sep 2013 11:29:22 +0000 (13:29 +0200)]
Call to_primitive on volumes.rpcapi.create_volume

cinder.volume.rpcapi.create_volume does not convert the request_spec to
primitive before casting the request. This makes requests containing non
primitive types to fail. For example:

cinder create --metadata=Type=test --source-volid $VOLID 1

This will create a new database record and call create_volume on
volume.rpcapi.  This will fail because VolumeMetadata won't be
serialized correctly when calling cast. This, however, is not True when
--source-volid is not passed because in such case,
scheduler.rpcpai.create_volume will be called, which converts
request_spec to primitive correctly.

Closes-Bug: #1213964
Change-Id: I096d815254c9782390fba05ea9cd9af925635402

11 years agoFix typo in cinder.tests.test_create_volume_flow
Zhongyue Luo [Mon, 9 Sep 2013 14:18:33 +0000 (22:18 +0800)]
Fix typo in cinder.tests.test_create_volume_flow

Mock is 3rd party so should be placed after 'time' package.
Changed sheduler -> scheduler

Change-Id: I9c8ef7980c0444a725232d03c29b39d4805586ff

11 years agoMerge "Fix Qos Specs association corner case"
Jenkins [Tue, 10 Sep 2013 06:17:06 +0000 (06:17 +0000)]
Merge "Fix Qos Specs association corner case"

11 years agoMerge "fix log string in conversion type"
Jenkins [Tue, 10 Sep 2013 05:43:08 +0000 (05:43 +0000)]
Merge "fix log string in conversion type"

11 years agoFix Qos Specs association corner case
Zhiteng Huang [Mon, 9 Sep 2013 06:53:37 +0000 (14:53 +0800)]
Fix Qos Specs association corner case

Fix a corner case in associating QoS Specs with Volumt types that was
not handled well: Raise HTTPBadRequest() to client if associate volume
type, which is already associated one qos specs other than specified
qos specs.  Previously such operation will proceed without error which
results overwriting original association.

Also refactor DB API volume_type_qos_specs_get() to return qos specs
in consistent dict format as other qos specs related APIs.

Fix bug: # 1222692

Change-Id: I9db66d1e3a7469620ba542f5387422685a2d828f

11 years agoFixes pep8 violation in nova
Walter A. Boring IV [Mon, 9 Sep 2013 21:43:59 +0000 (14:43 -0700)]
Fixes pep8 violation in nova

This patch fixes a simple pep8 violation
that nova complains about.

Fixes Bug #1223046

Change-Id: I6f06939e3729b64fcefc5cdb20da05e7d3172be5

11 years agoFix bug in Nexenta NFS driver _do_create_volume
Victor Rodionov [Fri, 6 Sep 2013 22:18:48 +0000 (02:18 +0400)]
Fix bug in Nexenta NFS driver _do_create_volume

Fix bug in _do_create_volume method of Nexenta NFS volume driver.
NMS call nms.folder.create doesn't support third argument, that is why
this call changed to nms.folder.create_with_opts.

Closes-Bug: #1221946
Change-Id: I712ee2919f1bd117e7a1691979639689d95adc92

11 years agoMerge "Restrict Volume type deletion with volumes assoc"
Jenkins [Mon, 9 Sep 2013 16:22:03 +0000 (16:22 +0000)]
Merge "Restrict Volume type deletion with volumes assoc"

11 years agoMerge "Replace assertEquals with assertEqual - 2/2"
Jenkins [Mon, 9 Sep 2013 12:55:53 +0000 (12:55 +0000)]
Merge "Replace assertEquals with assertEqual - 2/2"

11 years agoMerge "Send notifications when extending volume"
Jenkins [Mon, 9 Sep 2013 09:13:05 +0000 (09:13 +0000)]
Merge "Send notifications when extending volume"

11 years agoMerge "Check cinder-backup service before "backing-up""
Jenkins [Mon, 9 Sep 2013 09:03:09 +0000 (09:03 +0000)]
Merge "Check cinder-backup service before "backing-up""

11 years agoMerge "Do not attempt vg.update on uninitialized vg"
Jenkins [Mon, 9 Sep 2013 09:02:28 +0000 (09:02 +0000)]
Merge "Do not attempt vg.update on uninitialized vg"

11 years agoMerge "Replace assertEquals with assertEqual - 1/2"
Jenkins [Mon, 9 Sep 2013 09:02:26 +0000 (09:02 +0000)]
Merge "Replace assertEquals with assertEqual - 1/2"

11 years agoRestrict Volume type deletion with volumes assoc
Swapnil Kulkarni [Mon, 2 Sep 2013 16:36:02 +0000 (22:06 +0530)]
Restrict Volume type deletion with volumes assoc

Updated volume_type_destroy method to throw exception
for volume type delete with associated volumes.

Updated volume_type unit tests

Closes-Bug: #1215329

tag:doc-impact

Change-Id: I7a5d4b473588757d21b461337df493e8046e1d09

11 years agoReplace assertEquals with assertEqual - 2/2
Zhongyue Luo [Fri, 16 Aug 2013 01:55:54 +0000 (09:55 +0800)]
Replace assertEquals with assertEqual - 2/2

The method assertEquals has been deprecated since python 2.7.
http://docs.python.org/2/library/unittest.html#deprecated-aliases

Also in Python 3, a deprecated warning is raised when using assertEquals
therefore we should use assertEqual instead.

This patch replaces the remaining assertEquals to assertEqual

Change-Id: I4e726ce414382e0d5bf982fad20363d61e00967a

11 years agoCheck cinder-backup service before "backing-up"
Ken'ichi Ohmichi [Thu, 5 Sep 2013 04:12:38 +0000 (13:12 +0900)]
Check cinder-backup service before "backing-up"

If cinder-backup service is not enabled, "cinder backup-create"
command fails like the following. As the result, the volume status
has been changed to "backing-up" in spite of not backing-up.

$ cinder backup-create f48aa6ae-4c35-4a6a-a393-5a5cf610945a
ERROR: Service cinder-backup could not be found.
$ cinder list
+--+------------+--------------+------+-------------+----------+-------------+
|ID|   Status   | Display Name | Size | Volume Type | Bootable | Attached to |
+--+------------+--------------+------+-------------+----------+-------------+
|..| backing-up |   vol-test   |  1   |     None    |  False   |             |
+--+------------+--------------+------+-------------+----------+-------------+
$

To avoid this situation, this patch moves the cinder-backup check
before changing a volume status to "backing-up".

Fixes bug #1221012

Change-Id: I42ad41e1cfb6fdb7feebe39a9a5f0356a41d7838

11 years agoDo not attempt vg.update on uninitialized vg
John Griffith [Fri, 6 Sep 2013 19:55:39 +0000 (13:55 -0600)]
Do not attempt vg.update on uninitialized vg

It's possible for the scheduler to send the periodic
stats update request *before* the volume service/driver
has finished initializing, resulting in an exception trace
being logged.

This change adds a check to verify that the vg is actually
initialized (completed check_for_setup_error) and it also
removes all of the duplication of each LVM class driver.

To deal with other drivers that may have similar issues,
add initialized member to base driver, that member is
set False on __init__ and is updated by the manager
after running check_for_setup_error.  We also skip
update_stats if initialization isn't set True.

Rather than have a separate copy of update_stats in every
driver, we have one in the base LVM class and we set the two
unique variables as member parameters.

Fixes bug 1221874

Change-Id: I159e98a77782b8b2c85a8dd956b150828358fd25

11 years agoReplace assertEquals with assertEqual - 1/2
Zhongyue Luo [Sat, 7 Sep 2013 07:57:20 +0000 (15:57 +0800)]
Replace assertEquals with assertEqual - 1/2

The method assertEquals has been deprecated since python 2.7.
http://docs.python.org/2/library/unittest.html#deprecated-aliases

Also in Python 3, a deprecated warning is raised when using assertEquals
therefore we should use assertEqual instead.

This patch is a mere sed replace of one-liner assertEquals to assertEqual.

grep -lR "assertEquals(" cinder/tests/* | \
xargs sed -ri 's/(\W+self.assertEqual)s(.+)(\)$)/\1\2\3/'

Change-Id: I4feea94d53afa866af9b7e14bd80345fa7276e75

11 years agoMerge "Validate VV Set exists in 3PAR drivers"
Jenkins [Sun, 8 Sep 2013 13:34:44 +0000 (13:34 +0000)]
Merge "Validate VV Set exists in 3PAR drivers"

11 years agoMerge "Remove unused/redundant methods in cinder/test.py"
Jenkins [Sun, 8 Sep 2013 13:29:26 +0000 (13:29 +0000)]
Merge "Remove unused/redundant methods in cinder/test.py"

11 years agoMerge "Synchronize extend_volume methods in 3PAR drivers"
Jenkins [Sun, 8 Sep 2013 10:27:56 +0000 (10:27 +0000)]
Merge "Synchronize extend_volume methods in 3PAR drivers"

11 years agoAdd support for LocalConnector type in brick
Bill Owen [Wed, 28 Aug 2013 21:09:49 +0000 (14:09 -0700)]
Add support for LocalConnector type in brick

GPFS and other file based drivers require a LocalConnector to support
volume connection and migration operations.

Modify brick/initiator/connector.py to add LocalConnector class.

Modify test_brick_connector.py to extend test_factory to include LocalConnector
class.

Modify test_gpfs.py to include new migrate_volume test.

Modify test_utils.py to extend test_brick_get_connector to include LocalConnector
class.

Closes-Bug: #1218052

Change-Id: I259fae339c2df7ae304a91c80c27d135762041f5

11 years agoMerge "Utilize assertIsInstance"
Jenkins [Sat, 7 Sep 2013 07:40:52 +0000 (07:40 +0000)]
Merge "Utilize assertIsInstance"

11 years agoMerge "Utilizes assertIsNotNone"
Jenkins [Sat, 7 Sep 2013 06:40:30 +0000 (06:40 +0000)]
Merge "Utilizes assertIsNotNone"

11 years agoMerge "Remove deprecated assert_() usage"
Jenkins [Sat, 7 Sep 2013 06:39:44 +0000 (06:39 +0000)]
Merge "Remove deprecated assert_() usage"

11 years agoMerge "fix inconsistent i18n log message"
Jenkins [Sat, 7 Sep 2013 06:37:26 +0000 (06:37 +0000)]
Merge "fix inconsistent i18n log message"

11 years agoMerge "Fix error casting value to float in lvm.py"
Jenkins [Sat, 7 Sep 2013 04:22:24 +0000 (04:22 +0000)]
Merge "Fix error casting value to float in lvm.py"

11 years agoRemove unused/redundant methods in cinder/test.py
Zhongyue Luo [Sat, 7 Sep 2013 02:42:17 +0000 (10:42 +0800)]
Remove unused/redundant methods in cinder/test.py

The following methods are not used anywhere in Cinder
- assertDictListMatch()
- assertSubDictMatch()

The following methods are implemented in testtools
- assertIn()
- assertNotIn()

Change-Id: Iea96f7761c33ac774b5b4ae71e544aa007ba1bb2

11 years agoFix error casting value to float in lvm.py
Haomai Wang [Fri, 6 Sep 2013 13:37:01 +0000 (21:37 +0800)]
Fix error casting value to float in lvm.py

Special locale setting may result in that "vgs" command output different
results. Such as:

$ LC_NUMERIC='es_ES.UTF-8' sudo vgs
VG #PV #LV #SN Attr VSize VFree
vg_eharney 1 6 1 wz--n- 465,25g 12,97g

Fix bug 1219963

Change-Id: Ibe79d5ce673738d8e37f86de9106ab347c21bd52

11 years agoFixes misuse of assertTrue in test scripts
Zhongyue Luo [Fri, 6 Sep 2013 04:10:28 +0000 (12:10 +0800)]
Fixes misuse of assertTrue in test scripts

Misuse of assertTrue in places where assertEqual should be used.

If assertTrue is used instead of assertEquals, the test will always pass
if the first argument's boolean cast is True. The second argument
passed to assertTrue() will be regarded as the error message
when the assertion fails. Using assertEqual will actually check
if two arguments are same value.

Fixes bug #1221517

Change-Id: I68f614164803729ea26e65f8868b0031e724d324

11 years agoUtilizes assertIsNotNone
Zhongyue Luo [Fri, 6 Sep 2013 04:01:26 +0000 (12:01 +0800)]
Utilizes assertIsNotNone

Using assertTrue and the 'is not' operator to test if an element
is not None is too python2.4. Our unit testing framework supports
assertIsNotNone, included from python 2.7, which was created
for these types of tests.

Change-Id: I25c3f2b144357a3f86625deb8e324d78c20b9ce4

11 years agoMerge "Fix brick remotefs dependency on cinder"
Jenkins [Fri, 6 Sep 2013 03:04:09 +0000 (03:04 +0000)]
Merge "Fix brick remotefs dependency on cinder"

11 years agoUtilize assertIsInstance
Zhongyue Luo [Fri, 30 Aug 2013 11:50:26 +0000 (20:50 +0900)]
Utilize assertIsInstance

Using assertTrue and the 'isinstance' function to test
if an object is in an instance of some class is too python2.4.
Our unit testing framework supports assertIsInstance which was created
for these types of tests. Let's use assertIsInstance for these tests.

Change-Id: I2c931a52ae20f072f53210bf3dedb47127b413c0

11 years agoRemove deprecated assert_() usage
Zhongyue Luo [Fri, 30 Aug 2013 14:12:29 +0000 (22:12 +0800)]
Remove deprecated assert_() usage

The method assert_() is an alias of assertTrue() and
is deprecated since python 2.7

http://docs.python.org/2/library/unittest.html#deprecated-aliases

This removes all assert_() uses.

Change-Id: I9f55c442cc2416a7aa2dac569d1750f723d95184

11 years agoMerge "Added copy-on-write support for all RBD cloning"
Jenkins [Fri, 6 Sep 2013 00:34:00 +0000 (00:34 +0000)]
Merge "Added copy-on-write support for all RBD cloning"

11 years agoFix brick remotefs dependency on cinder
Walter A. Boring IV [Thu, 5 Sep 2013 17:00:13 +0000 (10:00 -0700)]
Fix brick remotefs dependency on cinder

This patch moves an exception from cinder.exception
into brick.exception to fix an import in remotefs.

Fixes Bug #1221309

Change-Id: I9b060c1e1129b3fe30145227712d0234e0f42504

11 years agoRemove quota fetch race condition
Cory Stone [Thu, 5 Sep 2013 16:27:27 +0000 (11:27 -0500)]
Remove quota fetch race condition

When displaying quotas, we shouldn't pull the latest resources
just to convert the results to the dict.

Closes-Bug: #1220436

Change-Id: Id01a310481353b272e103643d053957b65cd4ce3

11 years agoSynchronize extend_volume methods in 3PAR drivers
Jim Branen [Thu, 5 Sep 2013 16:48:43 +0000 (09:48 -0700)]
Synchronize extend_volume methods in 3PAR drivers

The extend_volume methods in the HP3PAR FC and
iSCSI drivers should have been synchronized with
the synchronize annotation, but were not.

Change-Id: Ic7f18b7314e10dfb499b16f43b72367fe3ed1176
Closes-Bug: #1220947

11 years agoMerge "Fix tuple usage error"
Jenkins [Thu, 5 Sep 2013 15:32:02 +0000 (15:32 +0000)]
Merge "Fix tuple usage error"

11 years agoAdded copy-on-write support for all RBD cloning
Edward Hope-Morley [Mon, 12 Aug 2013 16:46:38 +0000 (17:46 +0100)]
Added copy-on-write support for all RBD cloning

Up till now we only had copy-on-write for cloning from snapshot. This
change optionally allows clone from volume to use copy-on-write
instead of a doing a full copy each time. This should increase speed
and reduce nearterm storage consumtion but could introduce some new
risks e.g. excessively long clone chains and flatten storms. To avoid
this, a new config option has been providedons are provided -
rbd_max_clone_depth - which allows the user to limit the depth of a
chain of clones i.e.

    a->b->c->d as opposed to a->b
                              ->c
                              ->d

This will avoid flatten storms by breaking chains as they are formed
and at an early, predefined stage.

A second option - rbd_clone_from_volume_force_copy - allows the user
to use a full copy as before i.e. disable COW for volume clones.

Implements: blueprint use-copy-on-write-for-all-volume-cloning
Fixes: bug #1209199
Change-Id: Ia4a8a10c797cda2cf1ef3a2e9bd49f8c084ec977

11 years agoMerge "This adds a README to brick"
Jenkins [Thu, 5 Sep 2013 11:24:37 +0000 (11:24 +0000)]
Merge "This adds a README to brick"

11 years agoMerge "VMDK copy_image_to_volume and copy_volume_to_image"
Jenkins [Thu, 5 Sep 2013 10:00:29 +0000 (10:00 +0000)]
Merge "VMDK copy_image_to_volume and copy_volume_to_image"

11 years agofix log string in conversion type
Kun Huang [Wed, 4 Sep 2013 10:42:16 +0000 (18:42 +0800)]
fix log string in conversion type

By using 'grep -rn "%([a-zA-Z_]*) "', we could find all cases of
'%(variable)'. And we need add an 's' like '%(variable)s'.

Closes-Bug: #1220557
Change-Id: Ib28b7ddc5e5aabe2b82a499d9c242c1982e7f953

11 years agoVMDK copy_image_to_volume and copy_volume_to_image
Subramanian Neelakantan [Fri, 23 Aug 2013 12:19:17 +0000 (17:49 +0530)]
VMDK copy_image_to_volume and copy_volume_to_image

Implemented copy_image_to_volume that creates a new volume backing (vm) and
copies over the vmdk file from the glance image. Only glance images of disk
format 'vmdk' can be used to create a volume using this driver.

Also implemented copy_volume_to_image that creates a new glance image using
the volume's vmdk file. The steps involved are to take a snapshot of volume
vmdk, take a copy of this read only file and upload to glance.

Cleaned up docstrings as pointed out in earlier reviews.

Added timeout to avoid blocking wait on read/write threads and also fixed a
bug to upload image from copy of vmdk instead of from original vmdk during
upload to glance.

Implements: blueprint vmware-vmdk-cinder-driver
Change-Id: I00d22861f4e01ae0862dbf4b60af314c475b7d38

11 years agoValidate VV Set exists in 3PAR drivers
Kurt Martin [Wed, 4 Sep 2013 22:08:51 +0000 (15:08 -0700)]
Validate VV Set exists in 3PAR drivers

The 3PAR drivers must first create a volume and then add that
volume to a virtual volume set on the backend for QoS support.
If that predefined virutal volume set does not exists the
volume would not be associated with the correct QoS settings.
This patch will now look to see if the virtaul volume set
exists and if not will delete the volume and notify the user
that the VV Set does not exists.

Change-Id: I460f6dd7001362b850c49454c78673aecd4cfef0
Fixes: bug 1218554
11 years agoThis adds a README to brick
Walter A. Boring IV [Wed, 4 Sep 2013 18:39:52 +0000 (11:39 -0700)]
This adds a README to brick

We need to let folks know where brick is
currently being maintained for the Havana
release and where to file defects.
Once this simple patch lands, we'll pull this into
the Nova patch.

(fix hacking violation in commit message for the 2nd
time on this patch. To prevent it from blocking the
merge queue on feature freeze day.)

PLEASE DON'T +A PATCHES UNTIL THEY PASS JENKINS CHECK

Change-Id: I5c4569c1c09751d53817ee9577581e530a3a8352

11 years agoFix tuple usage error
Joshua Harlow [Wed, 4 Sep 2013 19:20:54 +0000 (12:20 -0700)]
Fix tuple usage error

The exc_info is just a tuple (captured in taskflow)
and isn't itself a callable object so we should not
need to use it like one to extract the exception type
and value.

Fixes bug #1220867

Change-Id: Ie27d004bad4053baa2ac8eb84bb8b7cdc05a954d

11 years agoFixes brick Nova pep8 violation for lvm.py
Walter A. Boring IV [Wed, 4 Sep 2013 18:27:17 +0000 (11:27 -0700)]
Fixes brick Nova pep8 violation for lvm.py

Running pep8 tests in Nova gives a violation
in lvm.py for not importing a module.  This
is a simple fix to import the module itself
instead of only importing a function in the
module.

Fixes bug #1220849

Change-Id: Idc603dcfab18601dd4246c623d34be5933434f84

11 years agofix inconsistent i18n log message
Kun Huang [Wed, 4 Sep 2013 16:36:48 +0000 (00:36 +0800)]
fix inconsistent i18n log message

An inconsistent example:
    imessage = _("Invalid metadata") + ": %(reason)s"
This is not consistent i18n usage. In most of cases, we use _() for
whole string instead of leaving something out.

More than inconsistent, some text in leaving strings may be not
translated, for example, ':' in English is different ':' in Chinese.

Change-Id: I00e690021c44f1debbe034cc0837a07b292ffd1b
Closes-Bug: #1220813

11 years agoMerge "Use tempfile and cleanup in windows unit test"
Jenkins [Wed, 4 Sep 2013 15:27:18 +0000 (15:27 +0000)]
Merge "Use tempfile and cleanup in windows unit test"

11 years agoMerge "Add view builder to QoS specs API extension"
Jenkins [Wed, 4 Sep 2013 15:27:16 +0000 (15:27 +0000)]
Merge "Add view builder to QoS specs API extension"

11 years agoMerge "Fixes cinder-volume service startup on Windows"
Jenkins [Wed, 4 Sep 2013 15:27:13 +0000 (15:27 +0000)]
Merge "Fixes cinder-volume service startup on Windows"

11 years agoMerge "QEMU-assisted-snapshots for GlusterFS volumes"
Jenkins [Wed, 4 Sep 2013 15:22:37 +0000 (15:22 +0000)]
Merge "QEMU-assisted-snapshots for GlusterFS volumes"

11 years agoMerge "extract 'limits.' to constant for ratelimiting logic"
Jenkins [Wed, 4 Sep 2013 14:41:24 +0000 (14:41 +0000)]
Merge "extract 'limits.' to constant for ratelimiting logic"

11 years agoQEMU-assisted-snapshots for GlusterFS volumes
Eric Harney [Mon, 19 Aug 2013 04:21:54 +0000 (00:21 -0400)]
QEMU-assisted-snapshots for GlusterFS volumes

Coordinate with Nova to create and delete snaphots for
GlusterFS volumes that are attached to VMs.

Cinder is responsible for creating a QCOW2 file which Nova
will activate in the VM's snapshot chain when a snapshot is
created.

When a snapshot is deleted, Cinder will request for Nova to
perform a block commit/rebase operation to logically delete
the snapshot from the QCOW2 chain.

Implements blueprint qemu-assisted-snapshots

Change-Id: I4a7f0c1bc08d88b0f75d119168dd2077487a62a0

11 years agoAdd view builder to QoS specs API extension
Zhiteng Huang [Fri, 30 Aug 2013 14:28:52 +0000 (22:28 +0800)]
Add view builder to QoS specs API extension

Add view builder for qos_specs.create(), index(), show() and associations()
to in order to make the response more easier to be consumed by client.

This patch also:
  fixed circular reference error when raising HTTP exception.
  fixed some typo in debug message and removed unused imports.

fix bug: # 1219016

Change-Id: I107888e6b4dac8eb5f1b45a87721a7b5efc45632

11 years agoMerge "Add features to Zadara Storage Cinder driver"
Jenkins [Wed, 4 Sep 2013 01:43:34 +0000 (01:43 +0000)]
Merge "Add features to Zadara Storage Cinder driver"

11 years agoMerge "Set vg_thin_pool to pool name instead of pool_path"
Jenkins [Wed, 4 Sep 2013 01:43:32 +0000 (01:43 +0000)]
Merge "Set vg_thin_pool to pool name instead of pool_path"

11 years agoAdd features to Zadara Storage Cinder driver
Vladimir Popovski [Fri, 16 Aug 2013 04:34:54 +0000 (04:34 +0000)]
Add features to Zadara Storage Cinder driver

- move to Zadara APIs 13.07
- added support for extend volume
- added support for create/delete snapshot
- added support for create clones from volumes and snaps
- added support for multi-backend
- added volume stats
- added tests

Implements: blueprint zadara-cinder-driver-update

Change-Id: Iad5908a50980c59df2d8d4702743a0b99f82f9b7

11 years agoUse tempfile and cleanup in windows unit test
John Griffith [Tue, 3 Sep 2013 22:33:24 +0000 (22:33 +0000)]
Use tempfile and cleanup in windows unit test

The unit test test_windows was setting and creating
a directory c://iSCSIVirtualDisks in the root path
and even worse wasn't deleting it on cleanup.

This patch converts that to use tempfile and also
adds an shutil.rmtree to the teardown method to clean
up all the junk it creates.

Fixes bug: 1219950

Change-Id: Ibd071c9c3ae9a02f26c85a09e8bc6619d8c73a37

11 years agoMerge "Adds Nexenta NFS driver"
Jenkins [Tue, 3 Sep 2013 21:07:26 +0000 (21:07 +0000)]
Merge "Adds Nexenta NFS driver"

11 years agoMerge "Add volume driver for Huawei HVS storage system"
Jenkins [Tue, 3 Sep 2013 20:04:56 +0000 (20:04 +0000)]
Merge "Add volume driver for Huawei HVS storage system"

11 years agoMerge "New update_snapshot_status API"
Jenkins [Tue, 3 Sep 2013 20:04:42 +0000 (20:04 +0000)]
Merge "New update_snapshot_status API"

11 years agoMerge "Fix errors in volume usage audit script"
Jenkins [Tue, 3 Sep 2013 18:27:55 +0000 (18:27 +0000)]
Merge "Fix errors in volume usage audit script"

11 years agoMerge "Increase test coverage for cinder.utils"
Jenkins [Tue, 3 Sep 2013 18:27:53 +0000 (18:27 +0000)]
Merge "Increase test coverage for cinder.utils"

11 years agoAdds Nexenta NFS driver
Mikhail Khodos [Wed, 14 Aug 2013 18:18:12 +0000 (11:18 -0700)]
Adds Nexenta NFS driver

Implements: blueprint nexenta-nfs-volume-driver

Change-Id: I369ce83113cf05b1cd2ecf86d5f6fd25eed12d85

11 years agoSet vg_thin_pool to pool name instead of pool_path
Flaper Fesp [Tue, 3 Sep 2013 16:26:42 +0000 (18:26 +0200)]
Set vg_thin_pool to pool name instead of pool_path

create_thin_pool is setting vg_thin_pool to the pool path instead of the
pool_name. This makes volumes creation fail when the create_thin_pool
method is called. This happens because create_volume builds the pool
path itself as create_thin_pool does.

Keeping the pool name in vg_thin_pool instead of the path makes more
sense and allows it to be used in other places in the brick. Also, most
commands return both vg_name and pool_name separated.

Change-Id: Ibf5cd746fc050eab5ce6aff13dd70c1e8066b228
Closes-Bug: #1220286

11 years agoFixes cinder-volume service startup on Windows
Lucian Petrut [Mon, 2 Sep 2013 15:20:21 +0000 (18:20 +0300)]
Fixes cinder-volume service startup on Windows

The Windows service fails due to missing non-blocking IO features
in eventlet. This fix adds a conditional path on Windows to execute
the service accordingly.

Fixes bug: #1219896

Change-Id: I74f662e736e3a5fe58a383d172780a691a2b36c7

11 years agoextract 'limits.' to constant for ratelimiting logic
Seif Lotfy [Tue, 3 Sep 2013 14:46:34 +0000 (14:46 +0000)]
extract 'limits.' to constant for ratelimiting logic

based on the equal nova code at
https://review.openstack.org/#/c/41267/ the ratelimiting logic
uses a constant to parse the limits.

Change-Id: I8ffb4267834c79d056716a2c412ecb2c97217635

11 years agoSend notifications when extending volume
Mathieu Gagné [Sat, 31 Aug 2013 02:30:56 +0000 (22:30 -0400)]
Send notifications when extending volume

- Send resize.start when volume extension begins.
- Send resize.end with new size when volume extension ends.

Fixes: bug #1219106
Change-Id: I729da1604668080ec1a5d096df211aa55913dc48

11 years agoFix errors in volume usage audit script
Michael Kerrin [Tue, 3 Sep 2013 12:53:34 +0000 (12:53 +0000)]
Fix errors in volume usage audit script

The snapshot_get_active_by_window DB query was returning snapshots
where we couldn't access the related volume object. This was due to
a) the volume not been loaded and the join failing due to detached
session object.
and b) the related volume was deleted so it didn't show return from
the join

Fixes bug: 1220140

Change-Id: I0de993ba0ca482fa9ab80d4d5cdb0ff5cc8e4d7a

11 years agoNew update_snapshot_status API
Eric Harney [Fri, 19 Jul 2013 14:02:51 +0000 (10:02 -0400)]
New update_snapshot_status API

Adds new snapshot_actions module

Update_snapshot_status: Allows updating of 'state' and
'progress' fields of a snapshot.  This is used by Nova
to inform Cinder of its outcome when performing snapshot
operations for attached volumes.  Updates are restricted
to a subset of possible start and finish states.

Implements blueprint qemu-assisted-snapshots

Change-Id: I54772f794b97e1cc6b24b121b757219248e37109

11 years agoAdd volume driver for Huawei HVS storage system
zhangchao010 [Tue, 3 Sep 2013 11:17:26 +0000 (19:17 +0800)]
Add volume driver for Huawei HVS storage system

Huawei OceanStor HVS-series enterprise storage system is an optimum
storage platform for next-generation data centers that feature
virtualization, hybrid cloud, simplified IT, and low carbon footprints.

This patch add an iSCSI driver and a FC driver for Huawei HVS storage
system, using REST. We define a common module for both iSCSI driver and
FC driver. The drivers support volume type, QoS.

Implements: blueprint huawei-hvs-volume-driver
Change-Id: Ibdfed7df6d347e00f498694898c88dfa641559eb

11 years agoIncrease test coverage for cinder.utils
Vladislav Kuzmin [Mon, 2 Sep 2013 12:19:50 +0000 (16:19 +0400)]
Increase test coverage for cinder.utils

Add new tests for:
        check_ssh_injection()
        create_channel()

Change-Id: I0349d87023567b16d6600f5b38fd1daff5cbbdc8

11 years agoMerge "Add Fibre Channel drivers for Huawei storage systems"
Jenkins [Tue, 3 Sep 2013 09:29:41 +0000 (09:29 +0000)]
Merge "Add Fibre Channel drivers for Huawei storage systems"

11 years agoMerge "Don't need to init testr explicitly"
Jenkins [Tue, 3 Sep 2013 09:26:17 +0000 (09:26 +0000)]
Merge "Don't need to init testr explicitly"

11 years agoMerge "Refactor huawei Dorado array iSCSI driver"
Jenkins [Tue, 3 Sep 2013 06:57:21 +0000 (06:57 +0000)]
Merge "Refactor huawei Dorado array iSCSI driver"

11 years agoMerge "Refactor Huawei iSCSI driver"
Jenkins [Tue, 3 Sep 2013 05:48:06 +0000 (05:48 +0000)]
Merge "Refactor Huawei iSCSI driver"

11 years agoAdd Fibre Channel drivers for Huawei storage systems
zhangchao010 [Sat, 31 Aug 2013 02:24:43 +0000 (10:24 +0800)]
Add Fibre Channel drivers for Huawei storage systems

This is the third patch, changes as follows:
1.Add Fibre Channel drivers for huawei OceanStor T series and Dorado
series arrays. Dorado FC driver inherits codes from FC driver of T.
The FC drivers call module ssh_common which has been defined in
the preview patch: https://review.openstack.org/#/c/41721/
2.Add unit test for the changes.

Implements: blueprint huawei-fibre-channel-volume-driver
Change-Id: Iee20d9746004b57777a7161827b4a23cb10f0859

11 years agoRefactor huawei Dorado array iSCSI driver
zhangchao010 [Sat, 31 Aug 2013 02:23:35 +0000 (10:23 +0800)]
Refactor huawei Dorado array iSCSI driver

This is the second patch, changes as follows:
1.Add ISCSIDriver for Dorado arrays. The ISCSIDriver inherit from T.
1.Add a common class DoradoCommon for both FC and iSCSI drivers. The common class
inherit from T common for they have many common functions.
2.Add unit test for Dorado drivers.

Change-Id: I7ff2cc1e0d058b7a3d9e55644769ec74075f962f

11 years agoRefactor Huawei iSCSI driver
zhangchao010 [Thu, 29 Aug 2013 02:33:52 +0000 (10:33 +0800)]
Refactor Huawei iSCSI driver

We plan to refactor Huawei iSCSI drivers and add Huawei FC
drivers. For that's a huge change, we break the codes into
three patches:
1.Refactor T iSCSI driver
2.Refactor Dorado iSCSI driver
3.Add FC drivers for both T and Dorado arrays.

This is the first patch, changes as follows:
1.Define a common class for both FC and iSCSI drivers, and
also provide a unified class HuaweiVolumeDriver for users.
The unified driver will call HuaweiTISCSIDriver according to
users' configuration. The HuaweiTISCSIDriver is a subclass of
driver.ISCSIDriver, so it could get good inheritance.
2.Support volume type.
3.Refactor unit test to make it more logic clear and add more
test cases to get higher coverage rate.

Change-Id: I79b7bac7f38f2dcbb22c5db6207d8b55906fdad1

11 years agoEnable gating on F811
Dirk Mueller [Tue, 27 Aug 2013 20:43:38 +0000 (22:43 +0200)]
Enable gating on F811

Avoid name clashes of local variables with
imported modules.

Change-Id: I1c5508902f89ad5dd9d160a4d163cd91bec41333

11 years agoMerge "Pass db into driver as constructor's parameter"
Jenkins [Mon, 2 Sep 2013 13:35:02 +0000 (13:35 +0000)]
Merge "Pass db into driver as constructor's parameter"

11 years agoMerge "Utilizes assertIn and assertNotIn"
Jenkins [Mon, 2 Sep 2013 11:58:13 +0000 (11:58 +0000)]
Merge "Utilizes assertIn and assertNotIn"