Haomai Wang [Fri, 14 Jun 2013 07:11:29 +0000 (15:11 +0800)]
Remove usage of locals() for formatting from cinder.api.*
Using of locals() for formatting string is a nasty thing because:
1) It is not so clear as using explicit dicts
2) It could produce hidden errors during refactoring
3) Changing name of variable causes change in message
4) Creating a lot of unused variables
Viraj Hardikar [Wed, 12 Jun 2013 17:34:26 +0000 (10:34 -0700)]
Fixes 3PAR drivers terminate_connection issue.
3PAR drivers now default the third parameter when terminate_connection
is called after copying a volume to image. Fixes: bug #1190056
Change-Id: Icadacc9e083c6e97a919857d735ec16068d0f0c6
Jay Payne [Sun, 9 Jun 2013 15:20:12 +0000 (10:20 -0500)]
Added policy check for backup operations
This patch adds policy checks for operations in the backup extension
consisting of create, delete, restore, get and get_all. It also adds
policies into the policy.json files in the tests and etc directories.
Haomai Wang [Mon, 10 Jun 2013 15:20:26 +0000 (23:20 +0800)]
Add availability zone checking in the api service
This patch adds availability zone checking for api request period.
If the availability zone the request specified isn't exist in the
Cinder services, the response returned to the user will give an
error immediately.
Stephen Mulcahy [Fri, 7 Jun 2013 11:52:11 +0000 (11:52 +0000)]
Add missing attributes to xml deserializer for volume request
The v1 and v2 xml deserializers for volume requests are missing
support for the imageRef, snapshot_id and source_volid attributes
resulting in xml format create volume requests which specify any
of those attributes being silently ignored. This fix adds support
to v1 and v2 and extends the volumes unit tests to check for this.
Also includes some minor debug logging enhancements to make this
easier to find in future.
Svetlana Shturm [Mon, 10 Jun 2013 14:02:26 +0000 (15:02 +0100)]
Integrate oslo's periodic tasks.
Cinder use old style invocation of periodic tasks, which not based on oslo library.
It will be better to use main idea of periodic tasks for all services.
John Griffith [Mon, 10 Jun 2013 21:05:33 +0000 (15:05 -0600)]
Remove direct call to utils.execute.
The executes calls in the base driver class
are set up to use the exectue enginge passed in on
init. There are a couple of methods that call
utils.execute directly, and as a result you end
up not using the expected execute engine when
you pass in something other than default for these
two calls.
We'd like to get away from the local execute altogether
and use the OpenStack common version only, so fix these
in driver.py and put the appropriate wrapper around them.
John Griffith [Wed, 5 Jun 2013 19:57:29 +0000 (13:57 -0600)]
Add policy checking for transfer create/accept.
This patch adds policy checks for transfer create/accept
as well as adding the associated default policy. In addition
we add the wrap in the volume/api accept_transfer method.
Vincent Hou [Thu, 6 Jun 2013 08:46:52 +0000 (16:46 +0800)]
Add the iscsi device check and exception processing.
Before downloading the image and executing the command "qemu-img convert",
check if the iSCSI device is still available via the command "sudo dd
if=<device> of=/dev/null count=1". This command will raise an exception with
the message "Input/output error", if the back-end storage is disconnected to
the cinder-volume node, so we use it to test the availability of the storage
device. If it is unavailable, there is no need to download the image &
"qemu-img convert" and an exception DeviceUnavailable will be raised.
Morgan Fainberg [Sat, 8 Jun 2013 00:18:59 +0000 (17:18 -0700)]
Minor Logic bug in NFS Driver.
When checking oversubscription rate, we need to ensure that we
check the _allocated_ (apparant size) not the _available_ (actual
usage) on the NFS share. This fix ensures we are now checking the
correct values. This bug allowed (effectively) a one-time
volume allocation that would push the "apparant" size over the
oversubscription rate.
leseb [Thu, 23 May 2013 17:09:06 +0000 (19:09 +0200)]
NFS drivers don't honor vm size with volume from an image
The bug has been encountered with the NFS generic driver
(cinder.volume.nfs.NfsDriver) and the NetApp NFS driver
(cinder.volume.drivers.netapp.nfs.NetAppDirectCmodeNfsDriver). I believe
that drivers based on distributed filesystem such as GlusterFS, nexenta
and scality are also impacted however I didn't test it those backends.
However since most of them already inherit from the RemoteFsDriver
class, this should be fine.
John Griffith [Thu, 30 May 2013 22:05:45 +0000 (16:05 -0600)]
Fix config registration in cinder volume drivers.
The config documentation relies on options being registered
on a modules import. Our need to move the drivers to using
self.configuration for multi-backend support means that options
wouldn't be loaded until object initialization which breaks
documentation.
This patch puts a dummy CONF init/load back in the drivers. While putting
this change together I came across a number of drivers still using FLAGS,
and even worse a number of drivers using a mixture of FLAGS and CONF and
self.configuraiton. So most of those are cleaned up here as well.
Note there are two drivers that were not updated at all here:
1. windows.py
2. zadara.py
The zadara folks have indicated that they're in the process of updating and
releasing a new version of their driver so I left that as is.
The windows driver needs a bit of work to switch over.
John Griffith [Tue, 4 Jun 2013 18:59:20 +0000 (12:59 -0600)]
Elevate acceptors context on accept reserve udpate
When accepting a transfer we need to update the
quota data for both the donor and the acceptor's.
The acceptor is easy enough (as that's the context
we currently are using) however to update the donor's
quota data we need an elevated context.
John Griffith [Tue, 4 Jun 2013 19:02:37 +0000 (13:02 -0600)]
Add call to vol driver when accepting a transfer
Some back-ends have the notion of tenancy on volumes
and set ownership in the driver. The update of the DB
alone when doing volume transfers isn't enough, we need
to be able to propogate the update info all the way
down to the driver level.
This patch introduces the volume api/manger/rpc calls
and implements a stub in the base driver that can
be over-ridden for those that need to take some action.
Sergey Vilgelm [Mon, 3 Jun 2013 09:12:32 +0000 (13:12 +0400)]
Replace FLAGS with cfg.CONF in db
Replace all the FLAGS with cfg.CONF in cinder/db
Large commit "https://review.openstack.org/31172" was split into several parts
Use the common pattern: CONF = cfg.CONF
Jay S. Bryant [Mon, 3 Jun 2013 15:01:58 +0000 (10:01 -0500)]
Re-write of the cinder-manage man page.
The cinder-manage man page didn't appear to have been re-written
since splitting from Nova. There were numerous options that
no longer exist documented and references to Nova instead of
Cinder.
This version has been re-written based on the current code in
cinder-manage.
Sergey Vilgelm [Mon, 3 Jun 2013 13:36:42 +0000 (17:36 +0400)]
Replace FLAGS with cfg.CONF in scheduler
Replace all the FLAGS with cfg.CONF in cinder/scheduler
Large commit "https://review.openstack.org/31172" was split into several parts
Use the common pattern: CONF = cfg.CONF
Dirk Mueller [Sat, 1 Jun 2013 12:25:37 +0000 (14:25 +0200)]
Handle IPv6 specifid glance servers gracefully
IPv6 netlocs can for valid reasons contain ':', so
splitting by ':' is dangerous. Instead of splitting
by host and port in order to only reassemble it into
a netloc again later, simply always pass netloc, which
avoids the bug.
Add extra textcases to verify the new behavior.
Fix Flake8 warnings.
Lakhinder Walia [Tue, 7 May 2013 23:05:46 +0000 (16:05 -0700)]
HDS Cinder Driver. Rev #1
blueprint hds-hus-iscsi-cinder-driver
This is the first rev of Hitachi Data Systems Cinder iSCSI driver.
This driver works with HUS (df850) array.
This driver contains all the base-line features specified for Havana release.
Amended into this submission are changes from code-reviews.