liudong [Tue, 22 Oct 2013 10:37:50 +0000 (18:37 +0800)]
Fix volume transfer href issue
The volume transfer collection in url defined as "os-volume-tranfer",
but I got another define "tranfers" in href url. They are different.
So it should be modify.
zhangchao010 [Fri, 18 Oct 2013 08:32:56 +0000 (16:32 +0800)]
Add extend_volume for Huawei drivers
This patch adds extend_volume function for Huawei drivers.
Huawei T driver needs to create a slave LUN for the extended LUN.
And accordingly it needs to delete all these slave LUNs before deleting
the extended LUN.
HVS driver just sends a rest command to finish extending volume.
John Griffith [Wed, 16 Oct 2013 02:51:07 +0000 (20:51 -0600)]
Provide gettext _ in missing locations
A while back a change was merged that moved
our shortcut for gettext out of __init__
(change here: If4125d6bcbde63df95de129ac5c83b4a6d6f130a)
This worked out fine for the most part but broke the sphinx doc
builder for a number of files. This patch just adds the proper
import to each of these files to get the builder working correctly
again.
Avishay Traeger [Wed, 16 Oct 2013 08:14:22 +0000 (11:14 +0300)]
Storwize: Fix iogrp availability check
Do not check if vdisk_count is greater than zero to determine iogrp
availability. This is wrong, and leads to the driver not being able to
use empty iogrps.
Zhongyue Luo [Tue, 13 Aug 2013 03:32:00 +0000 (11:32 +0800)]
Uses oslo.imageutils
Commit 035668 had the QemuImgInfo class moved to Oslo.
This class diverged from Nova and then missed some changes
made in Nova since then. The two projects will be able to use
identical classes by adapting imageutils.
John Griffith [Wed, 16 Oct 2013 01:39:22 +0000 (19:39 -0600)]
Don't zero out thin provisioned LV's on delete
Thin provisioned LV's don't need secure delete to protect
from data leakage. Also, zeroing these out kinda defeats
the purpose of using thing provisioning.
This patch add a check for the lvm type and if it's thin simply
returns from the lvm.clear_volume() method.
John Griffith [Wed, 16 Oct 2013 01:13:45 +0000 (19:13 -0600)]
Fix lvm.extend_volume to pass Gig suffix
The extend function in the lvm driver was not converting
the cinder size value to Gigabytes before passing the call
to the vg module. The result was that we would attempt to
extend a volume to "new size in Megabytes" which of course
is less than the current size since we do a Gigabyte string
conversion on create and everywhere else.
This change makes sure we pass the integer change through
the sizestr method to get the G suffix needed to work properly.
John Griffith [Tue, 15 Oct 2013 19:57:48 +0000 (13:57 -0600)]
FK lookup failures during migration
There are a couple of cases where migrations have failed
upgrading from Grizzly to Havana, this seems to be isolated
to a couple of migrations so far and the error message is a
failure to lookup/associate the volume-id FK dependency.
It appears that this is caused by not setting the charset
in the migration, so the result is that the initial db setup
uses utf8 and the migrations are using the default latin1.
This patch goes through all of the migrations in Havana that
specify InnoDB and explicitly sets the charset to utf8 to match
the volumes table (and the other original tables).
zhangchao010 [Mon, 14 Oct 2013 04:47:44 +0000 (12:47 +0800)]
Fix Huawei drivers to support other host OSs
Huawei drivers create Linux hosts by default when attaching volumes.
This patch makes them also support Windows, XenServer, AIX, etc.
The default OS is still Linux if it is not specified.
Users need to configure the host OS types in Huawei XML configuration
file. They need to set the items like this:
<Host OSType="Windows" HostIP="10.10.0.1, 10.10.0.2, ..." />
<Host .../>
When attaching a volume, the driver will get the host IP from nova. We
compare that IP with the IP in "HostIP" to get the corresponding OS type.
VMware: Fixed upload-to-image for available volume
Cinder generally does not allow upload-to-image operation on a volume
that is 'in-use'. This can however be over-ridden using the '--force True'
flag. The VMware driver cannot support upload-to-image when the volume is
in-use. This is a restriction for the VMware driver alone. When the user forces
an upload on a volume that is 'in-use' the Cinder api layer sets the volume
status to 'uploading' and calls into the driver code to upload. In this
scenario the VMware driver needs to fail the operation.
The current driver code here does this check wrongly by looking for volume
status of 'in-use'. Fixing this check to identify an in-use volume correctly.
Giulio Fidente [Thu, 10 Oct 2013 12:59:44 +0000 (14:59 +0200)]
improves lvm version parsing for customised builds
supports_thin_provisioning now uses a regexp to ensure parsing of
lvm version succeeds when the build is customised; also adds a test
for a customised string parsing
Alan Jiang [Thu, 3 Oct 2013 22:03:09 +0000 (17:03 -0500)]
long flashcopy operation may block volume service
Storwize family uses flashcopy for snapshot or volume clone. The
volume delete has to wait until flashcopy finishes or errors out.
The _delete_vdisk() will poll volume FlashCopy status in a loop.
This may block volume serivce heartheat since it is in the same
. The solution is to use openstack FixedIntervalLoopingCall
to run the FlashCopy status poll in a timer thread.
The cinder volume mananger will resume delete operation for those
volumes that are in the deleting state during volume service startup.
Since Storwize volume delete may wait for a long time, this can cause
volume service to have long delay before it becomes available.
A greenpool is used to offload those volume delete operations.
zhangchao010 [Wed, 9 Oct 2013 07:37:49 +0000 (15:37 +0800)]
Support Huawei driver upgrade from grizzly to havana
To make the driver upgrade from grizzly to higher versions, the patch
checks the old host name firstly when creating and deleting host in
Huawei storage system.
If the old host name exists:
*get and use it directly when adding host.
*delete it directly when deleting host.
The current implementation perform snapshot of attached volume.
This is invalid because when we take snapshot of the backing, the instance
continues pointing to the readonly delta and tries writing to it.
This patch will disallow snapshot creation of attached volume.
We have similar issue with delete of snapshot, when deleted the instance will
point to an invalid disk file, since that will get merged with its parent.
Hence any writes by the instance will fail with disk not found error.
This patch will ignore delete snapshot of attached volume.
Since we disallow snapshot of attached volume, we disallow linked clone of
attached source volume and also upload of attached volume.
Zhongyue Luo [Tue, 3 Sep 2013 05:07:21 +0000 (13:07 +0800)]
Clean up comparison assertions
Using assertTrue and the comparison operators to test
if an element is greater, equal, or less is too python2.4.
Our unit testing framework 'testtools' supports
- assertEqual
- and testtools Matcher classes
which were created for these types of tests.
Re-implemented assertGreater and assertGreaterEqual
with compatibility for python < 2.7.
Zhongyue Luo [Wed, 9 Oct 2013 01:54:30 +0000 (09:54 +0800)]
Utilizes assertIsNone and assertIsNotNone
Using assertEqual/assertNotEqual to test if an element
is or is not None is too python2.4.
Our unit testing framework supports assertIsNone and assertIsNotNone
which were created for these types of tests.
KIYOHIRO ADACHI [Tue, 8 Oct 2013 07:28:25 +0000 (16:28 +0900)]
remove unused methods in driver.Scheduler
cinder.scheduler.host_manager.HostManager doesn't have get_host_list()
and get_service_capabilities(). But we don't catch the AttributeError
by them. Therefore, get_host_list() and get_service_capabilities() in
cinder.scheduler.driver.Scheduler have not been used.
Also, get_host_list() and get_service_capabilities() in
cinder.scheduler.manager.SchedulerManager have not been used.
Dan Prince [Mon, 7 Oct 2013 18:09:34 +0000 (14:09 -0400)]
Ignore H803 from Hacking.
H803 checks for a period in commit messages, something the community
clearly rejected as a sensible check: periods in commit messages
should neither be rejected or required.
Dan Prince [Mon, 7 Oct 2013 16:41:28 +0000 (12:41 -0400)]
Drop conf_key_mgr warning message!
By default ConfKeyManager logs tons of WARNING message stating
that it isn't production ready...
Given that it is currently the only Cinder key manager option
which can be used/selected I don't think repeatedly logging
warnings is helpful. Lets just drop the warning message
for now and when a good "production ready" cinder key manager
implementation is implemented perhaps we can re-add a warning to
this class (hopefully making the production ready impl the default).
Ollie Leahy [Fri, 4 Oct 2013 14:56:26 +0000 (14:56 +0000)]
Provide user with more information on quota fail
Provide the user with useful information when a snapshot or volume
create fails because it would cause the user to exceed available quota.
Specifically report the user's current gigabyte usage and quota
allocations.
John Griffith [Thu, 3 Oct 2013 21:54:20 +0000 (15:54 -0600)]
Fix broken solidfire create-snapshot
A previous change to enable secifying size for cloned volumes
created introduced a bug that breaks the ability to create-snapshots
when using the SolidFire driver
(CID: I5628c7fa922780d6b0601e2daa79310a61085edc).
The problem is that we use a shared method in the SF driver for both
create-clone and create-snapshot, the added change only considers the
clone case and does a get ref['size'] but in the case of snapshots
this needs to be ref['volume_size'].