]> review.fuel-infra Code Review - openstack-build/cinder-build.git/log
openstack-build/cinder-build.git
9 years agoNetApp E-Series: Add debug tracing
Alex Meade [Tue, 7 Jul 2015 19:04:01 +0000 (15:04 -0400)]
NetApp E-Series: Add debug tracing

Add method and api level debug tracing to the NetApp
E-Series drivers using the utils.trace_method
decorator. This is enabled in the driver via the
'trace_flags' configuration option.

Change-Id: Ie23cbde27792001cb9424af96cba502d06555638

9 years agoAdd tracing facility for drivers
Alex Meade [Mon, 6 Jul 2015 14:17:43 +0000 (10:17 -0400)]
Add tracing facility for drivers

It is useful for engineering to be able to see the API traffic
to and from the storage controllers, as well as to see the
progression of method calls through the driver.

This work will add a simple config option to enable various
debug tracing types to be written to the debug log at runtime.
Use of the decorator has been added to NetApp drivers.

Drivers can make use of this facility by adding the
@cinder.utils.trace_method decorator to any method
calls they would like to allow tracing for or use trace_flags
for any other developer targeted debug logs. The trace_method
decorator can easily be added to every function of a class by
using the cinder.utils.TraceWrapperMetaclass or
cinder.utils.TraceWrapperWithABCMetaclass metaclasses. It is
advised to use the added decorators as the outer most decorator
for a function in order to avoid side-effects with other
decorators.

The @cinder.utils.trace_api method should be used to log
requests to storage backends by wrapping a method that
has the request as an argument and returns the response.

For example:
@six.add_metaclass(cinder.utils.TraceWrapperMetaclass)
class MyClass(object):
    pass

DocImpact
Change-Id: Ib9b9d3f40a272bb9c7ebccd1dc63df68a555eac5

9 years agoMerge "Fix Python 3 issues in cmd"
Jenkins [Sat, 4 Jul 2015 00:35:08 +0000 (00:35 +0000)]
Merge "Fix Python 3 issues in cmd"

9 years agoMerge "Switch to oslo.reports"
Jenkins [Fri, 3 Jul 2015 17:03:28 +0000 (17:03 +0000)]
Merge "Switch to oslo.reports"

9 years agoMerge "Fix block eventlet threads on rbd calls"
Jenkins [Fri, 3 Jul 2015 16:25:40 +0000 (16:25 +0000)]
Merge "Fix block eventlet threads on rbd calls"

9 years agoMerge "Revert First version of Cinder driver for Quobyte"
Jenkins [Thu, 2 Jul 2015 23:14:39 +0000 (23:14 +0000)]
Merge "Revert First version of Cinder driver for Quobyte"

9 years agoMerge "Implement the update_migrated_volume for the drivers"
Jenkins [Thu, 2 Jul 2015 20:17:52 +0000 (20:17 +0000)]
Merge "Implement the update_migrated_volume for the drivers"

9 years agoMerge "Port image/glance.py to Python 3"
Jenkins [Thu, 2 Jul 2015 20:09:14 +0000 (20:09 +0000)]
Merge "Port image/glance.py to Python 3"

9 years agoMerge "Updated from global requirements"
Jenkins [Thu, 2 Jul 2015 14:44:58 +0000 (14:44 +0000)]
Merge "Updated from global requirements"

9 years agoImplement the update_migrated_volume for the drivers
Vincent Hou [Thu, 7 May 2015 05:53:25 +0000 (13:53 +0800)]
Implement the update_migrated_volume for the drivers

This patch implements update_migrated_volume for LVM, Storwize
and updates Dell, StorPool and Infortrend drivers accordingly. It
makes sure that after a successful volume migration, the cinder
volume name(id) is the same as the backend volume name(id). Other
back-end drivers can take this patch as a reference to implement
update_migrated_volume.

PS: Not applicable to multi-attached volumes, since we need to wait
until the multi-attach lands in Nova.

This patch also adds a unit test for the StorPool driver's
update_migrated_volume() implementation.

Co-Authored-By: Peter Penchev <openstack-dev@storpool.com>
Change-Id: I69707340ddf2b55286ff0d84319529b2f502cefa
Partial-Bug: #1450649

9 years agoFix Python 3 issues in cmd
Victor Stinner [Tue, 30 Jun 2015 14:47:15 +0000 (16:47 +0200)]
Fix Python 3 issues in cmd

* Replace filter() with a list-comprehension using if to get a list on
  Python 3.
* Get the mock module from the stdlib unittest module on Python 3.3 and
  newer, or fallback to the third-party mock module.
* Replace __builtin__ with six.moves.builtins.
* tox.ini: add the following tests for Python 3.4

  - cinder.tests.unit.test_api
  - cinder.tests.unit.test_cmd

Blueprint cinder-python3
Change-Id: Iea516ae598e8eebfc1087663a9b3e0a00d0633d3

9 years agoPort image/glance.py to Python 3
Victor Stinner [Tue, 30 Jun 2015 14:06:28 +0000 (16:06 +0200)]
Port image/glance.py to Python 3

* Fix usage of six.reraise(): new_exc is the exception value, not the
  exception type
* Replace __builtin__ with six.moves.builtins.
* test_extracting_v2_boot_properties(): set config.glance_num_retries to
  fix the test on Python 3 (comparison between mock and int now raises
  a TypeError on Python 3).
* TestGlanceSerializer: use dictionaries with only one key to have a
  reliable output even if the hash is randomized (hash randomization is
  now enabled by default in Python 3).
* tox.ini: add cinder.tests.unit.image.test_glance to Python 3.4.

Blueprint cinder-python3
Change-Id: I33cd02e1b0666d7b5999b2fdaf469dc59fff1866

9 years agoSwitch to oslo.reports
liu-sheng [Mon, 29 Jun 2015 01:43:31 +0000 (09:43 +0800)]
Switch to oslo.reports

The Guru Meditation Reports has graduated from oslo-incubator, Cinder
should switch to use oslo.reports to keep the code base clean.

NOTE: this should be merged after the requirements has been synchronized.

Change-Id: Ic91a0c5eed09ecdec93e707e901f4bcc55980f72
Closes-Bug: 1469575

9 years agoMerge "Fix backup.rpcapi to pass object backup"
Jenkins [Thu, 2 Jul 2015 00:16:07 +0000 (00:16 +0000)]
Merge "Fix backup.rpcapi to pass object backup"

9 years agoUpdated from global requirements
OpenStack Proposal Bot [Wed, 1 Jul 2015 22:21:06 +0000 (22:21 +0000)]
Updated from global requirements

Change-Id: Ifc6a27522a5f47306f909a7de651291a96befe54

9 years agoMerge "Replace missed basestring by six for python3 compatability"
Jenkins [Wed, 1 Jul 2015 22:16:35 +0000 (22:16 +0000)]
Merge "Replace missed basestring by six for python3 compatability"

9 years agoMerge "Fix timeout issue in EMC VNX driver unit test"
Jenkins [Wed, 1 Jul 2015 21:45:52 +0000 (21:45 +0000)]
Merge "Fix timeout issue in EMC VNX driver unit test"

9 years agoMerge "Fix typo in solidfire driver option"
Jenkins [Wed, 1 Jul 2015 19:34:53 +0000 (19:34 +0000)]
Merge "Fix typo in solidfire driver option"

9 years agoMerge "Fix Python 3 issues in targets unit tests"
Jenkins [Wed, 1 Jul 2015 18:59:14 +0000 (18:59 +0000)]
Merge "Fix Python 3 issues in targets unit tests"

9 years agoFix block eventlet threads on rbd calls
Ivan Kolodyazhny [Wed, 1 Jul 2015 18:54:23 +0000 (21:54 +0300)]
Fix block eventlet threads on rbd calls

Commit Ibaf43858d60e1320c339f2523b5c09c7f7c7f91e caused new problem with
cross thread communication. According to Python documentation, code can
lead to a deadlock if the spawned thread directly or indirectly attempts
to import a module. python-rados spawns new thread to connect to
cluster. So I removed new spawning new thread to connect to rados. All
long-running operations calls whith python-rbd are still implemented in
native Python threads to block eventlet loop.

Change-Id: Ic9971254102914080383b63cd2807e36213dd6eb
Closes-Bug: #1401335

9 years agoPort dothill to Python 3
Victor Stinner [Mon, 29 Jun 2015 13:33:12 +0000 (15:33 +0200)]
Port dothill to Python 3

* Replace urllib2 with six.moves.urllib
* On Python 3, encode string to UTF-8 to hash it using MD5
* On Python 3, decode base64 from ASCII to get Unicode
* Replace "pattern in exc" with "pattern in exc.args"
* test_initialize_connection(): fix get_active_iscsi_target_portals()
  mock. Use the return_value attribute to return a dictionary, instead
  of returning a single IP address.
* tox.ini: add cinder.tests.unit.test_dothill to Python 3.4

Blueprint cinder-python3
Change-Id: Ib20bca813c2352eae447c374ded75c6dafb2e18d

9 years agoFix backup.rpcapi to pass object backup
lisali [Wed, 1 Jul 2015 06:32:28 +0000 (14:32 +0800)]
Fix backup.rpcapi to pass object backup

Transfer object backup instead of backup.id in
rpcapi.import_record().

Change-Id: Ie535c48d3987971f0541cdb1594363a4decd4d1c
Closes-Bug: #1470355

9 years agoFix typo in solidfire driver option
Tom Fifield [Wed, 1 Jul 2015 07:58:04 +0000 (15:58 +0800)]
Fix typo in solidfire driver option

As reported by Ed Balduf, the description of sf_account_prefix
had a simple typo in it, which this patch fixes.

Change-Id: Ib3864de0bdae6763810f3a5a40789ac1e5b0bbff
Co-Authored-By: Ed Balduf <ed.balduf@solidfire.com>
9 years agoReplace missed basestring by six for python3 compatability
lisali [Wed, 1 Jul 2015 03:05:27 +0000 (11:05 +0800)]
Replace missed basestring by six for python3 compatability

Basestring has been replaced by six.string_types in cinder except
the ones in the file v7000_common.py.

Change-Id: I43c0f4cd2e2a990df8d0cceea2f04ee33afe2104
Closes-Bug: #1470315

9 years agoMerge "Add dependency check in RBD delete_snapshot"
Jenkins [Wed, 1 Jul 2015 02:41:53 +0000 (02:41 +0000)]
Merge "Add dependency check in RBD delete_snapshot"

9 years agoMerge "Sync the latest fileutils module from oslo-incubator"
Jenkins [Wed, 1 Jul 2015 02:27:20 +0000 (02:27 +0000)]
Merge "Sync the latest fileutils module from oslo-incubator"

9 years agoMerge "Updated from global requirements"
Jenkins [Wed, 1 Jul 2015 02:27:01 +0000 (02:27 +0000)]
Merge "Updated from global requirements"

9 years agoMerge "Move HDS drivers to Hitachi folder"
Jenkins [Wed, 1 Jul 2015 00:28:02 +0000 (00:28 +0000)]
Merge "Move HDS drivers to Hitachi folder"

9 years agoMerge "Ensure initialize_connection in targets pass multipath parameter"
Jenkins [Tue, 30 Jun 2015 23:49:39 +0000 (23:49 +0000)]
Merge "Ensure initialize_connection in targets pass multipath parameter"

9 years agoMerge "Port drbdmanagedrv driver to Python 3"
Jenkins [Tue, 30 Jun 2015 23:31:14 +0000 (23:31 +0000)]
Merge "Port drbdmanagedrv driver to Python 3"

9 years agoMerge "Change generic NotFound to specific exception"
Jenkins [Tue, 30 Jun 2015 23:31:03 +0000 (23:31 +0000)]
Merge "Change generic NotFound to specific exception"

9 years agoMerge "XtremIO driver fix array snapshot problem"
Jenkins [Tue, 30 Jun 2015 22:40:55 +0000 (22:40 +0000)]
Merge "XtremIO driver fix array snapshot problem"

9 years agoUpdated from global requirements
OpenStack Proposal Bot [Tue, 30 Jun 2015 22:37:40 +0000 (22:37 +0000)]
Updated from global requirements

Change-Id: Iba1314c6d0aba78dc39ef018522f12b09b4586da

9 years agoMove HDS drivers to Hitachi folder
Erlon R. Cruz [Tue, 30 Jun 2015 12:56:45 +0000 (09:56 -0300)]
Move HDS drivers to Hitachi folder

This patch moves the drivers from Hitachi to a common folder. Now all Hitachi
drivers will be under 'cinder/volume/drivers/hitachi'.

Change-Id: I2c725b9a130f055d7da487329c1e09abb333bcd4
Implements: blueprint rename-hitachi-drivers

9 years agoFix Python 3 issues in targets unit tests
Victor Stinner [Tue, 30 Jun 2015 14:14:09 +0000 (16:14 +0200)]
Fix Python 3 issues in targets unit tests

* Replace StandardError with ZeroDivisionError: StandardError was
  removed in Python 3.
* Replace __builtin__ with six.moves.builtins.
* Open text mode with "w" mode (instead of "wb").
* tox.ini: add targets unit tests to Python 3.4

Note: cinder.tests.unit.targets.test_iet_driver still fails on Python 3,
it will be fixed in a different change.

Blueprint cinder-python3
Change-Id: Ie0f5d2dfaf2ffdeab29fe40f692a2f09fb5a7aba

9 years agoPort drbdmanagedrv driver to Python 3
Victor Stinner [Mon, 29 Jun 2015 13:53:44 +0000 (15:53 +0200)]
Port drbdmanagedrv driver to Python 3

* Replace map() with a list-comprehension where a list is expected
* Replace apply(fn, args) with fn(*args)
* Use str.replace() to remove "{" and "}" characters in _clean_uuid(),
  instead of using str.translate()
* Use literal syntax to create a new dictionary instead of using
  dict() + dict.items()
* tox.ini: add cinder.tests.unit.test_drbdmanagedrv to Python 3.4

Blueprint cinder-python3
Change-Id: I4cb3ae422381442b778de024882e75f31eded5eb

9 years agoAdd dependency check in RBD delete_snapshot
lisali [Fri, 26 Jun 2015 05:29:39 +0000 (13:29 +0800)]
Add dependency check in RBD delete_snapshot

List dependencies in log when failed to delete snapshot.

Change-Id: Ie21ba27735d8b65560adabb92a26cd86ef328a1d
Closes-Bug: #1463682

9 years agoMerge "Use versionutils from oslo.log"
Jenkins [Mon, 29 Jun 2015 20:20:01 +0000 (20:20 +0000)]
Merge "Use versionutils from oslo.log"

9 years agoMerge "Fix cinder.conf.sample generation"
Jenkins [Mon, 29 Jun 2015 20:03:10 +0000 (20:03 +0000)]
Merge "Fix cinder.conf.sample generation"

9 years agoXtremIO driver fix array snapshot problem
Shay Halsband [Mon, 22 Jun 2015 06:33:11 +0000 (09:33 +0300)]
XtremIO driver fix array snapshot problem

Use create snapshot v2, to resolve a potential bug
when 2 such requests are processed in the same second.

Change-Id: If2801cb737e8a3d1847c68c9e19265c2123e6687
Closes-Bug: #1467386

9 years agoMerge "Updated from global requirements"
Jenkins [Mon, 29 Jun 2015 15:08:18 +0000 (15:08 +0000)]
Merge "Updated from global requirements"

9 years agoMerge "Storwize driver report capability for multiattach"
Jenkins [Mon, 29 Jun 2015 14:50:50 +0000 (14:50 +0000)]
Merge "Storwize driver report capability for multiattach"

9 years agoFix cinder.conf.sample generation
Kazumasa Nomura [Thu, 25 Jun 2015 18:33:16 +0000 (03:33 +0900)]
Fix cinder.conf.sample generation

Introduction of the hp_xp driver broke cinder.conf.sample generation due to
the way the driver was registering the configuration items. Originally the
options were being included into the FC driver file and registered there.
When the config generator found the options in the separate hp_xp_opts.py
file it did not know what group to include the options in since they were
not registered at all.

This fix moves registration of the options to the hp_xp_opts.py file so
that the config generation will work. Since cfg.CONF is a global, the
hp_xp driver will still have access to the options in there after they are
set by importing the opts file. An additional problem that was uncovered
when creating this fix is the fact that the old config generator we are
using from oslo-incubator doesn't support using cfg.Opt. To temporarily
workaround this I have changed the cfg.Opts to be cfg.IntOpts or
cfg.ListOpts(as appropriate) and documented the valid values for those
options.

The last change that was necessary was to add config values for several of
the options in cinder/tests.py as the options were marked as required by
the driver. If values were not set this caused oslo config to error out
reporting that they values needed to be set.

Change-Id: Ie47d38c2f8fde675cf00ea2ec9abf60691c57ef9
Closes-Bug: 1466198
Signed-off-by: Jay S. Bryant<jsbryant@us.ibm.com>,
               Kazumasa Nomura <kazumasa.nomura.rx@hitachi.com>

9 years agoUse versionutils from oslo.log
Sergey Vilgelm [Mon, 29 Jun 2015 10:58:17 +0000 (12:58 +0200)]
Use versionutils from oslo.log

Change-Id: I9aa6cf7ccddad1d7c891230332e49e25b536f5bc
Closes-Bug: 1469693

9 years agoUpdated from global requirements
OpenStack Proposal Bot [Mon, 29 Jun 2015 05:19:54 +0000 (05:19 +0000)]
Updated from global requirements

Change-Id: I7b8928a105d5666ce2d63a4444037866c43e1e9f

9 years agoMerge "Fix library includes for config generator"
Jenkins [Mon, 29 Jun 2015 04:21:38 +0000 (04:21 +0000)]
Merge "Fix library includes for config generator"

9 years agoMerge "Remove generate_glance_url"
Jenkins [Mon, 29 Jun 2015 04:21:27 +0000 (04:21 +0000)]
Merge "Remove generate_glance_url"

9 years agoMerge "Fix manage_existing function in infortrend driver"
Jenkins [Mon, 29 Jun 2015 04:21:21 +0000 (04:21 +0000)]
Merge "Fix manage_existing function in infortrend driver"

9 years agoFix timeout issue in EMC VNX driver unit test
Xi Yang [Tue, 23 Jun 2015 09:42:18 +0000 (05:42 -0400)]
Fix timeout issue in EMC VNX driver unit test

This patch is going to fix the timeout issue in EMC VNX
driver unit test.

Currently, the timeout value of a looping call in EMC unit test
is set to 0.000002s which is too small. The execution time of
a looping call may exceed this timeout value and cause the test
case failure. This fix is changing the timeout to the default
value of VNX driver.

Change-Id: I4aea02403ada8892e45b974be70fb5753721ed39
Closes-Bug: #1467763

9 years agoMerge "Use symbol for error code in VNX cinder driver"
Jenkins [Mon, 29 Jun 2015 03:00:32 +0000 (03:00 +0000)]
Merge "Use symbol for error code in VNX cinder driver"

9 years agoMerge "Storwize: add the missing stops in the end of the messages"
Jenkins [Mon, 29 Jun 2015 02:59:26 +0000 (02:59 +0000)]
Merge "Storwize: add the missing stops in the end of the messages"

9 years agoMerge "Fix Python 3 issues in the blockbridge driver"
Jenkins [Mon, 29 Jun 2015 02:52:05 +0000 (02:52 +0000)]
Merge "Fix Python 3 issues in the blockbridge driver"

9 years agoMerge "Fix cinder-manage volume delete cmd"
Jenkins [Mon, 29 Jun 2015 02:49:01 +0000 (02:49 +0000)]
Merge "Fix cinder-manage volume delete cmd"

9 years agoMerge "Remove oslo logging from backup unit tests"
Jenkins [Mon, 29 Jun 2015 02:46:27 +0000 (02:46 +0000)]
Merge "Remove oslo logging from backup unit tests"

9 years agoMerge "Make VNX Cinder Driver aware of VNX Pool Full Threshold"
Jenkins [Sun, 28 Jun 2015 14:27:10 +0000 (14:27 +0000)]
Merge "Make VNX Cinder Driver aware of VNX Pool Full Threshold"

9 years agoMerge "Fix 'no actual-pathname' NetApp API error"
Jenkins [Sun, 28 Jun 2015 03:34:36 +0000 (03:34 +0000)]
Merge "Fix 'no actual-pathname' NetApp API error"

9 years agoRemove oslo logging from backup unit tests
Tom Barron [Thu, 11 Jun 2015 17:07:07 +0000 (13:07 -0400)]
Remove oslo logging from backup unit tests

Many of the unit tests for backup services import oslo_log and
invoke LOG.debug, LOG.info, etc.  There appears to be no current
reason to do this and, more generally, unit tests for everything
but oslo_log itself should not be doing logging themselves.

This commit removes oslo logging from the backup unit tests.
Closes-bug: 1464772

Change-Id: I2c9f258a43a155e785bac4158cb5e5e0ecfcc797

9 years agoMerge "Add notifications about snapshot.update.*"
Jenkins [Sat, 27 Jun 2015 16:05:09 +0000 (16:05 +0000)]
Merge "Add notifications about snapshot.update.*"

9 years agoMerge "Fix Python 3 issues in the swift backup driver"
Jenkins [Sat, 27 Jun 2015 14:35:53 +0000 (14:35 +0000)]
Merge "Fix Python 3 issues in the swift backup driver"

9 years agoMerge "Fix Python 3 issues in ceph and rbd drivers"
Jenkins [Sat, 27 Jun 2015 14:35:36 +0000 (14:35 +0000)]
Merge "Fix Python 3 issues in ceph and rbd drivers"

9 years agoMerge "Fix Python 3 issues in backup"
Jenkins [Sat, 27 Jun 2015 14:32:53 +0000 (14:32 +0000)]
Merge "Fix Python 3 issues in backup"

9 years agoAdd notifications about snapshot.update.*
Lena Novokshonova [Mon, 26 Jan 2015 08:51:02 +0000 (12:51 +0400)]
Add notifications about snapshot.update.*

Now we have notifications about volume.update.*, but don't have
notifications about snapshot.update.*
In this patchset added this notifications.

Change-Id: Idc17516436b06871421c17cde0e2128f81613716

9 years agoSync the latest fileutils module from oslo-incubator
Jay S. Bryant [Fri, 26 Jun 2015 20:56:47 +0000 (15:56 -0500)]
Sync the latest fileutils module from oslo-incubator

As part of our normal development in a release we should get
our openstack/common directory code synced up with the latest
code in oslo-incubator.  This is the sync for fileutils:

Current HEAD in OSLO:
---------------------
commit 2e41adeb4c19114fd3504eb69891e9149dba7072
Date:   Wed Jun 24 14:45:25 2015 +0000
Updated from global requirements

Changes merged with this patch:
---------------------
16eb642eb -- Clean up logging to conform to guidelines

Change-Id: I2cfdb7ca1f876cdb8f0deae5a82484409c0b40cc

9 years agoFix 'no actual-pathname' NetApp API error
Tom Barron [Wed, 17 Jun 2015 18:54:01 +0000 (14:54 -0400)]
Fix 'no actual-pathname' NetApp API error

Cinder volume logs sometimes show this error

      NetApp API failed. Reason - 13114:
      No actual-pathname for 10.1.0.9:/vol/whatever

with Kilo code and 7-mode DOT system.

The issue is due to our Cinder driver passing the
entire share to the relevant API instead of just
the export path portion of the share.  This only
happens when the NFS image cache is full, and cached
files need to be removed.

Change-Id: I0c40840dac975dd7fd2c62f1f9c0cd3f8c5c1252
Closes-Bug: #1468884

9 years agoUse symbol for error code in VNX cinder driver
Cedric Zhuang [Thu, 21 May 2015 11:26:23 +0000 (04:26 -0700)]
Use symbol for error code in VNX cinder driver

Some of the error code of VNX CLI is scattered in the code and is
not coded as a constant.

Gather all VNX error codes in the VNXError class and compose a new
method to check the error in the CLI output.  If no specific error
is supplied, check all available errors in the output.

Change-Id: I145803fbe9fc36dcf432c9aa4d90245790a69859
Closes-Bug: #1454905

9 years agoStorwize driver report capability for multiattach
TaoBai [Thu, 25 Jun 2015 08:49:36 +0000 (01:49 -0700)]
Storwize driver report capability for multiattach

The driver report the capability "multiattach=True"

Implements blueprint: multi-attach-volume

Change-Id: I2b145cac3390a84e65ef9229f9e18d236dbc96aa

9 years agoMerge "Fix weird change of volume status in re-scheduling"
Jenkins [Fri, 26 Jun 2015 04:49:00 +0000 (04:49 +0000)]
Merge "Fix weird change of volume status in re-scheduling"

9 years agoMerge "Filter snapshots data on the DB side"
Jenkins [Fri, 26 Jun 2015 00:57:55 +0000 (00:57 +0000)]
Merge "Filter snapshots data on the DB side"

9 years agoMerge "Dell SC: Enable use of Storage Profiles"
Jenkins [Thu, 25 Jun 2015 18:42:07 +0000 (18:42 +0000)]
Merge "Dell SC: Enable use of Storage Profiles"

9 years agoFilter snapshots data on the DB side
Yuriy Nesenenko [Tue, 19 May 2015 15:17:01 +0000 (18:17 +0300)]
Filter snapshots data on the DB side

It filters snapshots data on the DB side to improve performance.
Some tests are removed from test_snapshots.py because their function
implemented on the DB side.

Partial-Implements: blueprint data-filtering-on-the-db-side
Change-Id: I1c3e47a4f3780de54d7a5920f463e26cc8b7bcc2

9 years agoChange generic NotFound to specific exception
PranaliDeore [Tue, 26 May 2015 07:12:27 +0000 (00:12 -0700)]
Change generic NotFound to specific exception

1. Changed exception type from NotFound to specific NotFound
   exception for better readability.
   e.g. VolumeNotFound, SnapshotNotFound etc.

2. Error messages returned to the user are not consistent across
   all apis in case of all exceptions derived from NotFound exception.
   Instead of returning custom error messages return message
   defined in exception class itself.
   NOTE: Doesn't applied to 'HostBinaryNotFound' as host information to
         the tenant should not be leaked.

3. Added explanation to HTTPNotFound wherever appropriate.
   e.g. raise webob.exc.HTTPNotFound() to
        raise webob.exc.HTTPNotFound(explanation=err.msg)

Closes-Bug: #1459958
Change-Id: Ice2c375796fac7533d82125ef97288075fa68b85

9 years agoStorwize: add the missing stops in the end of the messages
Qian Gao [Wed, 24 Jun 2015 07:08:50 +0000 (00:08 -0700)]
Storwize: add the missing stops in the end of the messages

This patch adds the missing stops in the end of log or
exception messages, where necessary.

Change-Id: Ib18f36f66544cb5f907b69fdc8587f48948a971a
Closes-Bug: #1468203

9 years agoEnsure 'WSGIService' derives from oslo_service base class
Joshua Harlow [Thu, 25 Jun 2015 00:54:40 +0000 (17:54 -0700)]
Ensure 'WSGIService' derives from oslo_service base class

Currently this code will fail due to an isinstance check in
oslo_service that ensures that the services launched are of
the right type.

Closes-Bug: #1468559

Change-Id: I71acc5082aacbfb66d422cec6636ba44ae2c8402

9 years agoSwitch to oslo.service
Sergey Vilgelm [Wed, 24 Jun 2015 19:55:32 +0000 (21:55 +0200)]
Switch to oslo.service

oslo.service has graduated, so cinder should consume it.

Change-Id: I80487f559302b0e88953835ffb4a3bfe2a347501
Closes-Bug: #1466851
Depends-On: I305cf53bad6213c151395e93d656b53a8a28e1db

9 years agoFix library includes for config generator
Jay S. Bryant [Wed, 24 Jun 2015 19:35:38 +0000 (14:35 -0500)]
Fix library includes for config generator

Noticed today while working on fixing issues
with the config generator that oslo_policy
had been added in the wrong location for
pulling the config options in to the config
generator.

This fix moves the items that had been put in
oslo.config.generator.rc but were missing in generate_sample.sh
over to the appropriate location.  I also removed the option for
importing additional libraries in oslo.config.generator.rc
given that it will not work.

I am still working on a longer term solution, but
we really should get this fixed so we can generate sample
config files again.

Change-Id: I2c14c1acc49d68305dca5a3dedc686ab07ed2088

9 years agoRevert First version of Cinder driver for Quobyte
Duncan Thomas [Wed, 24 Jun 2015 15:53:47 +0000 (18:53 +0300)]
Revert First version of Cinder driver for Quobyte

This reverts commit 49d92764183e288b8f62b91a51179c307dd19a44.

CI hasn't passed in its last 60 runs and hasn't ran in the last 73 days.

UpgradeImpact: QuoByte is not supported in the Liberty release

Change-Id: Ibe1c4afddc9856965b28a139c1d37f939578577b

9 years agoFix cinder-manage volume delete cmd
Anton Arefiev [Wed, 24 Jun 2015 15:45:35 +0000 (18:45 +0300)]
Fix cinder-manage volume delete cmd

Since pools was introduced in cinder, field 'host' in resources
contains pool part. So when we are trying to delete volume with
cinder-manage, 'host' with pool part passed to rpc target. As
result message isn't delivered to host, and we can't delete volume.

Change-Id: Ie6dcbbfe28dcc5b6dc838490b351a13b43936da9
Closes-Bug: 1468401

9 years agoFix Python 3 issues in the blockbridge driver
Victor Stinner [Tue, 23 Jun 2015 12:08:25 +0000 (14:08 +0200)]
Fix Python 3 issues in the blockbridge driver

* Replace httplib import with six.moves.http_client
* Replace urllib imports with six.moves.urllib, update urllib.
  For example, replace urllib.quote() with urllib.parse.quote().
* test_blockbridge: try get the mock module from unittest.mock, part of
  the Python stdlib since Python 3.3. The third-party mock module has a
  bug on Python 3.4.
* On Python 3, base64.encodestring() expects bytes and returns bytes.
  Encode credentials to UTF-8 and decode base64 from ASCII to get the
  final string as Unicode on Python 3.
* test_cfg_api_auth_scheme_password: parse the connection URL to compare
  it. Comparing directly the URL fails on Python 3 because URL
  parameters are rendered in a random order because of the hash
  randomization.
* Replace pools.values()[0] with list(pools.values())[0]. On Python 3,
  dict.values() returns an iterator.
* tox.ini: add cinder.tests.unit.test_blockbridge to Python 3.4.

Blueprint cinder-python3
Change-Id: I3c6b935680b5427d6ffdc1a00cd5221475209cdd

9 years agoFix Python 3 issues in the swift backup driver
Victor Stinner [Tue, 23 Jun 2015 11:37:42 +0000 (13:37 +0200)]
Fix Python 3 issues in the swift backup driver

* On Python 3, encode/decode JSON to/from UTF-8
* Use byte strings for volume content
* Replace dict.keys()[0] and dict.value()[0] with list(dict.items())[0].
  Get the key and the value at once to ensure that they are consistent.
  On Python 3, items() returns an iterator: create a list to use the [0]
  operator.
* SwiftBackupDriver: use a bytearray instead of a string because
  bytes += bytes is inefficient on Python 3, whereas str += str is
  optimized on Python 2. Replace also StringIO with BytesIO.
* BytesIO has no more len attribute on Python 3: get the length of the
  content instead.
* Replace buffer(bytearray(128)) with b'\0' * 128 to create a string of
  128 zeroed bytes
* Replace "rw" file mode with "w+" ("rw" raises an exception
  on Python 3).
* tox.ini: add the following tests to Python 3.4

  - cinder.tests.unit.test_backup_swift
  - cinder.tests.unit.test_backup_tsm

Blueprint cinder-python3
Change-Id: I62d7ef8041847f31b5d06a92fa2edb65c6780497

9 years agoFix Python 3 issues in ceph and rbd drivers
Victor Stinner [Tue, 23 Jun 2015 09:55:40 +0000 (11:55 +0200)]
Fix Python 3 issues in ceph and rbd drivers

* Add cinder.utils.convert_str() function: helper to convert a string to
  a native string: convert to bytes on Python 2, convert to Unicode on
  Python 3. Function needed by ceph and rbd drivers.
* Replace encodeutils.safe_encode() with utils.convert_str()
* test_backup_ceph: get the size of the volume file using os.fstat() to
  fix a test. Before the volume size was a mock, but comparison between
  integers and mocks raise a TypeError on Python 3.
* Fix RBDDriver._update_volume_stats(): replace a/b with a//b to get an integer
  on Python 2 and Python 3 (a/b always returns a float on Python 3)
* Replace map() with a list-comprehension in RBDDriver because a list is
  expected. On Python 3, map() returns an iterator.
* tox.ini: add to following tests to Python 3.4

  - cinder.tests.unit.test_backup_ceph
  - cinder.tests.unit.test_rbd

Blueprint cinder-python3
Change-Id: I7acb0d9eed0d351798133e0c6ef55408fed925dd

9 years agoFix Python 3 issues in backup
Victor Stinner [Tue, 23 Jun 2015 09:20:47 +0000 (11:20 +0200)]
Fix Python 3 issues in backup

* Replace (int, long) with six.integer_types: the "long" type has been
  removed in Python 3
* Replace str.encode("bas64") with base64.encodestring(str), base64
  text codec has been removed in Python 3. Same change for decode
  (base64.decodestring)
* On Python 3, encode JSON to UTF-8
* tox.ini: add the following tests to Python 3

  - cinder.tests.unit.test_backup
  - cinder.tests.unit.test_backup_driver_base

Blueprint cinder-python3
Change-Id: I86e04f8fbe9a3ce8849fd141dc3ee914e73c8796

9 years agoMerge "Fix tox -e py34"
Jenkins [Wed, 24 Jun 2015 14:52:57 +0000 (14:52 +0000)]
Merge "Fix tox -e py34"

9 years agoMerge "Harden scheduler.rpcapi unit tests"
Jenkins [Wed, 24 Jun 2015 14:35:15 +0000 (14:35 +0000)]
Merge "Harden scheduler.rpcapi unit tests"

9 years agoRemove generate_glance_url
git-harry [Wed, 24 Jun 2015 08:46:45 +0000 (09:46 +0100)]
Remove generate_glance_url

The function generate_glance_url is part of the inital fork from nova.
It is only called once and that is by a unit test designed to test the
function.

This commit removes generate_glance_url and its associated test because
they are not used by cinder.

Change-Id: I02a3632d258b7555284e66368eaf17af3b4b0a2f

9 years agoFix manage_existing function in infortrend driver
Lee [Tue, 23 Jun 2015 06:50:51 +0000 (14:50 +0800)]
Fix manage_existing function in infortrend driver

For infortrend driver, it should update provider_location
information (partition id and system id).

Otherwise, the volume would miss the infortrend partition
after importing partition.

Change-Id: Icc34d2e6c27bca6580449aac5a54893b89dcd261

9 years agoMerge "Incorrect exception caught in qos-specs create api"
Jenkins [Wed, 24 Jun 2015 02:18:24 +0000 (02:18 +0000)]
Merge "Incorrect exception caught in qos-specs create api"

9 years agoMerge "Modify template account creation in SolidFire drvr"
Jenkins [Wed, 24 Jun 2015 02:16:02 +0000 (02:16 +0000)]
Merge "Modify template account creation in SolidFire drvr"

9 years agoModify template account creation in SolidFire drvr
John Griffith [Sat, 20 Jun 2015 13:58:51 +0000 (07:58 -0600)]
Modify template account creation in SolidFire drvr

On a fresh cluster with no template account, we'll hit
an exception when doing the initial "check for account".

This patch modifies the create_template account method slightly
to use a try/except block to set this up.

Change-Id: I8ff7ff893412f5b30f8a88dc3b44ea592db01ced

9 years agoMerge "Tests: Fix assertRaisesRegexp deprecation warnings"
Jenkins [Tue, 23 Jun 2015 21:55:50 +0000 (21:55 +0000)]
Merge "Tests: Fix assertRaisesRegexp deprecation warnings"

9 years agoMerge "Updated from global requirements"
Jenkins [Tue, 23 Jun 2015 21:02:14 +0000 (21:02 +0000)]
Merge "Updated from global requirements"

9 years agoMerge "Fix backups.rpcapi to pass objects over RPC"
Jenkins [Tue, 23 Jun 2015 19:32:07 +0000 (19:32 +0000)]
Merge "Fix backups.rpcapi to pass objects over RPC"

9 years agoTests: Fix assertRaisesRegexp deprecation warnings
Eric Harney [Tue, 23 Jun 2015 18:41:14 +0000 (14:41 -0400)]
Tests: Fix assertRaisesRegexp deprecation warnings

Use of assertRaisesRegexp() raises warnings when running
unit tests.

Related-Bug: #1461171

Change-Id: I4a7f2713548968f65591a14260875b3016dce51b

9 years agoMerge "Add exception catch in report_state for DBError"
Jenkins [Tue, 23 Jun 2015 14:31:02 +0000 (14:31 +0000)]
Merge "Add exception catch in report_state for DBError"

9 years agoHarden scheduler.rpcapi unit tests
Michal Dulko [Tue, 23 Jun 2015 13:47:53 +0000 (15:47 +0200)]
Harden scheduler.rpcapi unit tests

Tests for scheduler.rpcapi are very weak. Even changing keyword
arguments names passed to call and cast methods in this module
doesn't trigger unit tests failures. This commit adds keyword
arguments validation to prevent problems similar to ones caused
by bug 1467841 in backup.rpcapi. I've also fixed argument order
in assertEqual usages there.

Change-Id: I78d80d5c5596fb5615608f93157d4d2b3a9b0aef
Related-Bug: 1467841

9 years agoFix backups.rpcapi to pass objects over RPC
Michal Dulko [Tue, 23 Jun 2015 13:42:00 +0000 (15:42 +0200)]
Fix backups.rpcapi to pass objects over RPC

Commit Icff37261b367463b71a1268be16f9c97f595bf0c brought bugs in
backup.rpcapi. For export_record, import_record and reset_status
backup.id is passed instead of whole backup object - which
backup.manager expects. This causes severe failures. This commit
changes the rpcapi to pass objects and adds missing
backup.test_rpcapi unit tests that will prevent such failures in
the future.

Change-Id: I303b77214785165d37663fe8d502988e86a7950f
Closes-Bug: 1467841

9 years agoFix weird change of volume status in re-scheduling
wanghao [Tue, 26 May 2015 09:25:26 +0000 (17:25 +0800)]
Fix weird change of volume status in re-scheduling

When create a volume failed as some exception, cinder will re-schedule the
creation request, the retry number is 3 in default.
But when re-scheduling, this volume's status was changed like this:

creating ----> error -----> creating------>error------>error/available

This is weird to user, since if this volume is in re-scheduling process,
it's status should always be creating, and then become error or available
at last.

Change-Id: I7a2d40585b5ef515a9400349a1397cba63278c78
Closes-Bug: #1445601

9 years agoFix tox -e py34
Victor Stinner [Tue, 23 Jun 2015 09:11:04 +0000 (11:11 +0200)]
Fix tox -e py34

Add a py34 test environment to tox.ini running a subset of tests which
pass on Python 3.4. With this change, the py34 check job should pass and
so it will become possible to make the job voting to avoid further
Python 3 regressions.

Blueprint cinder-python3
Change-Id: If8a8bafe0ff7e8d27baa3467f1790c3cb776457e

9 years agoMerge "Fix LIO target helper when missing targetcli"
Jenkins [Tue, 23 Jun 2015 02:05:36 +0000 (02:05 +0000)]
Merge "Fix LIO target helper when missing targetcli"

9 years agoMerge "Use elevated context for backup destroy"
Jenkins [Mon, 22 Jun 2015 23:58:58 +0000 (23:58 +0000)]
Merge "Use elevated context for backup destroy"

9 years agoMerge "Fix Cinder Objects unit tests"
Jenkins [Mon, 22 Jun 2015 23:56:52 +0000 (23:56 +0000)]
Merge "Fix Cinder Objects unit tests"