Mike Perez [Sat, 13 Apr 2013 23:43:16 +0000 (16:43 -0700)]
Deprecating old dot path locations for Folsom configs
In grizzly, we made a lot of structure changes. This deprecates the old
locations so the dot paths in old configs still work but give warnings
in the logs of what needs to be updated.
Yang Yu [Wed, 17 Apr 2013 08:00:07 +0000 (16:00 +0800)]
cinder volume service keeps retrying even code exception
Make sure that ProcessLauncher does not try to restart the failed
service. And make sure the ProcessLauncher exits, when the number
of the failed services equal the number of total services.
This patch fixes the ability to set the volume_backend_name
for each driver. The original bug was filed against LeftHand
and 3PAR, but several drivers exhibited a fixed backend name.
Michael Kerrin [Wed, 17 Apr 2013 15:36:28 +0000 (15:36 +0000)]
Dont delete backup record from database
Instead we should be marking the backup as deleted so that we have an audit
of all the backups. Backups are now marked deleted in the way that volumes
are.
John Griffith [Wed, 10 Apr 2013 05:07:52 +0000 (23:07 -0600)]
Add parsing to extra-specs key check
When using the filter scheduler which is now the default,
we can no longer pass in extra-specs like: {minIOPS:500, ....},
because the capabilities filter will reject this because there is
no host reporting minIOPS:500 capabilities.
We now need to scope the keys (ie qos:minIOPS:500....), but
that unfortunately requires a fix to the SolidFire driver.
This change add a check for the ':' in the key, and parses
on it if it's there.
Also fixes backend_name and uses VERSION var instead of
generating string in stats reporting.
John Griffith [Fri, 12 Apr 2013 17:11:38 +0000 (11:11 -0600)]
Add stats reporting to Nexenta Driver
Nexenta driver was never updated to report stats.
This change doesn't include support for backend_name assignment
via configs, there's some other work that will need to be
done to enable that.
John Griffith [Fri, 12 Apr 2013 02:05:01 +0000 (20:05 -0600)]
Add capabilities reporting to ThinLVM driver
ThinLVM driver was missing the newly required capabilities reporting
and inheritance from the parent LVM driver doesn't work because the
capacity reporting methods between regular LVM and Thin LVM are not
compatible.
This patch add the basic requirements needed in the capabilities reporting
to make it usable by the filter scheduler.
John Griffith [Mon, 29 Apr 2013 17:30:10 +0000 (11:30 -0600)]
Fix update snapshot-quotas on delete.
The merge from stable to RC of the snapshot quota
fixes missed the new CONF usage and as a result the
setting was always ignored on delete and therefore
quotas were not decremented on delete.
This patch changes CONF back to FLAGS for that call and
resolves the issue.
John Griffith [Fri, 12 Apr 2013 00:42:59 +0000 (18:42 -0600)]
Remove Flags usage from cinder.volume.driver
cinder.volume.driver was using a mix of FLAGS and the
new conf options for multi-backend. The result was failure
of multi-backend configrations to set the iscsi_helper
option.
This updates the driver.py file to use the OSLO.cfg and fixes the
check for iscsi_helper check in the initialize_connection call,
which was undefined.
This is a zero risk commit, as it removes something from tools that
isn't used. It also means removing the only GPL licensed file in the
whole of the cinder repository for 2013.1.1 release.
ID was being printed as %d instead of %s, causing tests to fail. This
error was previously undetected.
In addition, NetApp tests are failing due to a bug in the suds
package, which is no longer actively maintained. This patch adds skips
to the problematic tests, which should be removed once the issue is
resolved.
Don't see any reason to construct a list for request_spec['volume_id'].
And it indeed causes problems when the scheduler receives a reschedule
request with such a request_spec.
Yug Suo [Mon, 11 Mar 2013 08:30:07 +0000 (16:30 +0800)]
Fix quota updating when admin deletes common user's volume
Add 'project_id=None' optional argument in QUOTAS related methods.
There are two problems when admin deletes volumes of common user
before fixing this bug:
Firstly, It will get tenant quotas using context.project_id which
results in getting admin's quotas not common user's.
Secondly, It will also get wrong quota usages using context.project_id
when updating common user's quota_usages.
So we could pass into QUOTAS related methods an optional argument to
specify the tenant ID to be affected. And if it's not set, then we
default to drawing the tenant ID from the context.
Cory Stone [Mon, 25 Mar 2013 20:09:37 +0000 (15:09 -0500)]
Add the volume and snapshot gigabytes together.
The quota sync functions were not working correctly for both
snapshots and volumes regarding gigabytes. Each would report
their own count as the total gigabytes.
Now the gigabytes sync is separate from the volume and snapshot
count syncs.
John Griffith [Sun, 24 Mar 2013 20:49:46 +0000 (20:49 +0000)]
Fixed shared gigabytes quota resource.
The shared gigabytes resource between volumes and snapshots wasn't
working properly. The issue was that on update/sync the action item
(volumes or snapshots) would update the resource usages based only on
it's own particular item.
This patch fixes that, and makes the total gigabytes truly shared
between volumesa and snapshots.
Fei Long Wang [Thu, 14 Mar 2013 06:35:10 +0000 (14:35 +0800)]
Fixes Cinder REST API /volumes issue
Issue #1
Once GET variable 'offset' is specified, the API /volume will get an empty
output.
Issue #2
Should validate the GET variable 'limit' before query database to get a
consistent message with Cinder REST API v1.
By current implement, error message is as below if the variable 'limit'
is invalid:
--------------------------------------------------------------------------
{"computeFault": {"message": "The server has either erred or is incapable
of performing the requested operation.", "code": 500}}
After this change, the new message is as below:
--------------------------------------------------------------------------
{"badRequest": {"message": "limit param must be an integer", "code": 400}}
Add support to the CoraidDriver to specify a subgroup (with admin
privileges).
Coraid storage orchestration allows you to allocate portions of your
SAN to specific users/groups.
The driver should support this and not assume logging in
as "admin" (equiv to "root").
Will add another parameter to cinder.conf, "coraid_group",
and if present, the driver will authenticate using the specified group
as well as the already available coraid_user parameter.
john-griffith [Sat, 23 Mar 2013 00:01:02 +0000 (18:01 -0600)]
Last driver sync for Folsom and Grizzly
This is the last of the updates that I've been putting
off while trying to handle the core items in Cinder.
This change fixes the ctxt ordering error in volume_types
and also fixes and also changes the internal SolidFire
metadata storage to a single dict instead of a dict of dicts.
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".
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.
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.
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 = '.
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).
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.
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.
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')
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'.
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.
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.
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.
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.
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.