This patch exposes a more acurate exception message
when a user has created a manual host entry on a
3PAR system that is in an incorrect 3PAR domain than
the domain that is configured for the 3PAR driver.
The bug complained that it couldn't find a VLUN, when the
actual problem was the host existed in the wrong 3PAR domain.
john-griffith [Thu, 21 Mar 2013 15:48:03 +0000 (09:48 -0600)]
Snapshot reservation sync calls wrong resource.
The snapshot reservations code isn't calling the
correct resource on sync (it's calling volumes). There's
also some problems with the logic being used on the delete/clean up
that are fixed here as well.
Xing Yang [Thu, 21 Mar 2013 04:36:03 +0000 (00:36 -0400)]
Fixed attach volume for EMC SMI-S iSCSI driver
This problem was encountered during Grizzly RC1 testing. The driver
didn't find the correct target IQN. As a result, Nova couldn't find
the matching path in /dev/disk/by-path and therefore detached the volume.
In cinder/volume/drivers/coraid.py, _login method, if login is
unsuccessful, we try to get the message from an undefined
object "response". Instead we should be getting it from "reply".
Update Cinder's latest copy of OSLO grizzly stable
This patch updates all the files from oslo under
stable/grizzly but policy.py. policy.py is a high risk
change at this date and it has lots of changes since the
last time we updated it.
john-griffith [Wed, 20 Mar 2013 18:24:36 +0000 (12:24 -0600)]
Speedup solidfire unit tests
The SolidFire driver has a sleep that's used in a retry loop. This
sleep was being called every iteration of the loop though
(instead of just when the call failed).
This made SolidFire the slowest test in the unit tests, and obviously
it's just stupid anyway. So this change fixes that and only performs
the sleep if the call actually failed.
Dan Prince [Tue, 19 Mar 2013 23:37:47 +0000 (19:37 -0400)]
Updates to OSAPI sizelimit middleware.
Updates the OSAPI sizelimit middleware so that we use avoid calling
len on a request body which could cause a really large request
to get buffered into memory.
Also updates the middleware to return HTTP 413 which is a more
correct error code in this case (previously it returned just 400).
Michael Kerrin [Tue, 19 Mar 2013 18:04:39 +0000 (18:04 +0000)]
Add snapshots to the volume usage audit report
* Added tests for db api call volume_get_active_by_window called by the volume
usage audit report.
* Added new db api called snapshot_get_active_by_window & test it. This is
similar to the volume_get_active_by_window method but returns the snapshots
active the supplied time window.
* Integrate the above into the cinder-volume-usage-audit script to report on
all the active snapshots as well as volumes in the specified time frame.
Eric Harney [Mon, 18 Mar 2013 16:21:40 +0000 (12:21 -0400)]
Allow snapshot_delete for NFS/GlusterFS drivers
RemoteFsDriver should allow snapshot_delete, since snapshot_create
for NFS and GlusterFS volumes will create a snapshot in the error
state which cannot be deleted afterward.
snapshot_delete() should allow this to be removed rather than
throwing NotImplementedError.
Zhiteng Huang [Wed, 13 Mar 2013 05:58:27 +0000 (13:58 +0800)]
Pull Oslo log fix to enable root logger initialization
Previous log module in Oslo doesn't initialize root logger, which results
in lacking of log message for non-openstack library (such as stevedore).
This patch pull latest log module from Oslo, which has recently merged a
change to enable root logger initialization.
Notice that this change also includes one log modules fix in Oslo which
'unignore' log_format setting. As a result, one may experience log format
change when using devstack. To get old log format back, simply assign
a NULL string (aka nothing) to 'log_format' configure option in cinder.conf.
For example, just append cinder.conf with one new line 'log_format = '.
Dirk Mueller [Fri, 15 Mar 2013 15:26:27 +0000 (16:26 +0100)]
Clean up exec_dirs prefix from rootwrap conf
Specifying the full path to binaries in exec_dirs
is not necessary and actually causes a problem if
the binary is in a different path. The rootwrap
infrastructure allows the binaries to be in all
paths specified by exec_dirs.
Kurt Martin [Fri, 15 Mar 2013 21:40:10 +0000 (14:40 -0700)]
Fix typo in persona valid values
The 3PAR drivers have a persona extra spec that has a valid
values with a typo in it. The value '11 - VMWare' should be
"11 - VMware', note the lower case 'w'.
zhangchao010 [Fri, 15 Mar 2013 15:14:39 +0000 (23:14 +0800)]
Use self.configuration to support the multi-backend case
Use self.configuration instead of using FLAGS directly to make
the driver work in a multi backend environment.
And remove three repeated lines:en = out.split('\r\n')
This fixes a problem with the 3par drivers where creating
a 3par host was failing but there was no message. The driver
would fail to find the host after the creation failed and the
log entry would show that the host didn't exist. The real
error was failing to create the host.
Matthew Treinish [Wed, 13 Mar 2013 17:28:10 +0000 (13:28 -0400)]
Switch all uses of 422 response code to 400.
The 422 response is normally only for WebDAV, and these types of
errors should normally return a 400 code, HTTPBadRequest. This
commit goes through all the remaining 422 codes and changes them
to 400 responses.
Avishay Traeger [Thu, 14 Mar 2013 11:44:19 +0000 (13:44 +0200)]
Fix ISCSIDriver rescan.
Cinder fails to rescan iSCSI targets after running copy_image_to_volume
or copy_volume_to_image with the generic iSCSI implementation, due to
a missing comma.
The patch fixes issues when desassigning target to initiators
in the terminate_connection method. The method now takes
the right parameter coming from provider location.
Avishay Traeger [Tue, 5 Mar 2013 09:23:01 +0000 (11:23 +0200)]
Storwize/SVC driver fix for multibackend scenario.
In order for the Filter scheduler to be used to it's full advantage
Cinder drivers need to move away from using FLAGS directly and switch
to appending their specific options to self.configuration.
zhangchao010 [Mon, 4 Mar 2013 16:07:41 +0000 (00:07 +0800)]
Fix bugs for Huawei driver
This fixes two bugs for Huawei iscsi driver.
(1)If firstly we map LUN 1(just not LUN 0) to host,we can also
find LUN 0 mapped,whose device path is '-'.Then we will failed
to map a real LUN 0.So,we avoid mapping LUN 0 to host by setting
every volume's host LUN ID larger than 0,instead of generating it
automatically.
(2)Check valid size of resource pools when creating snapshot and
make sure it larger than 1 GB.
Avishay Traeger [Thu, 7 Mar 2013 17:18:54 +0000 (19:18 +0200)]
Do not use prefix to lookup host in Storwize/SVC.
Currently, the Storwize/SVC driver creates a host name prefix for host
objects on the back-end, and uses that to look up hosts. However, if a
host was already created with a different name (for example, manually
by an admin), the host creation operation will fail, as a host with
that connection information already exists. Instead, we look up a host
based on available connection information.
Michael J Fork [Fri, 8 Mar 2013 05:59:23 +0000 (05:59 +0000)]
Update oslo rpc libraries
Update oslo rpc libraries to capture changes, primarly motivated
by secret=True flag on password config options. Skipping broken,
invalid test case while working on correct fix.
This patch fixes a few issues with the LH driver.
1) attach wasn't working because there was no host
created.
2) get_volume_stats didn't exist.
3) fixed the unit tests to work with the new config
access.
Dan Prince [Thu, 7 Mar 2013 18:07:56 +0000 (13:07 -0500)]
Update tox.ini to support RHEL 6.x.
In order to support running unit tests on RHEL 6.x we need to patch
eventlet with contrib/redhat-eventlet.patch. We already
have support for this in the tools/install_venv_common.py but we
need to make a couple changes to allow tox to consume this:
1) Sync in the latest intall_venv_common.py from oslo. This changes
patch to use the -N option (ignore already applied patches) and
makes it safe to call the patching function more than once.
2) Add a new patch_tox_venv.py script in tools.
3) Update tox.ini to call patch_tox_venv.py before it runs tests and
coverage.
NOTE: This will hopefully go away eventually once this patch lands:
Zhiteng Huang [Fri, 8 Mar 2013 08:54:03 +0000 (16:54 +0800)]
Pull newly merged Olso update for 'is' operator
A recent update to common/scheduler/filters/extra_specs_ops.py in
Oslo added new 'is' operator to allow Boolean check. The original
commit message was:
"Boolean values for capabilities don't work because extra_specs are
all converted to unicode. The scheduler will then check, for example,
if the boolean 'True' is equal to the unicode string 'True', and will
always return False. This patch allows admins to specify '<is> True'
in extra_specs, which will compare successfully to boolean True."
Notice extra_specs_ops now relies on strutils from Olso, so this
change pull strutils from Oslo as well.
Monty Taylor [Mon, 11 Feb 2013 19:57:27 +0000 (13:57 -0600)]
Use nose and openstack nose plugin.
It's a little silly since we're working on removing nose for testr,
but it turns out that the old test run wrapper was in use here, which was
causing all sorts of havoc.