]> review.fuel-infra Code Review - openstack-build/cinder-build.git/log
openstack-build/cinder-build.git
9 years agoMerge "Make unused iscsi_num_targets, iser_num_targets configs as deprecated"
Jenkins [Tue, 17 Mar 2015 18:14:58 +0000 (18:14 +0000)]
Merge "Make unused iscsi_num_targets, iser_num_targets configs as deprecated"

9 years agoMerge "Fixed the order of mock decorators in VMAX driver"
Jenkins [Tue, 17 Mar 2015 04:27:55 +0000 (04:27 +0000)]
Merge "Fixed the order of mock decorators in VMAX driver"

9 years agoMerge "VMware: Fail immediately for images in a container"
Jenkins [Tue, 17 Mar 2015 04:27:44 +0000 (04:27 +0000)]
Merge "VMware: Fail immediately for images in a container"

9 years agoMerge "VMware: Relocate volume to compliant datastore"
Jenkins [Tue, 17 Mar 2015 04:27:10 +0000 (04:27 +0000)]
Merge "VMware: Relocate volume to compliant datastore"

9 years agoMerge "i18n Compatibility in VMAX driver"
Jenkins [Tue, 17 Mar 2015 04:26:58 +0000 (04:26 +0000)]
Merge "i18n Compatibility in VMAX driver"

9 years agoMerge "Remove use of contextlib.nested"
Jenkins [Tue, 17 Mar 2015 03:15:48 +0000 (03:15 +0000)]
Merge "Remove use of contextlib.nested"

9 years agoMerge "Increase LeftHand driver minimum client version"
Jenkins [Tue, 17 Mar 2015 03:14:40 +0000 (03:14 +0000)]
Merge "Increase LeftHand driver minimum client version"

9 years agoMerge "Remove global mocking from test_pure.py"
Jenkins [Tue, 17 Mar 2015 03:10:07 +0000 (03:10 +0000)]
Merge "Remove global mocking from test_pure.py"

9 years agoMerge "VMware:Use datastore selection logic in new module"
Jenkins [Tue, 17 Mar 2015 01:40:27 +0000 (01:40 +0000)]
Merge "VMware:Use datastore selection logic in new module"

9 years agoMerge "VMware: Refactor initialize_connection unit tests"
Jenkins [Tue, 17 Mar 2015 01:40:15 +0000 (01:40 +0000)]
Merge "VMware: Refactor initialize_connection unit tests"

9 years agoMerge "Huawei driver check before associating LUN to a LUN group"
Jenkins [Tue, 17 Mar 2015 01:40:03 +0000 (01:40 +0000)]
Merge "Huawei driver check before associating LUN to a LUN group"

9 years agoMerge "Fixed a concurrency issue in VMAX driver"
Jenkins [Tue, 17 Mar 2015 01:35:22 +0000 (01:35 +0000)]
Merge "Fixed a concurrency issue in VMAX driver"

9 years agoIncrease LeftHand driver minimum client version
Anthony Lee [Mon, 16 Mar 2015 23:48:34 +0000 (16:48 -0700)]
Increase LeftHand driver minimum client version

An error was occuring during LeftHand driver initialization when
an older LeftHand client was installed.

The minimum client version needed to be updated.

Closes-Bug: 1432757
Change-Id: Ifb6bc989a50ed9d051a72c065d8a7287a8570d1e

9 years agoVMware: Fail immediately for images in a container
Vipin Balachandran [Wed, 14 Jan 2015 19:03:52 +0000 (00:33 +0530)]
VMware: Fail immediately for images in a container

Currently VMDK driver doesn't support images within
a container such as OVA. Instead of throwing an error
immediately, the driver tries to create a backing
using the container as its vmdk. This will eventually
fail with vCenter error. This patch fixes it.

Change-Id: Ie97a3a63807d00880310f2a7e5f6d32ee89d2cd7
Closes-Bug: #1371478

9 years agoMake unused iscsi_num_targets, iser_num_targets configs as deprecated
Mitsuhiro Tanino [Tue, 3 Mar 2015 22:49:03 +0000 (17:49 -0500)]
Make unused iscsi_num_targets, iser_num_targets configs as deprecated

After introducing new iscsi target driver model via Change-Id:
I43190d1dac33748fe55fa00f260f32ab209be656, configuration
options of iscsi_num_targets and iser_num_targets are not
used in these new scsi targets.

This patch makes these unused configuration options as
deprecated and adds warning messages to notify future removal
of these configs to users.

Also this patch removes _ensure_iscsi_targets() which uses these
two config options from cxt scsi target because this method is
never called anywhere.

Closes-Bug: #1427904
DocImpact: Two unused config options are deprecated
Change-Id: Ic34910f4765f46e2708de7cb686e49418f486709

9 years agoMerge "Error trying to delete snapshots on Hitachi driver"
Jenkins [Mon, 16 Mar 2015 18:33:40 +0000 (18:33 +0000)]
Merge "Error trying to delete snapshots on Hitachi driver"

9 years agoMerge "Fix unit tests for multiattach patch"
Jenkins [Mon, 16 Mar 2015 18:30:06 +0000 (18:30 +0000)]
Merge "Fix unit tests for multiattach patch"

9 years agoMerge "DRBD: Use correct function object after DBus disconnect."
Jenkins [Mon, 16 Mar 2015 11:05:23 +0000 (11:05 +0000)]
Merge "DRBD: Use correct function object after DBus disconnect."

9 years agoMocked utils.execute for broken tests
PranaliDeore [Fri, 13 Mar 2015 06:47:12 +0000 (23:47 -0700)]
Mocked utils.execute for broken tests

Few tests were failing because utils.execute
was not mocked.

Added decorator @mock.patch('cinder.utils.execute')
which will mock the utils.execute call for failing tests.

Closes-Bug: #1430525
Change-Id: Ib54b83b1ad6dc42b084adf48ddd53a64a9b12cf7

9 years agoHuawei driver check before associating LUN to a LUN group
Bob-OpenStack [Mon, 19 Jan 2015 01:05:14 +0000 (17:05 -0800)]
Huawei driver check before associating LUN to a LUN group

This commit fixes the following problems:
* Change in huawei_t.py removes the duplicated wwns
  returned from the array.
* Change in rest_common.py adds log print for response
  data from the array.
* Change in rest_common.py does a check before associating
  a LUN to a LUN group.
* Change in rest_common.py fixes the REST request.
* Change in ssh_common.py checks whether the hostlunid
  have already been assigned.

Closes-Bug: #1411904
Change-Id: I862ed5d71780fb7b8cbc5ed257072ea1113fead7

9 years agoMerge "Move to the oslo.middleware library"
Jenkins [Sun, 15 Mar 2015 21:05:16 +0000 (21:05 +0000)]
Merge "Move to the oslo.middleware library"

9 years agoMerge "Add waiting for the driver to SchedulerManager"
Jenkins [Sun, 15 Mar 2015 20:33:53 +0000 (20:33 +0000)]
Merge "Add waiting for the driver to SchedulerManager"

9 years agoMerge "Add is_ready method to scheduler driver"
Jenkins [Sun, 15 Mar 2015 20:18:30 +0000 (20:18 +0000)]
Merge "Add is_ready method to scheduler driver"

9 years agoFix typos in LVMVolumeDriver
Mitsuhiro SHIGEMATSU [Sun, 15 Mar 2015 11:16:23 +0000 (20:16 +0900)]
Fix typos in LVMVolumeDriver

Fix typos. "Succesfully" -> "Successfully"

Change-Id: Ic26d7fc65c1e8b97bfac2fcc3aa395090716020f
Closes-Bug: #1429773

9 years agoMerge "Fix Cinder logs to show authentication error in RBD driver"
Jenkins [Sat, 14 Mar 2015 02:06:53 +0000 (02:06 +0000)]
Merge "Fix Cinder logs to show authentication error in RBD driver"

9 years agoMerge "Implement IET target driver"
Jenkins [Sat, 14 Mar 2015 00:09:20 +0000 (00:09 +0000)]
Merge "Implement IET target driver"

9 years agoMerge "Fix LVM thin pool creation race"
Jenkins [Fri, 13 Mar 2015 21:53:53 +0000 (21:53 +0000)]
Merge "Fix LVM thin pool creation race"

9 years agoImplement IET target driver
Mitsuhiro Tanino [Thu, 26 Feb 2015 00:16:39 +0000 (19:16 -0500)]
Implement IET target driver

When introducing Change-Id: I43190d1dac33748fe55fa00f260f32ab209be656,
IET driver was not implemented. This patch adds IET target for new
iscsi target driver model.

Certification results:
    https://bugs.launchpad.net/cinder/+bug/1428758

Closes-Bug: #1409918
Closes-Bug: #1329139

Co-Authored-By: Anish Bhatt <anish@chelsio.com>
Change-Id: I165a592bb3a39728fcc3d8ee4162b579c13ba928

9 years agoFix unit tests for multiattach patch
Walter A. Boring IV [Wed, 11 Mar 2015 18:18:34 +0000 (11:18 -0700)]
Fix unit tests for multiattach patch

Part of the process of accepting the Cinder multiattach
patch was to create a follow up patch that fixes some of
the inconsistencies with order of parameters in the new
unit tests.   This patch fixes those assertX calls and
parameter ordering to be in the style of:
expected, actual

Change-Id: I4e199899afdec0497df130d02560ab58a959a0dc
Closes-Bug: #1430946

9 years agoFixed a concurrency issue in VMAX driver
Xing Yang [Fri, 20 Feb 2015 06:38:09 +0000 (01:38 -0500)]
Fixed a concurrency issue in VMAX driver

This patch fixed the following problem:

When trying to add a second volume to the same masking view,
the first volume got removed at the same time, causing
the operation on the second volume to fail.

When two attach requests happen at the same time on the same
volume, the second one will fail.

Also fixed a W503 pep8 issue (line break before binary operator)
in emc_vmax_common.py.

Closes-Bug: #1416035
Closes-Bug: #1403160
Change-Id: I52975b399c2bd8e2a91bdd09004ee277e54c9a89

9 years agoFix LVM thin pool creation race
Duncan Thomas [Tue, 13 Jan 2015 16:41:13 +0000 (18:41 +0200)]
Fix LVM thin pool creation race

In the event that two copied of the LVM driver get init called at
the same time (e.g. cinder-volume and cinder-backup getting
started in parallel, on the same host), it is possible for the
thin pool check/create to race. Add a simple recheck if the create
fails, to cover this window.

Change-Id: I006970736ba0e62df383bacc79b5754dea2e9a3e
Closes-Bug: #1410341

9 years agoFix ArgsAlreadyParsedError in emc_vnx_cli.py
peter_wang [Fri, 13 Mar 2015 06:27:17 +0000 (02:27 -0400)]
Fix ArgsAlreadyParsedError in emc_vnx_cli.py

This error was introduced after adding following:
logging.register_options(CONF)
in https://review.openstack.org/#/c/157441/
So, this patchset is to remove this.

Change-Id: I3d7d30fb8a5d8f5424811fc7422efc2546300a12
Closes-Bug: 1431875

9 years agoMerge "Remove strutils from oslo-incubator"
Jenkins [Fri, 13 Mar 2015 08:13:47 +0000 (08:13 +0000)]
Merge "Remove strutils from oslo-incubator"

9 years agoMerge "Fix a typo in sf_template_account_name help"
Jenkins [Fri, 13 Mar 2015 08:01:28 +0000 (08:01 +0000)]
Merge "Fix a typo in sf_template_account_name help"

9 years agoMerge "Tests: Harden fake_notifier asserts"
Jenkins [Fri, 13 Mar 2015 00:43:32 +0000 (00:43 +0000)]
Merge "Tests: Harden fake_notifier asserts"

9 years agoFix a typo in sf_template_account_name help
Romain Hardouin [Thu, 12 Mar 2015 20:14:05 +0000 (21:14 +0100)]
Fix a typo in sf_template_account_name help

Note: the config reference documentation for operators is auto
generated from Cinder sources.

Change-Id: I8ba5609acc512965fb38b02086127395d910e8c3
Closes-Bug: #1431543

9 years agoMove to the oslo.middleware library
Jay S. Bryant [Wed, 11 Mar 2015 01:15:00 +0000 (20:15 -0500)]
Move to the oslo.middleware library

This patch moves Cinder to using olso.middleware, updates us so
we are using the oslo_middleware namespace and syncs the latest
middleware code from oslo-incubator to support grenade jobs.

The details for the middleware sync from oslo-incubator are as follows:

Current HEAD in OSLO:
---------------------
commit e589dde0721a0a67e4030813e582afec6e70d042
Date:  Wed Feb 18 03:08:12 2015 +0000
Merge "Have a little fun with release notes"

Changes merged with this patch:
---------------------
__init__.py
  4ffc4c87 - Add middleware.request_id shim for Kilo
  4504e4f4 - Remove middleware

catch_errors.py
  a01a8527 - Use oslo_middleware instead of deprecated oslo.middleware
  ce8f8fa4 - Add middleware.catch_errors shim for Kilo
  4504e4f4 - Remove middleware
  5d40e143 - Remove code that moved to oslo.i18n
  76183592 - add deprecation note to middleware
  463e6916 - remove oslo log from middleware
  fcf517d7 - Update oslo log messages with translation domains

request_id.py
  a01a8527 - Use oslo_middleware instead of deprecated oslo.middleware
  66d8d613 - Fix oslo.middleware deprecation error
  4ffc4c87 - Add middleware.request_id shim for Kilo
  4504e4f4 - Remove middleware
  76183592 - add deprecation note to middleware
  d7bd9dc3 - Don't store the request ID value in middleware as class variable

Some notes on this change.  It is based on the change made in Nova:
https://review.openstack.org/#/c/130771 and is the recommended method
for cleaning up the unused portions of middleware from oslo-incubator,
moving to the oslo.middleware library and not breaking grenade in the
gate.

Change-Id: Ia99ab479cb8ef63a0db1a1208cc2501abba6132c

9 years agoMerge "Remove the useless next link for volumes, transfers and backups"
Jenkins [Thu, 12 Mar 2015 18:48:25 +0000 (18:48 +0000)]
Merge "Remove the useless next link for volumes, transfers and backups"

9 years agoRemove use of contextlib.nested
Sean McGinnis [Tue, 24 Feb 2015 15:24:52 +0000 (09:24 -0600)]
Remove use of contextlib.nested

The contextlib.nested call has been deprecated
in Python 2.7. This causes DeprecationWarning
messages in the unit tests.

There are also known issues with contextlib.nested
that were addressed by the native support for
multiple "with" variables. For instance, if the
first object is created but the second one throws
an exception, the first object's __exit__ is never
called.

Since Cinder no longer supports 2.6 we can remove
the use of these contextlib.nested calls.

Added hacking check to catch if any new instances
are added to the codebase.

Note: line continuation markers (e.g. '\') had to
be used or syntax errors were thrown. While using
parentheses is the preferred way for multiple line
statements it is not a requirement.

Partial-Bug: 1428424
Change-Id: I7bb7d201d31ff239be3402fb64e5f202ede019b0

9 years agoRemove strutils from oslo-incubator
Jay S. Bryant [Thu, 12 Mar 2015 18:34:16 +0000 (13:34 -0500)]
Remove strutils from oslo-incubator

This change goes along with the work to get away from
oslo-incubator modules to using the new oslo libraries.
The strutils module moved to the oslo_utils library and
should no longer be used from oslo-incubator.

Additionally, merging this change removes a dependency on
gettextutils, allowing us to remove another deprecated
module.

Change-Id: Ibd4e848b526c67cad660c31038df718ac416c6e1

9 years agoMerge "Fix sqlalchemy reuse in multi-backend children"
Jenkins [Thu, 12 Mar 2015 18:24:23 +0000 (18:24 +0000)]
Merge "Fix sqlalchemy reuse in multi-backend children"

9 years agoAdd waiting for the driver to SchedulerManager
Michal Dulko [Thu, 12 Mar 2015 16:24:09 +0000 (17:24 +0100)]
Add waiting for the driver to SchedulerManager

This patch adds _wait_for_scheduler method before serving any request.
Method waits till scheduler.is_ready() returns true or
CONF.periodic_interval seconds passed from service startup.

Change-Id: I9fab9fb076a955a24c1c157229baf027359d9771
Closes-Bug: 1409012

9 years agoFix sqlalchemy reuse in multi-backend children
Eric Harney [Wed, 11 Mar 2015 18:00:44 +0000 (14:00 -0400)]
Fix sqlalchemy reuse in multi-backend children

Multi-backend breaks because sqlalchemy objects
are shared between child backends.

When creating a new service (Base), call dispose
to reset the sqlalchemy object and connection.

Change-Id: I9d937c5b2fa850edc5523f26e031f59cad5a9e7e
Closes-Bug: #1417018

9 years agoFix Cinder logs to show authentication error in RBD driver
Yuriy Nesenenko [Tue, 10 Mar 2015 10:27:51 +0000 (12:27 +0200)]
Fix Cinder logs to show authentication error in RBD driver

The Cinder logs fail to report authentication error when working
with the RBD driver.

Change-Id: I3d190d6359c744efe0c6d0612bd0f2d2e6b0ab0d
Closes-Bug: #1389983

9 years agoUpdate hacking check for oslo_log
Jay S. Bryant [Thu, 12 Mar 2015 15:06:23 +0000 (10:06 -0500)]
Update hacking check for oslo_log

With commit 5980da5d we moved Cinder to using the olso.log
library.  We also moved to the new oslo_log namespace.  With that
change we should have also updated the hacking checks to include
looking for old uses of oslo.log.

This change adds the necessary hacking check.

Change-Id: I6a5d4b66d3258dbd01543be03810a8f84040e660

9 years agoAdd is_ready method to scheduler driver
Michal Dulko [Thu, 12 Mar 2015 15:07:03 +0000 (16:07 +0100)]
Add is_ready method to scheduler driver

This commit adds is_ready method to scheduler driver to indicate
if driver is ready to accept requests. Scheduler is considered ready
when host_manager received capabilities for all active volume services.

Partial-Bug: 1409012
Change-Id: I4a90e68a3836c44038ee8c937ae1ecf40e5c1f32

9 years agoMerge "Add config option to override url for versions"
Jenkins [Thu, 12 Mar 2015 13:38:40 +0000 (13:38 +0000)]
Merge "Add config option to override url for versions"

9 years agoMerge "Unset auth token before trying to login to Datera"
Jenkins [Thu, 12 Mar 2015 11:50:38 +0000 (11:50 +0000)]
Merge "Unset auth token before trying to login to Datera"

9 years agoDatera driver looks for lun-0 instead lun-1 now
Mike Perez [Thu, 12 Mar 2015 06:37:38 +0000 (23:37 -0700)]
Datera driver looks for lun-0 instead lun-1 now

In exports this changed for the Datera solution. This was done to
support older systems.

Closes-Bug: #1431175
Change-Id: If5ef68bd065b98d0f8b991344a1c001a21dbf4da

9 years agoMerge "Allow scheduler to receive volume stats when starting service"
Jenkins [Thu, 12 Mar 2015 06:08:33 +0000 (06:08 +0000)]
Merge "Allow scheduler to receive volume stats when starting service"

9 years agoUse oslo.log instead of oslo-incubator
Ivan Kolodyazhny [Thu, 19 Feb 2015 16:43:42 +0000 (18:43 +0200)]
Use oslo.log instead of oslo-incubator

log module was removed from oslo-incubator after oslo.log released.

Change-Id: I205d0625c502cb462919edc76d12091edcc21b1b
Implements: blueprint port-oslo-incubator-to-oslo-log
Partial-Bug: #1381563

9 years agoRemove the useless next link for volumes, transfers and backups
Vincent Hou [Wed, 29 Oct 2014 08:40:31 +0000 (01:40 -0700)]
Remove the useless next link for volumes, transfers and backups

Two cases this patch will resolve:
1) Currently if the number of items equals the osapi_max_limit or
the last page of items equals the osapi_max_limit without the
parameter limit set in the user request, a next link is generated
in the response, though this next link will return empty volume
list. In fact it is unnecessary to generate the next link in
this case.

2) If the number of items equals the osapi_max_limit and limit is
greater than osapi_max_limit, a next link is generated. Actually,
the next link does not need to be generated, because it is certain
that there is no more volumes left in the database.

The method _get_collection_links has been called in volumes,
volume_transfers and backups. The patch can only affect the next
link generation for three of them. However, other lists like
consistency groups, qos specs, cgsnapshots have not implemented the
generation for the next link. Potentially this can be a wishlist
item for them.

Change-Id: I0f1f449c73d51675281497a095d869c1e72c889f
closes-bug: #1350558

9 years agoMerge "NFS backup driver"
Jenkins [Wed, 11 Mar 2015 22:43:11 +0000 (22:43 +0000)]
Merge "NFS backup driver"

9 years agoMerge "Add multiattach capabilities injection"
Jenkins [Wed, 11 Mar 2015 21:32:55 +0000 (21:32 +0000)]
Merge "Add multiattach capabilities injection"

9 years agoMerge "Update volume type name for volume type API"
Jenkins [Wed, 11 Mar 2015 20:46:18 +0000 (20:46 +0000)]
Merge "Update volume type name for volume type API"

9 years agoUnset auth token before trying to login to Datera
Mike Perez [Wed, 11 Mar 2015 19:27:32 +0000 (12:27 -0700)]
Unset auth token before trying to login to Datera

After a token expires, the Datera driver would try to login, and pass
along the expired token. This would fail because the receiving server
will authorize anytime it's given an auth token, even for endpoints that
don't require it. This change unsets the auth token when logging in, so
it's not passed a long.

Closes-Bug: #1430978
Change-Id: Id445718e3e73b676e3af8005b8fdd1a028ef2b0e

9 years agoNFS backup driver
Tom Barron [Mon, 19 Jan 2015 17:58:02 +0000 (12:58 -0500)]
NFS backup driver

Implements an NFS backup service in accord with the NFS backup driver
blueprint spec (https://review.openstack.org/#/c/130858).

Currently the NFS backup driver inherits directly from the abstract
chunked backup driver.  It should be straightforward to abstract out
of this code a posix filesystem backup driver, without dynamic mount
capabilities, which itself inherits from the chunked backup driver.
When that is done, most of the code in this implementation can be
removed and it can be modified to inherit from the posix filesystem
backup driver itself.

Implements: blueprint nfs-backup

Change-Id: I01ce30c25e7239e68cc7c70038f4f880218cb66a

9 years agoMerge "Adjust Cinder to support FCP on System z systems"
Jenkins [Wed, 11 Mar 2015 16:53:55 +0000 (16:53 +0000)]
Merge "Adjust Cinder to support FCP on System z systems"

9 years agoMerge "Add volume multi attach support"
Jenkins [Wed, 11 Mar 2015 16:36:03 +0000 (16:36 +0000)]
Merge "Add volume multi attach support"

9 years agoAdd multiattach capabilities injection
Walter A. Boring IV [Thu, 26 Feb 2015 22:59:13 +0000 (22:59 +0000)]
Add multiattach capabilities injection

This patch is a follow up to the multiattach patch that adds
the ability to the scheduler to be able to filter capabilities
on the volume multiattach flag.   When a volume creation request
comes in with the multiattach flag set on a volume, there was no
way to filter out backends that don't support attaching a volume
to more than one host.   By defaut, no host supports it.  When
The Nova side lands, we can adjust drivers to add the new
multiattach:True capability reporting.

Change-Id: Ia426a2bf2ab8214f52fb6e70a3a1deff68d13d98

9 years agoTests: Harden fake_notifier asserts
Eric Harney [Tue, 10 Mar 2015 20:34:16 +0000 (16:34 -0400)]
Tests: Harden fake_notifier asserts

This is a continuation of
8740e063 - Make test_create_delete_snapshot more robust

The same issue cropped up for me in
test_create_consistencygroup_from_src().

Add some more specific asserts to try to reveal what
is going wrong here.  The idea is to assert more
specific things (examining individual notifications)
before more general asserts (count of notifications) when
possible, to fail the test on the check that will provide
the most information back.

Related-Bug: #1412513

Change-Id: I267bd5933247f69f220a7be871a63e4db9eb9a80

9 years agoError trying to delete snapshots on Hitachi driver
marcusvrn [Thu, 5 Mar 2015 18:52:54 +0000 (15:52 -0300)]
Error trying to delete snapshots on Hitachi driver

Patch #133566 (Change-Id: I387018e80c8539565e99454db65d976030002c0f) partially
changed Volumes and Volume Snapshots to objects and modified their attributes.
This change broke HBSD driver, once the 'snapshot_metadata' attribute was
replaced to 'metadata'.

Change-Id: I38edc3b8a924f16ec3cef848cffef5e1b48fef14
Closes-Bug: #1428609

9 years agoMerge "Namespace updates for _i18n and imageutils & fileutils"
Jenkins [Wed, 11 Mar 2015 09:59:45 +0000 (09:59 +0000)]
Merge "Namespace updates for _i18n and imageutils & fileutils"

9 years agoRemove global mocking from test_pure.py
Michal Dulko [Wed, 11 Mar 2015 09:36:38 +0000 (10:36 +0100)]
Remove global mocking from test_pure.py

Tests for pure driver are patching cinder.utils.retry globally. All
tests running after test_pure got imported have retry decorator already
mocked. This creates problems when writing new unit tests involving the
decorator. This change unpatches cinder.utils.retry after test_pure
imports pure driver.

Change-Id: Ie9cbe6ffb3cfcaba5a296b5083974696117b99bb
Closes-Bug: 1430699

9 years agoAllow scheduler to receive volume stats when starting service
Zhiteng Huang [Tue, 24 Feb 2015 09:05:46 +0000 (17:05 +0800)]
Allow scheduler to receive volume stats when starting service

Filter scheduler relies on volume services to report their stats in
order to make decisions - this nature makes scheduler service a bit
special when it starts because it can't really do anything without
knowning stats of avilable volume backend.  So the original
implementation of Filter Scheduler added a hook in init_host() to
ask all volume services to send their stats immediately (volume RPC
call 'publish_service_capabitlies()'), this reduced the chance of a
new volume being set to 'error' state because scheduler has no
knowledge of backends to minimum.

             Scheduler       RPC Exchanges    Volume Service(s)
service start | RPC init                          |
              | init_host()                       |
              | --pub_src_caps()-->|  ----------> | (vol fanout)
              |     <-------------  |<-vol stats--| (sch fanout)

However, commit 65fa80c361f71158cc492dfc520dc4a63ccfa419 moved
init_host() ahead of service RPC initialization because for volume
services, service initialization should be done before the service
starts accepting RPC requests.  This change unfortunately invalidated
scheduler service's init_host() because that needs to be done *AFTER*
RPC is ready (a queue is bound to scheduler fanout exchange).  The
result is scheduler asks vol service to send update, but it misses
the information it asked for because its queue hasn't been created
and bound to the fanout queue yet.  So scheduler always has to wait
for the next update from volume services to be able to work properly.

             Scheduler       RPC Exchanges    Volume Service(s)
service start | init_host()                       |
              | --pub_src_caps()-->|  ----------> | (vol fanout)
              |   (vol stats lost)  |<-vol stats--| (sch fanout)
              | RPC init                          |

This change adds a new hook to Manager class called init_hook_with_rpc()
to allow services like scheduler to do something once RPC is ready.
This should restore scheduler's behavior before commit
65fa80c361f71158cc492dfc520dc4a63ccfa419.

Change-Id: If6cf9030eb44c39a06ec501ac5c049d460782481
Partial-bug: #1409012

9 years agoMerge "Fixes VNX NotImplementedError of unmanage"
Jenkins [Wed, 11 Mar 2015 05:01:53 +0000 (05:01 +0000)]
Merge "Fixes VNX NotImplementedError of unmanage"

9 years agoMerge "Dell FC driver inheritance order causing failures"
Jenkins [Wed, 11 Mar 2015 04:49:44 +0000 (04:49 +0000)]
Merge "Dell FC driver inheritance order causing failures"

9 years agoAdjust Cinder to support FCP on System z systems
Stefan Amann [Mon, 26 Jan 2015 12:49:16 +0000 (13:49 +0100)]
Adjust Cinder to support FCP on System z systems

There are some platform specific changes needed to allow Cinder to
support FCP on System z: the System z specific format of the device file
paths, adding and removing devices explicitely, and ignoring vHBAs which
are offline.

Partial-Implements blueprint linux-systemz

Change-Id: Ia61c37246235bec618de5bb7f718e8b5520bc9ae

9 years agoRefactor Swift backup driver and introduce chunking driver
Tom Barron [Thu, 15 Jan 2015 23:03:16 +0000 (18:03 -0500)]
Refactor Swift backup driver and introduce chunking driver

Abstract out a "chunked" backup driver class between the top
abstract backup driver class and the Swift backup driver class
which implements common functionality for backup drivers that
store volume data in multiple "chunks" in a backup repository
when the size of the backed up cinder volume exceeds the size
of a backup repository "chunk."

The Swift driver itself is reworked to extend the chunked
backup driver and implement abstract methods defined in the
chunked backup driver.  It is expected that posix filesystem
and NFS backup drivers will also extend the chunked backup
driver.

Co-authors: Kevin Fox <kevin@efox.cc>
            Tom Barron <tpb@dyncloud.net>

Implements: blueprint chunked-backup-base-class

Change-Id: Ifbd1462ceb9b98bd8a6d72e5725399474eedf60e

9 years agoNamespace updates for _i18n and imageutils & fileutils
Jay S. Bryant [Fri, 20 Feb 2015 21:21:55 +0000 (15:21 -0600)]
Namespace updates for _i18n and imageutils & fileutils

The _i18n and imageutils modules only have changes
to move oslo.utils to the oslo_utils namespace and
oslo.i18n to oslo_i18n.  So, I have lumped these
two small changes into this one patch.

Current HEAD in OSLO:
---------------------
commit e589dde0721a0a67e4030813e582afec6e70d042
Date:  Wed Feb 18 03:08:12 2015 +0000
Merge "Have a little fun with release notes"

Changes merged with this patch:
---------------------
_i18n.py
  0cc741a9 - switch to oslo_i18n
imageutils.py
  ac17de97 - Use oslo_utils instead of deprecated oslo.utils
fileutils.py
  ac17de97 - Use oslo_utils instead of deprecated oslo.utils

Change-Id: I749dd8869bbc07d980300e0acbf3903ff7b297cd

9 years agoDell FC driver inheritance order causing failures
Sean McGinnis [Tue, 10 Mar 2015 16:20:25 +0000 (11:20 -0500)]
Dell FC driver inheritance order causing failures

After commit 610c672998c87e2bf2f919a4fdea86749c748a1f merged
the third party CI test runs for the Dell Storage Center fibre
channel driver started failing. This appeared to be a change
in get_volume_stats calls.

After isolating the cause of this problem it was identified
that the order of the inherited classes for the driver was
resulting in the wrong overridden get_volume_stats call to be
called.

This patch fixes this be just switching the order of the two
parent classes DellCommonDriver and FibreChannelDriver. Swapping
these two results in the correctly overridden call to be made
and CI tests to pass successfully.

Change-Id: I58ec1fde585179037aeca8d449e74d0333fb013d
Closes-Bug: 1430421

9 years agoMerge "Update Datera's export to avoid deprecated keys"
Jenkins [Tue, 10 Mar 2015 15:55:39 +0000 (15:55 +0000)]
Merge "Update Datera's export to avoid deprecated keys"

9 years agoMerge "Improve error handling in refactored Tgt driver"
Jenkins [Tue, 10 Mar 2015 15:51:48 +0000 (15:51 +0000)]
Merge "Improve error handling in refactored Tgt driver"

9 years agoMerge "Replace assertEqual(True, *) -> assertTrue(*)"
Jenkins [Tue, 10 Mar 2015 15:50:46 +0000 (15:50 +0000)]
Merge "Replace assertEqual(True, *) -> assertTrue(*)"

9 years agoAdd volume multi attach support
Walter A. Boring IV [Wed, 10 Dec 2014 01:03:39 +0000 (01:03 +0000)]
Add volume multi attach support

This patch includes the Cinder changes needed
to support volume multiple attaches.  Nova and
python-cinderclient also need patches associated
to provide support for multiple attachments.

This adds the multiattach flag to volumes.  When a
volume is created, a multiattach flag can be set,
which allows a volume to be attached to more than
one Nova instance or host.  If the multiattach flag is
not set on a volume, it cannot be attached to more
than one Nova instance or host

Each volume attachment is tracked in a
new volume_attachment table.  The attachment id is
the unique identifier for each attachment to an
instance or host.

When a volume is to be detached the attachment
uuid must be passed in to the detach call in
order to determine which attachment should be
removed.  Since a volume can be attached to an
instance and a host, the attachment id is used
as the attachment identifier.

Nova:
https://review.openstack.org/#/c/153033/
https://review.openstack.org/#/c/153038/

python-cinderclient:
https://review.openstack.org/#/c/85856/

Change-Id: I950fa00ed5a30e7758245d5b0557f6df42dc58a3
Implements: blueprint multi-attach-volume
APIImpact

9 years agoFixes VNX NotImplementedError of unmanage
peter_wang [Mon, 9 Mar 2015 00:38:25 +0000 (20:38 -0400)]
Fixes VNX NotImplementedError of unmanage

When unmanaging a volume, cinder would call unmanage.
This fix is to add unmanage to avoid NotImplementedError.

Change-Id: I11539cc945d432e23bebf085cacb0023b9a6a1e3
Closes-Bug: 1429702

9 years agoReplace assertEqual(True, *) -> assertTrue(*)
Kallebe Monteiro [Mon, 9 Mar 2015 19:05:36 +0000 (16:05 -0300)]
Replace assertEqual(True, *) -> assertTrue(*)

Inspired by Dave Chen's change request on keystone about this, I
decided to check in cinder code to see if there were many cases.

Since unittest provides assertTrue and assertFalse, it is better
to use assertTrue(var) instead of assertEqual(True, var) and the same
thing applies to assertFalse.

I used these commands to search the occurrences:
* grep -PRIn "assertEqual\(True"
* grep -PRIn "assertEqual\(False"
* grep -PRIn "assertEqual\(\w+\s*,\s*True"
* grep -PRIn "assertEqual\(\w+\s*,\s*False"

Closes-Bug: #1430262

Change-Id: Ie92ce744d68a473b9ecc5214ed322bf2c5f5e000

9 years agoMerge "Adds pool aware scheduling for HNAS drivers"
Jenkins [Tue, 10 Mar 2015 08:20:54 +0000 (08:20 +0000)]
Merge "Adds pool aware scheduling for HNAS drivers"

9 years agoUpdate Datera's export to avoid deprecated keys
Mike Perez [Mon, 9 Mar 2015 21:38:50 +0000 (14:38 -0700)]
Update Datera's export to avoid deprecated keys

The export call has been updated in Datera. The old location for the IQN
has moved. This updates the Kilo driver with support of looking in the
new location. The Juno driver will remain using the old location.

Closes-Bug: #1430024
Change-Id: I28a76ef849c2d3a0e4d08c5d0707e28d9617f534

9 years agoImprove error handling in refactored Tgt driver
Anish Bhatt [Tue, 10 Feb 2015 23:59:04 +0000 (15:59 -0800)]
Improve error handling in refactored Tgt driver

Only allow IOError to fall through when file not found is
acceptable. Cleanup a few error messages, remove uses of six as
this is not required

Closes-Bug: 1422095
Change-Id: I8a8f1ee561b15b38860b31cae1b444527e998869

9 years agoMerge "PureISCSIDriver consistency group updates."
Jenkins [Mon, 9 Mar 2015 20:23:26 +0000 (20:23 +0000)]
Merge "PureISCSIDriver consistency group updates."

9 years agoAdds pool aware scheduling for HNAS drivers
Erlon R. Cruz [Mon, 12 Jan 2015 18:59:10 +0000 (16:59 -0200)]
Adds pool aware scheduling for HNAS drivers

This commit adds the pool aware feature for HNAS drivers. Now, each service
label in HNAS XML config will be considered as a pool unit. In order to be able
to cast a volume to a service, the admin must create 'volume_type's and each
volume type need to have the 'service_label' with the same tag set in the XML
config, and then the user can create a volume with the desired volume_type.

Implements:  blueprint hds-hnas-pool-aware-sched
Change-Id:  Iddff7ad606b06454458fc53bfc7b812f9815f0e1

9 years agoPureISCSIDriver consistency group updates.
Patrick East [Fri, 13 Feb 2015 21:35:51 +0000 (13:35 -0800)]
PureISCSIDriver consistency group updates.

This will enable the driver to add and remove volumes from Purity
protection groups that correspond to Cinders consistency groups, as well
as create a consistency group from a cgsnapshot.

Implements: blueprint pure-iscsi-update-cg
Change-Id: I662e705a1b531a64900304782183041600e13354

9 years agoHP lefthand driver filter and evalautor function
Anthony Lee [Tue, 3 Mar 2015 01:49:52 +0000 (17:49 -0800)]
HP lefthand driver filter and evalautor function

This patch implements the merged change in the scheduler
https://review.openstack.org/#/c/129987/ in HP lefthand driver.

1. Added filter_function and goodness_function strings

2. Added 2 stats total_volumes and capacity_utilization so they can be
used as the part of the formula in filter_function or goodness_function
string.

implements: blueprint hplefthand-driver-supplies-filtering-weighing-functions
Change-Id: I6193196ba1930f9d07865c062f12573e1570f290

9 years agoMerge "Add consistency group support for XIV/DS8K cinder driver proxy"
Jenkins [Mon, 9 Mar 2015 00:56:12 +0000 (00:56 +0000)]
Merge "Add consistency group support for XIV/DS8K cinder driver proxy"

9 years agoMerge "HP 3par driver filter and evaluator function"
Jenkins [Sun, 8 Mar 2015 23:11:06 +0000 (23:11 +0000)]
Merge "HP 3par driver filter and evaluator function"

9 years agoMerge "Don't fail target_delete if ACL's don't exist"
Jenkins [Sat, 7 Mar 2015 20:23:00 +0000 (20:23 +0000)]
Merge "Don't fail target_delete if ACL's don't exist"

9 years agoMerge "Fix "rtsllib" -> "rtslib" typos"
Jenkins [Sat, 7 Mar 2015 20:17:03 +0000 (20:17 +0000)]
Merge "Fix "rtsllib" -> "rtslib" typos"

9 years agoMerge "Use snapshot object in create_volume flow"
Jenkins [Sat, 7 Mar 2015 16:17:07 +0000 (16:17 +0000)]
Merge "Use snapshot object in create_volume flow"

9 years agoMerge "Adds SSH communication to HNAS drivers"
Jenkins [Sat, 7 Mar 2015 05:44:24 +0000 (05:44 +0000)]
Merge "Adds SSH communication to HNAS drivers"

9 years agoAdd consistency group support for XIV/DS8K cinder driver proxy
Chao Zheng CZ Li [Thu, 9 Apr 2015 07:10:39 +0000 (15:10 +0800)]
Add consistency group support for XIV/DS8K cinder driver proxy

Change-Id: I0850255a59997dbe44d9a7202ab5f947a3d91a3b
Implements: blueprint xiv-ds8k-consistency-group

9 years agoMerge "Change log level for no object attribute found"
Jenkins [Sat, 7 Mar 2015 02:13:00 +0000 (02:13 +0000)]
Merge "Change log level for no object attribute found"

9 years agoDon't fail target_delete if ACL's don't exist
Mike Perez [Sat, 7 Mar 2015 01:24:00 +0000 (17:24 -0800)]
Don't fail target_delete if ACL's don't exist

Seen in the gate a bit where a target delete is called and fails because
the ACL's don't exist for that target. If we're deleting a target and
the ACL's don't exist, it's probably safe to move on.

This patch adds a check for this specific case, logs a warning, and
continues rather than raising an exception.

Closes-Bug: #1425310
Change-Id: Ideada8ddea8624aff7add95e9caad2aba4e31ae3

9 years agoMerge "Add Manage/Unmanage support to NetApp NFS drivers"
Jenkins [Sat, 7 Mar 2015 00:26:27 +0000 (00:26 +0000)]
Merge "Add Manage/Unmanage support to NetApp NFS drivers"

9 years agoChange log level for no object attribute found
Mike Perez [Fri, 6 Mar 2015 21:47:34 +0000 (13:47 -0800)]
Change log level for no object attribute found

The operator shouldn't be exposed to this information, this should just
work and continue. Changing this to debug level for developers.

Change-Id: Ic6d40ceb8c28cafc5be6474a6caedad7e13f03d1

9 years agoAdd Manage/Unmanage support to NetApp NFS drivers
Glenn M. Gobeli [Mon, 23 Feb 2015 12:35:34 +0000 (04:35 -0800)]
Add Manage/Unmanage support to NetApp NFS drivers

This change adds support for the Cinder Manage and Unmanage API calls
to the NetApp NFS drivers. This does not add the support for the generic
NFS driver.

Partially-Implements: Blueprint nfs-manage-unmanage

Change-Id: I26eceae948bc151e28bf0c7af5de58cf86bcb605

9 years agoMerge "Add support to incremental backups in cinder"
Jenkins [Fri, 6 Mar 2015 19:48:11 +0000 (19:48 +0000)]
Merge "Add support to incremental backups in cinder"

9 years agoUse snapshot object in create_volume flow
Thang Pham [Thu, 5 Mar 2015 23:18:33 +0000 (18:18 -0500)]
Use snapshot object in create_volume flow

create_volume flow was making a call to db.snapshot_get to get
a snapshot dict and passing it onto drivers in
create_volume_from_snapshot() instead of an object. This causes
a conflict for some drivers, since create_snapshot and
create_volume_from_snapshot methods have two different snapshot
types (object vs. dict). The following patch fixes this by using
objects in create_volume flow and allows drivers to be updated
appropriately to use snapshot objects.

Change-Id: I262eaef9ac9f5f03d3f00f9a2c1fbfbd6c418676
Closes-Bug: #1428609

9 years agoFix "rtsllib" -> "rtslib" typos
Eric Harney [Fri, 6 Mar 2015 17:27:27 +0000 (12:27 -0500)]
Fix "rtsllib" -> "rtslib" typos

The correct name is "rtslib", fix up test
names.

Change-Id: I774d408f0b2493626b22e9b429c561252dd7750c

9 years agoMerge "Update Datera's Authentication method"
Jenkins [Fri, 6 Mar 2015 06:49:34 +0000 (06:49 +0000)]
Merge "Update Datera's Authentication method"