John Griffith [Fri, 20 Sep 2013 20:55:46 +0000 (20:55 +0000)]
Fix issues with failed lvremove
There are some race conditions that
can cause problems with lvremove commands. In
most cases these seem to recover nicely just
with a simple retry of the lvremove. Adding
a udev settle seems to elimate the rest of them.
This is a difficult issue to reproduce, and there's
a suspiscion that it relates to failed target
creeates.
The patch adds a catch on the lvremove failure,
followed by a udevadm settle and a retry of the
lvremove. With the setup that I've been able
to reproduce this issue these changes have eliminated
any force delete failures.
The other option that had been proposed was using dmsetup remove
but there are concerns that this may cause problems.
Change-Id: I2a2b0d0f4fefd0daf9424ab96aaf87ba53ebc171
Closes-Bug: #
1191960
Jenkins [Fri, 20 Sep 2013 18:13:09 +0000 (18:13 +0000)]
Merge "Enforce driver is initialized"
Walter A. Boring IV [Tue, 17 Sep 2013 00:05:27 +0000 (17:05 -0700)]
Enforce driver is initialized
This updates the volume manager and the
backup manager to enforce that the driver
has been initialized.
The managers call the driver in many places
without ensuring that the driver has been
properly initialized. When the driver fails
inside of do_setup(), the managers shouldn't
call the driver's set_initialized() method.
The managers now dump out the exception, and
exit the init_host, leaving the driver in
an uninitialized state.
Fixes bug #
1225897
Change-Id: I77b947f2a9fbe1b38f321511dba10fcd2fe1fe90
saurabh [Thu, 19 Sep 2013 18:07:35 +0000 (23:37 +0530)]
Added mapper for snapshot_metadata
cinder/api/v2/snapshot_metadata.py exist with all actions
but mapper missing for it.
Closes-bug:
1227799
Change-Id: I9a95c68a8de620626042951fa15a555621ebbc17
Jenkins [Fri, 20 Sep 2013 00:50:13 +0000 (00:50 +0000)]
Merge "NetApp fix create vol different size than snapshot"
Jenkins [Thu, 19 Sep 2013 23:36:03 +0000 (23:36 +0000)]
Merge "Add logging to prior to raising exceptions"
Walter A. Boring IV [Mon, 16 Sep 2013 22:31:20 +0000 (15:31 -0700)]
Add logging to prior to raising exceptions
This patch fixes an issue where exceptions
happen in the 3PAR drivers and the exceptions
aren't being logged to the log file.
Fixes bug #
1225235
Change-Id: I8ec26fe3bee65106e01e956472e06acf1d5b9f77
Jenkins [Thu, 19 Sep 2013 16:43:06 +0000 (16:43 +0000)]
Merge "Pass down root_helper in more cases"
Jenkins [Thu, 19 Sep 2013 15:18:02 +0000 (15:18 +0000)]
Merge "VMware driver: Fix for invalid datastore selection"
Jenkins [Thu, 19 Sep 2013 15:17:38 +0000 (15:17 +0000)]
Merge "remove VolumeNotFoundForInstance class"
Jenkins [Thu, 19 Sep 2013 15:12:47 +0000 (15:12 +0000)]
Merge "Sync gettextutils from oslo"
KIYOHIRO ADACHI [Thu, 19 Sep 2013 05:37:33 +0000 (14:37 +0900)]
remove VolumeNotFoundForInstance class
VolumeNotFoundForInstance class is used only in test_xiv_ds8k.py. I
think the exception class that is used only in test code should not be
defined in cinder/exception.py.
Change-Id: I53512d9b06d48e1fb98ef63eac82c033cec37471
Closes-Bug: #
1227477
Jenkins [Wed, 18 Sep 2013 22:35:07 +0000 (22:35 +0000)]
Merge "Fix __init__ methods of brick initiator connectors"
Luis A. Garcia [Fri, 6 Sep 2013 21:24:33 +0000 (21:24 +0000)]
Sync gettextutils from oslo
Some Messages, such as those created from Invalid exceptions, use a
Message within a Message, and we were only translating the base Message
but not the Message substitution within.
Also adds test case for cinder case.
Fixes bug: #
1221808
Change-Id: Ic3119df23a090cfaa160c1461e955f0af55fe1cf
Jenkins [Wed, 18 Sep 2013 21:43:37 +0000 (21:43 +0000)]
Merge "Fix huawei driver test issues"
Jenkins [Wed, 18 Sep 2013 21:42:12 +0000 (21:42 +0000)]
Merge "fix wrong desciption of monkey_patch config"
Jenkins [Wed, 18 Sep 2013 21:42:05 +0000 (21:42 +0000)]
Merge "Fixes call VolumeNotFound in the invalid argument"
Jenkins [Wed, 18 Sep 2013 21:38:15 +0000 (21:38 +0000)]
Merge "assertEquals is deprecated, use assertEqual"
Jenkins [Wed, 18 Sep 2013 21:37:27 +0000 (21:37 +0000)]
Merge "Use built-in print() instead of print statement"
Chang Bo Guo [Wed, 18 Sep 2013 07:00:17 +0000 (00:00 -0700)]
Use built-in print() instead of print statement
In python 3 print statement is not supported, so we should use
only print() functions.
Fixes bug
1226943
Change-Id: I7b2e4d52fe9050f6a67c44e4cc1237a15ea90b23
Jenkins [Wed, 18 Sep 2013 13:14:15 +0000 (13:14 +0000)]
Merge "Fixes call GlanceConnectionFailed in invalid ARG"
Jenkins [Wed, 18 Sep 2013 12:08:17 +0000 (12:08 +0000)]
Merge "Allow display_name for v2 snapshot-update"
KIYOHIRO ADACHI [Wed, 18 Sep 2013 06:59:28 +0000 (15:59 +0900)]
Fixes call GlanceConnectionFailed in invalid ARG
A mapping key of 'netloc' is always ignored. Thus information in
'netloc' is lost. But because it is included in 'error_msg', I remove
'netloc=netloc'.
Change-Id: I937044bcca0cb196fcd96cfa421de777713d76f5
Closes-Bug: #
1226959
KIYOHIRO ADACHI [Tue, 17 Sep 2013 07:08:55 +0000 (16:08 +0900)]
Fixes call VolumeNotFound in the invalid argument
A mapping key of 'volume_id' is ignored when we use the non keyword
argument. Thus information in 'volume_id' is lost. Similarly, in the
case of exception.SnapshotNotFound, information in 'snapshot_id' is
lost.
Change-Id: I1a704cc1866ad9b0d9578e16e77c376a77ea5b3e
Closes-Bug: #
1226442
Jenkins [Wed, 18 Sep 2013 05:17:47 +0000 (05:17 +0000)]
Merge "Fix secure delete for thick LVM snapshots"
Victor Rodionov [Tue, 17 Sep 2013 21:22:05 +0000 (01:22 +0400)]
Fix __init__ methods of brick initiator connectors
Wrong order of positional arguments in RemoteFsConnector __init__ call.
This only in RemoteFsConnector.__init__, but I decide also update
__init__ methods of other connectors to avoid errors in future.
Change-Id: I75d2c2d29e0330536e280614db1a13686cfd15e4
Closes-Bug: #
1226830
rackerjoe [Wed, 4 Sep 2013 20:31:42 +0000 (15:31 -0500)]
Fix secure delete for thick LVM snapshots
This change modifies the behaviour of the secure delete for thick
LVM snapshots to wipe the underlying COW of the snapshot LV
instead of the snapshot LV itself.
This change is necessary because the snapshot LV does not contain
exactly the same number of writable blocks as the original LV. The
COW includes header information per COW block that identifies the
device as a COW device as well as the source and destination blocks
for the changed item. The amount of metadata contained in the COW is
variable based on I/O performed on the snapshot.
This does not change the behavior of secure deletes on thin LVs
or secure deletes on the thick LV snapshot origin.
Closes-Bug: #
1191812
Change-Id: I20e02b6c20d5ac539b5b5469e665fc986180f2e9
Dirk Mueller [Tue, 17 Sep 2013 19:26:35 +0000 (21:26 +0200)]
assertEquals is deprecated, use assertEqual
Change-Id: I805ff6a68925f9214645c192eb986a70f30bf714
zhangchao010 [Tue, 17 Sep 2013 15:53:24 +0000 (23:53 +0800)]
Fix huawei driver test issues
Replace "params[params.index('-lun')]" with
"params[params.index('-lun') + 1]" to get lun ID correctly.
Replace the invalid controller ID "N" with "B".
Dict CLONED_LUN_INFO has no key provider_location, delete it.
Moreover, simplify the "if..., elif..." module with "getattr"
method in fake recv function.
fixes bug
1225884
Change-Id: Ic4cbf8b07321cdecd6290e8cd90bca1b09dca7fd
Jenkins [Tue, 17 Sep 2013 15:16:02 +0000 (15:16 +0000)]
Merge "Set rootwrap_config path to rootwrap.conf"
Kun Huang [Tue, 17 Sep 2013 05:11:30 +0000 (13:11 +0800)]
fix wrong desciption of monkey_patch config
The corrent desciption should be 'Enable monkey patching'
Change-Id: I1ef14be75c1e46fa703bc8da1a68487e16ebd035
Closes-Bug: #
1226190
Ken'ichi Ohmichi [Tue, 17 Sep 2013 04:29:51 +0000 (13:29 +0900)]
Allow display_name for v2 snapshot-update
According to the comment in the source code, the snapshot-update of
v2 would be able to allow either "name" or "display_name" parameter.
And if both paramters are specified, "name" parameter is effective
over "display_name" like "description" parameter.
However "display_name" parameter is ignored now, because cinder writes
over empty dict(update_dict['display_name']).
This patch fixes the problem.
Fixes bug #
1226398
Change-Id: Icd48556a26b9346f73b7c1b82ffbcdd469c4d28d
Jenkins [Mon, 16 Sep 2013 20:47:21 +0000 (20:47 +0000)]
Merge "Fixes ceph volume restore to larger image than source"
Dirk Mueller [Mon, 16 Sep 2013 11:39:20 +0000 (13:39 +0200)]
Pass down root_helper in more cases
Change-Id: I3e49764256bb001ccc071c846cd70e4345df017d
Fixes: Bug LP #1226010
Jay S. Bryant [Mon, 16 Sep 2013 18:21:34 +0000 (13:21 -0500)]
Set rootwrap_config path to rootwrap.conf
Other components set
rootwrap_config = /etc/<component>/rootwrap.conf by default.
This commit brings cinder up-to-date with what other
components are doing by setting
rootwrap_config = /etc/cinder/rootwrap.conf by default.
A couple of test cases needed to be updated to handle the change
from 'None'.
Not counting this as a documentation impact as the documentation I
can find already lists /etc/cinder/rootwrap.conf as the default.
Closes-Bug
1226074
Change-Id: I68dd5fea1895a6365d6c69db0535d081c4a3460e
Eric Harney [Sat, 7 Sep 2013 03:26:46 +0000 (23:26 -0400)]
Do not use qemu-img --backing-chain or --output=json
Initial code for GlusterFS snapshot support in Havana
used qemu-img arguments which are too new to run in many
environments. Run qemu-img using only arguments which
will exist on older platforms.
Partial-Bug: #
1224030
Change-Id: I5155dac492da67a951ede978c2c46a54c239eb04
Kartik Bommepally [Tue, 3 Sep 2013 12:12:33 +0000 (05:12 -0700)]
VMware driver: Fix for invalid datastore selection
Added filter to ignore datastores that are not mounted, in-accessible
and read-only for volume creation. Without this VMware's VC/ESX driver can
choose such datastore with higher invalid capacity value as returned by the
server for volume creation.
Also using parent's self.mox object in the test cases rather than creating
a new mox.Mox obj everytime.
Fixes bug:
1220217
Change-Id: If8319562ddc11fc31eb928b3807aead2b11b94bc
Edward Hope-Morley [Fri, 13 Sep 2013 19:20:03 +0000 (15:20 -0400)]
Fixes ceph volume restore to larger image than source
If a backup is restored to a volume that is bigger than the
backup itself, which could be the case if --volume-id is
supplied, we need the option to set extraneous extents to zero
i.e. set extents after those from the backup to zero.
Change-Id: I3c226b9e7429371f6cd9b9bd81071ff765712975
Fixes: bug 1225126
OpenStack Jenkins [Mon, 16 Sep 2013 03:14:25 +0000 (03:14 +0000)]
Merge "Imported Translations from Transifex"
Jenkins [Mon, 16 Sep 2013 02:18:02 +0000 (02:18 +0000)]
Merge "Use $state_path/conversion for image_conversion_dir default"
OpenStack Jenkins [Sun, 15 Sep 2013 06:07:22 +0000 (06:07 +0000)]
Imported Translations from Transifex
Change-Id: Ibfc1ad7197f940208688d234d859da76344aeaba
Jenkins [Fri, 13 Sep 2013 23:31:07 +0000 (23:31 +0000)]
Merge "nms.folder.create_with_opts not supported on Nexenta 3.1.4.2"
Jenkins [Fri, 13 Sep 2013 19:26:17 +0000 (19:26 +0000)]
Merge "Improves the parsing way of ssh returns"
Jenkins [Fri, 13 Sep 2013 18:49:01 +0000 (18:49 +0000)]
Merge "Fix client connection leaks in HP3PAR drivers"
Victor Rodionov [Fri, 13 Sep 2013 16:51:14 +0000 (20:51 +0400)]
nms.folder.create_with_opts not supported on Nexenta 3.1.4.2
nms.folder.create_with_opts method not supported on early NexentaStor
version (3.1.4.2). replace if with create_with_props.
Closes-Bug: #
1225094
Change-Id: I0c861ae8d966d53c6484e7ded8cab71f395fa059
Jenkins [Fri, 13 Sep 2013 16:10:15 +0000 (16:10 +0000)]
Merge "Fixes the use of exception.InvalidInput with the wrong arguments"
Eric Harney [Fri, 13 Sep 2013 13:43:33 +0000 (09:43 -0400)]
Use $state_path/conversion for image_conversion_dir default
image_conversion_dir currently defaults to /tmp. Using
$state_path/conversion seems to be a more appropriate default.
Closes-Bug: #
1217552
Change-Id: Iaaa462449a257b1b48fc349399bf409d7301a1e6
zhangchao010 [Thu, 12 Sep 2013 14:34:22 +0000 (22:34 +0800)]
Improves the parsing way of ssh returns
Huawei driver failed to parse ssh result when firstly logging
in storage system on paramiko 1.8.0. The update of paramiko
make the order of ssh returns changed. This patch improves
the parsing way of ssh returns.
This patch also does some changes for log punctuations.
fixes bug
1224499
Change-Id: Ia8761081dff998884f45312355b62aa27ab5417c
Jenkins [Fri, 13 Sep 2013 14:37:06 +0000 (14:37 +0000)]
Merge "Add default_availability_zone configuration option to cinder"
Jenkins [Fri, 13 Sep 2013 06:14:49 +0000 (06:14 +0000)]
Merge "Fixing UnicodeEncodeError against volume creating function"
Jenkins [Fri, 13 Sep 2013 06:14:42 +0000 (06:14 +0000)]
Merge "Turn db model object into a primitive object to avoid error"
KIYOHIRO ADACHI [Fri, 13 Sep 2013 05:13:53 +0000 (14:13 +0900)]
Fixes the use of exception.InvalidInput with the wrong arguments
A mapping key of 'message' in exception.InvalidInput is 'reason'.
cinder/volume/drivers/netapp/iscsi.py and
cinder/volume/drivers/netapp/utils.py had used 'data'.
Change-Id: Ie40fc2f954984350827414edee9226adc80c8033
Closes-Bug: #
1224790
KIYOHIRO ADACHI [Fri, 13 Sep 2013 02:57:39 +0000 (11:57 +0900)]
Remove unused exceptions
Removed the exception classes in the following because not referenced
anywhere.
InvalidSourceVolume
InvalidRequest
PersistentVolumeFileNotFound
InvalidSnapshotMetadata
InvalidSnapshotMetadataSize
DiskNotFound
MigrationNotFoundByStatus
ClassNotFound
NotAllowed
KeyPairExists
MigrationError
VolumeSizeExceedsQuota
Duplicate3PARHost
BackupVolumeInvalidType
Change-Id: I7165f970752587885430f9d5c813b82b3f06ad70
OpenStack Jenkins [Thu, 12 Sep 2013 22:04:32 +0000 (22:04 +0000)]
Merge "Imported Translations from Transifex"
Jim Branen [Thu, 12 Sep 2013 16:24:56 +0000 (09:24 -0700)]
Fix client connection leaks in HP3PAR drivers
In the presence of exceptions, hp3parclient connections
did not get closed. This fix adds try/finally blocks
around all client login/logout calls.
Change-Id: I105b06cea5e61f3e9cf0d6e19c7ce430fedad715
Closes-Bug:
1220948
Michael Kerrin [Mon, 9 Sep 2013 08:12:27 +0000 (08:12 +0000)]
Add default_availability_zone configuration option to cinder
This option is used to specify the default AZ for the whole service. So when
creating a new volume this value is used to specify the AZ of a volume.
Previously we were overloading the use of the storage_availability_zone option
which is also used to specify what AZ a service belongs to. We still fail back
on the storage_availability_zone when creating a new volume if the
default_availability_zone is not set.
Fixes bug:
1221260
Change-Id: Iec381f50c9aeb4a0abbcaa1d7b0107de09a73544
Jenkins [Thu, 12 Sep 2013 06:56:55 +0000 (06:56 +0000)]
Merge "Catch generic exceptions"
OpenStack Jenkins [Thu, 12 Sep 2013 06:07:15 +0000 (06:07 +0000)]
Imported Translations from Transifex
Change-Id: I59fa38bd6d5ae872c05af5935e919351c83ffe41
Zhi Yan Liu [Tue, 3 Sep 2013 14:40:49 +0000 (22:40 +0800)]
Turn db model object into a primitive object to avoid error
In volume API controller we need turn db model object into a primitive
object to avoid error when it adding visible administrator metadata to
volume's metadata dict.
Fixes bug:
1220232
Change-Id: I5f6c4fc8dd6ca3af02db577b37dcaeee92bb42e5
Signed-off-by: Zhi Yan Liu <zhiyanl@cn.ibm.com>
Joshua Harlow [Thu, 12 Sep 2013 02:36:18 +0000 (19:36 -0700)]
Catch generic exceptions
When the driver copy_image_to_volume fails it can
at the current time raise more than just CinderException
as its root exception type. This causes rescheduling due
to the blacklisted exception list that is used to determine
if a exception is 'bad enough' to trigger rescheduling or
should the volume creation action just set the volume to
error state.
To avoid the situation where this would cause a rescheduling
we should make sure (for now) that any exception that is
emitted on copying an image to a volume is translated
into a image copy failure and reraised.
Fixes: bug 1224211
Change-Id: Ia4a0a81d9e0967b1e7de07577d77084462304c60
Jenkins [Thu, 12 Sep 2013 00:12:19 +0000 (00:12 +0000)]
Merge "Fix typo in cinder.tests.test_create_volume_flow"
Jenkins [Wed, 11 Sep 2013 16:49:25 +0000 (16:49 +0000)]
Merge "Fix deleting qos specs key"
Jenkins [Wed, 11 Sep 2013 15:50:47 +0000 (15:50 +0000)]
Merge "Adds Dell EqualLogic volume driver for Cinder"
Jenkins [Wed, 11 Sep 2013 14:24:07 +0000 (14:24 +0000)]
Merge "Move novaclient to requirements.txt"
Jenkins [Wed, 11 Sep 2013 14:24:04 +0000 (14:24 +0000)]
Merge "fix missing unit in log message"
Alexander Gordeev [Fri, 31 May 2013 09:22:38 +0000 (13:22 +0400)]
Adds Dell EqualLogic volume driver for Cinder
Change-Id: I9668c99de5e14b6a94a52f3ef0cbb8a8d7e18b85
Implements: blueprint eql-volume-driver
Jenkins [Wed, 11 Sep 2013 12:29:39 +0000 (12:29 +0000)]
Merge "Fixed erroneous force full copy in ceph backup driver"
Jenkins [Wed, 11 Sep 2013 11:16:30 +0000 (11:16 +0000)]
Merge "NetApp NFS efficient clone_image impl"
Xiao Chen [Wed, 11 Sep 2013 06:37:16 +0000 (14:37 +0800)]
Fixing UnicodeEncodeError against volume creating function
When creating a volume with non-English characters and there is
not enough space for it, then an UnicodeEncodeError occurs. So
we need convert any coded exception message to unicode string
for logging.
Fixes bug
1223128
Change-Id: If1d4faad2bcde696f20565deb01226de33caccad
Zhiteng Huang [Tue, 10 Sep 2013 08:39:52 +0000 (16:39 +0800)]
Fix deleting qos specs key
Previously deleting a key in certain qos specs was accomplished via
'update' API. Unfortunately, 'update' isn't able to tell the
difference between setting a key with no value and deleting a key (and
its value).
This change adds an new API 'delete_keys' to qos_specs API extension.
'delete_keys' API allows client to specify a list of to-be-deleted keys
in one single request (batch mode!), which can be handy when removing
multiple keys in a qos specs.
Example URL and request body for 'delete_keys' API:
PUT to http://127.0.0.1:8776/v2/qos-specs/QOS_SPECS_UUID/delete_keys
with body: {'keys': ['foo', 'bar', 'zoo']}
Above example request will result in 'foo', 'bar', 'zoo' key/value
pairs of QOS_SPECS_UUID be marked as deleted in DB. If QOS_SPECS_UUID
doesn't exist, a 404 error will return; if any key in 'foo', 'bar',
'zoo' couldn't be found in QOS_SPECS_UUID, a 400 error will return with
error message telling which key couldn't be found. Note that Cinder
will puke 400 and stop trying the rest once it encounters a
non-existing (or deleted) key amoung the given list of keys.
This change also fixes 'list'/'show' API includes deleted keys in
result.
Fix bug: #
1223660
Fix bug: #
1223677
Change-Id: Ia3cb07e204d655a9b837b317ce7117feb3c86a2d
Eric Harney [Wed, 11 Sep 2013 02:44:08 +0000 (22:44 -0400)]
Move novaclient to requirements.txt
novaclient is a runtime requirement in Havana both for volume
migration and qemu-assisted-snapshots.
Closes-Bug: #
1223484
Change-Id: Ie7e8be2d0edf00cdb04f980a6aa247e04807bf67
Kun Huang [Tue, 10 Sep 2013 15:34:26 +0000 (23:34 +0800)]
fix missing unit in log message
Bad log message:
"extend volume 1 to 2"
Correct one:
"extend volume 1 GB to 2 GB"
(also update my profile in .mailmap)
Change-Id: I6d229c4440f2f5443b45a10f3912c20e21c63f32
Jenkins [Tue, 10 Sep 2013 22:33:47 +0000 (22:33 +0000)]
Merge "Add check for qemu-img to image_utils fetch_to_raw"
Jenkins [Tue, 10 Sep 2013 19:23:14 +0000 (19:23 +0000)]
Merge "Fix bug in Nexenta NFS driver _do_create_volume"
Jay S. Bryant [Mon, 12 Aug 2013 17:55:48 +0000 (12:55 -0500)]
Add check for qemu-img to image_utils fetch_to_raw
Some platforms, particularly PowerPC systems running RHEL,
do not have qemu-img installed by default and do not
support image formats other than RAW. For these systems,
functions/drivers that use fetch_to_raw() currently fail
because it is assumed that qemu-img will always be installed.
This change updates fetch_to_raw() to function more like the
upload_volume() function which checks the image format and skips
any conversion if the image is already in the RAW format. To
minimize the impact upon platforms that have qemu-img installed
this is being implemented by checking to see if qemu-img is
installed. If it is installed, no changes are made to the flow
through fetch_to_raw. If qemu-img is not available and the image
format is not already RAW, an exception is thrown. Otherwise,
the image is downloaded and we do not progress to the portions of
fetch_to_raw that require qemu-img to be installed.
This commit also updates the test cases that touch this code.
Closes-bug:
1200800
Change-Id: I34540dfa238a8b8e61ff5c30c7e121130bad39b4
Edward Hope-Morley [Fri, 6 Sep 2013 19:40:38 +0000 (20:40 +0100)]
Fixed erroneous force full copy in ceph backup driver
The following steps should not result in a forced full copy:
1. create vol
2. create backup (works fine i.e. uses incremental diff)
3. delete backup
4. create new backup (full copy forced because volume backup-snap exists and is not ignored)
This patch resolves the above problem.
Change-Id: I61c245219f54f7ee942e06e343c5d79d4cab947b
Fixes: bug #1221836
Jenkins [Tue, 10 Sep 2013 12:01:56 +0000 (12:01 +0000)]
Merge "Call to_primitive on volumes.rpcapi.create_volume"
Flaper Fesp [Wed, 4 Sep 2013 11:29:22 +0000 (13:29 +0200)]
Call to_primitive on volumes.rpcapi.create_volume
cinder.volume.rpcapi.create_volume does not convert the request_spec to
primitive before casting the request. This makes requests containing non
primitive types to fail. For example:
cinder create --metadata=Type=test --source-volid $VOLID 1
This will create a new database record and call create_volume on
volume.rpcapi. This will fail because VolumeMetadata won't be
serialized correctly when calling cast. This, however, is not True when
--source-volid is not passed because in such case,
scheduler.rpcpai.create_volume will be called, which converts
request_spec to primitive correctly.
Closes-Bug: #
1213964
Change-Id: I096d815254c9782390fba05ea9cd9af925635402
Zhongyue Luo [Mon, 9 Sep 2013 14:18:33 +0000 (22:18 +0800)]
Fix typo in cinder.tests.test_create_volume_flow
Mock is 3rd party so should be placed after 'time' package.
Changed sheduler -> scheduler
Change-Id: I9c8ef7980c0444a725232d03c29b39d4805586ff
Jenkins [Tue, 10 Sep 2013 06:17:06 +0000 (06:17 +0000)]
Merge "Fix Qos Specs association corner case"
Jenkins [Tue, 10 Sep 2013 05:43:08 +0000 (05:43 +0000)]
Merge "fix log string in conversion type"
Zhiteng Huang [Mon, 9 Sep 2013 06:53:37 +0000 (14:53 +0800)]
Fix Qos Specs association corner case
Fix a corner case in associating QoS Specs with Volumt types that was
not handled well: Raise HTTPBadRequest() to client if associate volume
type, which is already associated one qos specs other than specified
qos specs. Previously such operation will proceed without error which
results overwriting original association.
Also refactor DB API volume_type_qos_specs_get() to return qos specs
in consistent dict format as other qos specs related APIs.
Fix bug: #
1222692
Change-Id: I9db66d1e3a7469620ba542f5387422685a2d828f
Walter A. Boring IV [Mon, 9 Sep 2013 21:43:59 +0000 (14:43 -0700)]
Fixes pep8 violation in nova
This patch fixes a simple pep8 violation
that nova complains about.
Fixes Bug #
1223046
Change-Id: I6f06939e3729b64fcefc5cdb20da05e7d3172be5
Victor Rodionov [Fri, 6 Sep 2013 22:18:48 +0000 (02:18 +0400)]
Fix bug in Nexenta NFS driver _do_create_volume
Fix bug in _do_create_volume method of Nexenta NFS volume driver.
NMS call nms.folder.create doesn't support third argument, that is why
this call changed to nms.folder.create_with_opts.
Closes-Bug: #
1221946
Change-Id: I712ee2919f1bd117e7a1691979639689d95adc92
Jenkins [Mon, 9 Sep 2013 16:22:03 +0000 (16:22 +0000)]
Merge "Restrict Volume type deletion with volumes assoc"
Jenkins [Mon, 9 Sep 2013 12:55:53 +0000 (12:55 +0000)]
Merge "Replace assertEquals with assertEqual - 2/2"
Jenkins [Mon, 9 Sep 2013 09:13:05 +0000 (09:13 +0000)]
Merge "Send notifications when extending volume"
Jenkins [Mon, 9 Sep 2013 09:03:09 +0000 (09:03 +0000)]
Merge "Check cinder-backup service before "backing-up""
Jenkins [Mon, 9 Sep 2013 09:02:28 +0000 (09:02 +0000)]
Merge "Do not attempt vg.update on uninitialized vg"
Jenkins [Mon, 9 Sep 2013 09:02:26 +0000 (09:02 +0000)]
Merge "Replace assertEquals with assertEqual - 1/2"
Swapnil Kulkarni [Mon, 2 Sep 2013 16:36:02 +0000 (22:06 +0530)]
Restrict Volume type deletion with volumes assoc
Updated volume_type_destroy method to throw exception
for volume type delete with associated volumes.
Updated volume_type unit tests
Closes-Bug: #
1215329
tag:doc-impact
Change-Id: I7a5d4b473588757d21b461337df493e8046e1d09
Zhongyue Luo [Fri, 16 Aug 2013 01:55:54 +0000 (09:55 +0800)]
Replace assertEquals with assertEqual - 2/2
The method assertEquals has been deprecated since python 2.7.
http://docs.python.org/2/library/unittest.html#deprecated-aliases
Also in Python 3, a deprecated warning is raised when using assertEquals
therefore we should use assertEqual instead.
This patch replaces the remaining assertEquals to assertEqual
Change-Id: I4e726ce414382e0d5bf982fad20363d61e00967a
Ken'ichi Ohmichi [Thu, 5 Sep 2013 04:12:38 +0000 (13:12 +0900)]
Check cinder-backup service before "backing-up"
If cinder-backup service is not enabled, "cinder backup-create"
command fails like the following. As the result, the volume status
has been changed to "backing-up" in spite of not backing-up.
$ cinder backup-create
f48aa6ae-4c35-4a6a-a393-
5a5cf610945a
ERROR: Service cinder-backup could not be found.
$ cinder list
+--+------------+--------------+------+-------------+----------+-------------+
|ID| Status | Display Name | Size | Volume Type | Bootable | Attached to |
+--+------------+--------------+------+-------------+----------+-------------+
|..| backing-up | vol-test | 1 | None | False | |
+--+------------+--------------+------+-------------+----------+-------------+
$
To avoid this situation, this patch moves the cinder-backup check
before changing a volume status to "backing-up".
Fixes bug #
1221012
Change-Id: I42ad41e1cfb6fdb7feebe39a9a5f0356a41d7838
John Griffith [Fri, 6 Sep 2013 19:55:39 +0000 (13:55 -0600)]
Do not attempt vg.update on uninitialized vg
It's possible for the scheduler to send the periodic
stats update request *before* the volume service/driver
has finished initializing, resulting in an exception trace
being logged.
This change adds a check to verify that the vg is actually
initialized (completed check_for_setup_error) and it also
removes all of the duplication of each LVM class driver.
To deal with other drivers that may have similar issues,
add initialized member to base driver, that member is
set False on __init__ and is updated by the manager
after running check_for_setup_error. We also skip
update_stats if initialization isn't set True.
Rather than have a separate copy of update_stats in every
driver, we have one in the base LVM class and we set the two
unique variables as member parameters.
Fixes bug
1221874
Change-Id: I159e98a77782b8b2c85a8dd956b150828358fd25
Zhongyue Luo [Sat, 7 Sep 2013 07:57:20 +0000 (15:57 +0800)]
Replace assertEquals with assertEqual - 1/2
The method assertEquals has been deprecated since python 2.7.
http://docs.python.org/2/library/unittest.html#deprecated-aliases
Also in Python 3, a deprecated warning is raised when using assertEquals
therefore we should use assertEqual instead.
This patch is a mere sed replace of one-liner assertEquals to assertEqual.
grep -lR "assertEquals(" cinder/tests/* | \
xargs sed -ri 's/(\W+self.assertEqual)s(.+)(\)$)/\1\2\3/'
Change-Id: I4feea94d53afa866af9b7e14bd80345fa7276e75
Jenkins [Sun, 8 Sep 2013 13:34:44 +0000 (13:34 +0000)]
Merge "Validate VV Set exists in 3PAR drivers"
Jenkins [Sun, 8 Sep 2013 13:29:26 +0000 (13:29 +0000)]
Merge "Remove unused/redundant methods in cinder/test.py"
Jenkins [Sun, 8 Sep 2013 10:27:56 +0000 (10:27 +0000)]
Merge "Synchronize extend_volume methods in 3PAR drivers"
Bill Owen [Wed, 28 Aug 2013 21:09:49 +0000 (14:09 -0700)]
Add support for LocalConnector type in brick
GPFS and other file based drivers require a LocalConnector to support
volume connection and migration operations.
Modify brick/initiator/connector.py to add LocalConnector class.
Modify test_brick_connector.py to extend test_factory to include LocalConnector
class.
Modify test_gpfs.py to include new migrate_volume test.
Modify test_utils.py to extend test_brick_get_connector to include LocalConnector
class.
Closes-Bug: #
1218052
Change-Id: I259fae339c2df7ae304a91c80c27d135762041f5
Jenkins [Sat, 7 Sep 2013 07:40:52 +0000 (07:40 +0000)]
Merge "Utilize assertIsInstance"