]> review.fuel-infra Code Review - openstack-build/cinder-build.git/log
openstack-build/cinder-build.git
11 years agoMerge "Rename SolidFire driver for consistency"
Jenkins [Wed, 17 Jul 2013 23:23:36 +0000 (23:23 +0000)]
Merge "Rename SolidFire driver for consistency"

11 years agoMerge "Fixes Opt types in cinder/backup/drivers/ceph.py"
Jenkins [Wed, 17 Jul 2013 23:23:29 +0000 (23:23 +0000)]
Merge "Fixes Opt types in cinder/backup/drivers/ceph.py"

11 years agoMerge "Fix extend_volume error handling."
Jenkins [Wed, 17 Jul 2013 22:24:01 +0000 (22:24 +0000)]
Merge "Fix extend_volume error handling."

11 years agoMerge "Fixes race condition in LVMVolumeDriver create_cloned_volume method"
Jenkins [Wed, 17 Jul 2013 18:58:54 +0000 (18:58 +0000)]
Merge "Fixes race condition in LVMVolumeDriver create_cloned_volume method"

11 years agoFix extend_volume error handling.
Avishay Traeger [Wed, 17 Jul 2013 05:17:14 +0000 (08:17 +0300)]
Fix extend_volume error handling.

If the async call to the manager/driver failed, the API still updated
the quota and volume size in the DB. Solution is to move these tasks
down to the manager, where we know if the extend succeeded.

Change-Id: I668fd659830bd6d410be64a1f5116377b08a9e96
Fixes: bug 1201814
11 years agoFixes race condition in LVMVolumeDriver create_cloned_volume method
Rongze Zhu [Wed, 17 Jul 2013 10:15:04 +0000 (18:15 +0800)]
Fixes race condition in LVMVolumeDriver create_cloned_volume method

When we create a clone volume, LVMVolumeDriver will firstly create a temp
snapshot for copying, the temp snapshot name is
"clone-snap-%s" % source_volume['id']. When we create multiple clone volumes
of the same volume simultaneously, which would trigger the race issuse.

I changes the temp snapshot name template to "clone-snap-%s" % volume['id'],
so temp snapshot name will be unique.

Fixes bug #1202139

Change-Id: I3a4f2585ea9e6f70b6f6f9889e900f19559b8176

11 years agoChecks the volume_clear flag and just return if it is none
Rongze Zhu [Wed, 17 Jul 2013 08:34:21 +0000 (16:34 +0800)]
Checks the volume_clear flag and just return if it is none

Refactors the clear_volume method in LVMVolumeDriver, checks the
volume_clear flag firstly and return directly if it is none.

Change-Id: Id2523cfaaf61c7d6dec51c0daf6255d9de5d50f3

11 years agoMerge "Minor reorg for (array resource usage and backend options naming)"
Jenkins [Wed, 17 Jul 2013 06:23:45 +0000 (06:23 +0000)]
Merge "Minor reorg for (array resource usage and backend options naming)"

11 years agoMerge "remove improper assert usage"
Jenkins [Wed, 17 Jul 2013 06:23:14 +0000 (06:23 +0000)]
Merge "remove improper assert usage"

11 years agoMerge "Add tests for cinder/api/urlmap.py"
Jenkins [Wed, 17 Jul 2013 06:00:38 +0000 (06:00 +0000)]
Merge "Add tests for cinder/api/urlmap.py"

11 years agoMerge "Fix error when QuotaUsage.updated_at is NULL"
Jenkins [Wed, 17 Jul 2013 06:00:27 +0000 (06:00 +0000)]
Merge "Fix error when QuotaUsage.updated_at is NULL"

11 years agoMerge "Add te field user_id into the volume detailed information."
Jenkins [Wed, 17 Jul 2013 05:49:54 +0000 (05:49 +0000)]
Merge "Add te field user_id into the volume detailed information."

11 years agoFixes Opt types in cinder/backup/drivers/ceph.py
Zhongyue Luo [Wed, 17 Jul 2013 05:26:23 +0000 (14:26 +0900)]
Fixes Opt types in cinder/backup/drivers/ceph.py

Changed backup_ceph_chunk_size, backup_ceph_stripe_unit and
backup_ceph_stripe_count from StrOpt to IntOpt.

Change-Id: I30a0b4d905b41f00e6450bc5cbfbf0c4d8593ab3

11 years agoMerge "Mark methods used in class only with prefix "_""
Jenkins [Wed, 17 Jul 2013 03:52:29 +0000 (03:52 +0000)]
Merge "Mark methods used in class only with prefix "_""

11 years agoMerge "Add Brick Fibre Channel attach/detach support."
Jenkins [Wed, 17 Jul 2013 03:52:25 +0000 (03:52 +0000)]
Merge "Add Brick Fibre Channel attach/detach support."

11 years agoMerge "Fixes ceph-backup failure if original volume deleted"
Jenkins [Wed, 17 Jul 2013 03:32:10 +0000 (03:32 +0000)]
Merge "Fixes ceph-backup failure if original volume deleted"

11 years agoFix error when QuotaUsage.updated_at is NULL
Haomai Wang [Tue, 16 Jul 2013 13:47:19 +0000 (21:47 +0800)]
Fix error when QuotaUsage.updated_at is NULL

When QuotaUsage.updated_at is None, it will raise non-expected exception.
Just verify it.

Fix bug 1197259

Change-Id: I2b41d025f8cffa6c0b3f0153a5194d5e7b1a05df

11 years agoRename SolidFire driver for consistency
Mathieu Gagné [Wed, 17 Jul 2013 01:03:52 +0000 (21:03 -0400)]
Rename SolidFire driver for consistency

Rename driver to SolidFireDriver for consistency.

Fixes: bug #1136081
Change-Id: I83aef90706474e8a079ab5247b72b33c7a2c8472

11 years agoAdd Brick Fibre Channel attach/detach support.
Walter A. Boring IV [Wed, 10 Jul 2013 22:22:06 +0000 (15:22 -0700)]
Add Brick Fibre Channel attach/detach support.

This patch adds the required code to do
Fibre Channel attach and detaches of volumes.
This code has been pulled over from Nova's
implementation of FC attach/detach.

Also adds a new driver config entry to enable
multipath support for iSCSI and FC attaches
during volume to image and image
to volume transfers.

DocImpact

blueprint cinder-refactor-attach

Change-Id: I436592f958a6c14cd2a0b5d7e53362dd1a7c1a48

11 years agoIncrease timeout period for clone volume.
John Griffith [Wed, 17 Jul 2013 00:27:19 +0000 (18:27 -0600)]
Increase timeout period for clone volume.

Current timeout value for clone volume in the
SolidFire driver is 20 seconds, this is fine
in many cases however there seems to be a
number of customers doing clones of
volumes >= 400G.

A populated 400G volume is taking upwards of
35 seconds to clone in some cases resulting in failure.

There's no reason not to bump this timeout value up
significantly to a worst case scenario (ie multi-terrabyte volume).

Fixes bug: 1202007

Change-Id: I98c399f5d647e14f031018f7fc1cc43bb0d94c84

11 years agoMerge "Adds multiple iSCSI port support to 3PAR"
Jenkins [Wed, 17 Jul 2013 00:13:55 +0000 (00:13 +0000)]
Merge "Adds multiple iSCSI port support to 3PAR"

11 years agoMerge "Be sure to check deleted types on quota update."
Jenkins [Tue, 16 Jul 2013 21:15:44 +0000 (21:15 +0000)]
Merge "Be sure to check deleted types on quota update."

11 years agoMerge "CoraidDriver: Allow volumes in error state to be deleted"
Jenkins [Tue, 16 Jul 2013 19:54:25 +0000 (19:54 +0000)]
Merge "CoraidDriver: Allow volumes in error state to be deleted"

11 years agoBe sure to check deleted types on quota update.
John Griffith [Fri, 12 Jul 2013 23:43:27 +0000 (17:43 -0600)]
Be sure to check deleted types on quota update.

If a volume-type is deleted, and later a volume
that's assigned that type is deleted the quota
update will fail and result in a trace for
VolumeTypeNotFound exception.

The volume is succesfully deleted, however the
quota information for the volume-type let alone
the other quota items for the volume are not
updated.

Fixes bug: 1200709

Change-Id: Idd687514be9d622df84aad54b1b33ddc6615851b

11 years agoCoraidDriver: Allow volumes in error state to be deleted
Jean-Baptiste Ransy [Fri, 12 Jul 2013 13:41:12 +0000 (15:41 +0200)]
CoraidDriver: Allow volumes in error state to be deleted

This fix will allow the delete call to be successfull if volume
doesn't exists on the SAN.

Fixes bug 1195788

Change-Id: I0396f1252c8faafff3e8b4f9a4aeffb930350a8d

11 years agoAdds multiple iSCSI port support to 3PAR
Jim Branen [Wed, 10 Jul 2013 19:34:09 +0000 (12:34 -0700)]
Adds multiple iSCSI port support to 3PAR

Added support to the 3PAR iSCSI OpenStack driver to provide the
ability to select the best fit target iSCSI port from a list of
candidate ports. The first time a volume is attached to a host,
all iSCSI ports configured for driver selection, are examined for
best fit. The port with the least active volumes attached will
then be selected as the path to the 3PAR array. Any subsequent
volume attach, to the same host, will use the established target
port.

DocImpact

Fixes bug #1197036

Change-Id: Icf8c28ea3f201e5e21c9a6ed00a2fbdda445c8b3

11 years agoImplement extend volume functionality in Sheepdog
Haomai Wang [Tue, 16 Jul 2013 09:04:34 +0000 (17:04 +0800)]
Implement extend volume functionality in Sheepdog

This implements the extend volume functionality for Sheepdog driver.

Change-Id: Id7361e9571742bea210f13ced722829f489e7cb0
Implements: blueprint extend-sheepdog-volume

11 years agoMark methods used in class only with prefix "_"
Seif Lotfy [Sun, 14 Jul 2013 23:05:44 +0000 (23:05 +0000)]
Mark methods used in class only with prefix "_"

In the swift driver the three methods prepare_nbackup, backup_chunk
and finalize_backup are used internally in the class only and are
not meant to be used from outside. Thus marked with prefix "_"

Change-Id: Idf3a75f2e799c16b1442a349e0724d3e5af2795a

11 years agoMerge "Add flag argument to 'cinder-manage config list'"
Jenkins [Tue, 16 Jul 2013 08:15:57 +0000 (08:15 +0000)]
Merge "Add flag argument to 'cinder-manage config list'"

11 years agoMerge "Catch additional connect fail cases."
Jenkins [Tue, 16 Jul 2013 06:19:22 +0000 (06:19 +0000)]
Merge "Catch additional connect fail cases."

11 years agoMerge "Implement extend volume functionality in Rbd"
Jenkins [Tue, 16 Jul 2013 04:52:21 +0000 (04:52 +0000)]
Merge "Implement extend volume functionality in Rbd"

11 years agoMerge "Clean up Huawei tmp files from tests."
Jenkins [Tue, 16 Jul 2013 04:45:23 +0000 (04:45 +0000)]
Merge "Clean up Huawei tmp files from tests."

11 years agoAdd te field user_id into the volume detailed information.
Vincent Hou [Tue, 16 Jul 2013 03:12:32 +0000 (23:12 -0400)]
Add te field user_id into the volume detailed information.

Fixed Bug 1200555.

Change-Id: Ibc36453caa174432b69597b1b2a0b314a7730357

11 years agoMerge "Imported Translations from Transifex"
OpenStack Jenkins [Tue, 16 Jul 2013 02:24:29 +0000 (02:24 +0000)]
Merge "Imported Translations from Transifex"

11 years agoCatch additional connect fail cases.
John Griffith [Mon, 15 Jul 2013 21:16:25 +0000 (15:16 -0600)]
Catch additional connect fail cases.

When fixing bug/1195910, some other failure
cases weren't considered (ie not authorized,
unreachable dest etc).

We should fix this up to handle the various
connection error states accordingly and also
add some hints to the log output to help
determine where to look in case of failure.

Fixes bug: 1201592

Change-Id: Ib099c7af705e7c49be4d0f723c8a20262c942e7f

11 years agoMerge "Implement extend volume functionality in SolidFire"
Jenkins [Mon, 15 Jul 2013 21:52:53 +0000 (21:52 +0000)]
Merge "Implement extend volume functionality in SolidFire"

11 years agoMerge "Add unit tests for cinder/api/contrib/volume_actions."
Jenkins [Mon, 15 Jul 2013 21:46:40 +0000 (21:46 +0000)]
Merge "Add unit tests for cinder/api/contrib/volume_actions."

11 years agoMerge "Use base ISCSI driver to fulfill some driver requirements"
Jenkins [Mon, 15 Jul 2013 20:40:56 +0000 (20:40 +0000)]
Merge "Use base ISCSI driver to fulfill some driver requirements"

11 years agoClean up Huawei tmp files from tests.
Avishay Traeger [Mon, 15 Jul 2013 19:36:14 +0000 (22:36 +0300)]
Clean up Huawei tmp files from tests.

Remove tmp files created by Huawei tests.

Change-Id: Id2eb4034b7be9d76843659647387344914ce236a
Fixes: bug 1200416
11 years agoAdd flag argument to 'cinder-manage config list'
Jay S. Bryant [Wed, 19 Jun 2013 19:52:41 +0000 (14:52 -0500)]
Add flag argument to 'cinder-manage config list'

Unlike other cinder-manage 'list' commands the 'config list'
option doesn't allow users to specify a filter to limit
the output.  This commit adds the ability to specify
the flag the user wishes to display.

If no flag is specified the default behavior is still to
display all the configured flags.  If the flag requested
is not found, cinder-manage reports that the flag was not
found.

(fixes bug 1187137)

Change-Id: I698f4c06d7e93217d8f307a880e0ae40711151c2

11 years agoImported Translations from Transifex
OpenStack Jenkins [Mon, 15 Jul 2013 18:10:20 +0000 (18:10 +0000)]
Imported Translations from Transifex

Change-Id: Ie950672cd1eb59c78124a84c37da620a3b4af97f

11 years agoAdd generic block device driver
Ann Kamyshnikova [Wed, 17 Apr 2013 09:58:35 +0000 (13:58 +0400)]
Add generic block device driver

This driver adds an ability to create volumes on any block device on
local host.

This driver supports the following features:

- Volume Create/Delete
- Volume Attach/Detach
- Get Volume Stats
- Copy Image to Volume
- Copy Volume to Image
- Clone Volume

Not implemented:

- Snapshot Create/Delete
- Create Volume from Snapshot

These features are not implemented because there is no generic way
to create snapshots for block devices.

bp block-device-driver

Change-Id: If5fcaf2775daf660c46d630eea0f9633ca816ee9

11 years agoUse base ISCSI driver to fulfill some driver requirements
Mike Perez [Mon, 15 Jul 2013 01:48:54 +0000 (18:48 -0700)]
Use base ISCSI driver to fulfill some driver requirements

Cinder has a list of minimum features that must be implemented by each
driver. This uses the copy_volume_to_image and copy_image_to_volume
implementation from the base ISCSI class. Also use the base for raising
NotImplementedError. This touches the Nexenta and Zadara driver.

Change-Id: I44a347e126a783e38d3a68cba23306a571aec43b

11 years agoMerge "Cleanup and make HACKING.rst DRYer"
Jenkins [Sun, 14 Jul 2013 19:07:21 +0000 (19:07 +0000)]
Merge "Cleanup and make HACKING.rst DRYer"

11 years agoCleanup and make HACKING.rst DRYer
Joe Gordon [Fri, 12 Jul 2013 15:47:01 +0000 (16:47 +0100)]
Cleanup and make HACKING.rst DRYer

Reference the OpenStack hacking guide in HACKING.rst and remove
duplicate entries.  Add placeholder section for cinder specific rules.
cinder specific rules can be created using hacking's local check
support.

Change-Id: Ia74da70363e3fe602405a440c1d2ec75052e9193

11 years agoMerge "Handle errors raised by extend_volume"
Jenkins [Sat, 13 Jul 2013 16:10:48 +0000 (16:10 +0000)]
Merge "Handle errors raised by extend_volume"

11 years agoMerge "Fix a few Sphinx warnings"
Jenkins [Sat, 13 Jul 2013 16:10:41 +0000 (16:10 +0000)]
Merge "Fix a few Sphinx warnings"

11 years agoMerge "Add support to import images into sheepdog volumes."
Jenkins [Sat, 13 Jul 2013 16:09:13 +0000 (16:09 +0000)]
Merge "Add support to import images into sheepdog volumes."

11 years agoMerge "Update requirements from openstack/requirements."
Jenkins [Fri, 12 Jul 2013 18:56:05 +0000 (18:56 +0000)]
Merge "Update requirements from openstack/requirements."

11 years agoMerge "Enable zero the snapshot when delete snapshot in LVMVolumeDriver"
Jenkins [Fri, 12 Jul 2013 18:33:14 +0000 (18:33 +0000)]
Merge "Enable zero the snapshot when delete snapshot in LVMVolumeDriver"

11 years agoUpdate requirements from openstack/requirements.
John Griffith [Fri, 12 Jul 2013 00:02:45 +0000 (18:02 -0600)]
Update requirements from openstack/requirements.

Fixes bug: 1200214

Change-Id: I31edd5283b72ac46e99a11aca196f5b9915c4465

11 years agoEnable zero the snapshot when delete snapshot in LVMVolumeDriver
Rongze Zhu [Wed, 10 Jul 2013 16:25:32 +0000 (09:25 -0700)]
Enable zero the snapshot when delete snapshot in LVMVolumeDriver

Because snapshot without 'size' field, So clear_volume method in
LVMVolumeDriver will skip secure deleting. Get the size of snapshot from
'volume_size' filed, So it can zero the snapshot.

Remove the 'size_in_g' parameter in _delete_volume method, because it never
used. Add a unittest for clear_volume method.

Fixes  Bug #1198185

Change-Id: Ie919b50ce4fb276f29ab2e0279f868a691ea7bef

11 years agoFixes ceph-backup failure if original volume deleted
Edward Hope-Morley [Thu, 11 Jul 2013 18:38:15 +0000 (19:38 +0100)]
Fixes ceph-backup failure if original volume deleted

Fixes: bug #1199661
Change-Id: I21f979bf2c0ca6910a6437cb6277193f71fed664

11 years agoMerge "Ignore files created by Sphinx build"
Jenkins [Fri, 12 Jul 2013 06:57:18 +0000 (06:57 +0000)]
Merge "Ignore files created by Sphinx build"

11 years agoImplement extend volume functionality in Rbd
Haomai Wang [Wed, 10 Jul 2013 09:10:09 +0000 (17:10 +0800)]
Implement extend volume functionality in Rbd

This implements the extend volume functionality for Rbd driver.

Implements: blueprint extend-rbd-volume
Change-Id: I7ddbd0dda742627e959ac672b125555225238030

11 years agoHandle errors raised by extend_volume
Mathieu Gagné [Tue, 9 Jul 2013 17:59:43 +0000 (13:59 -0400)]
Handle errors raised by extend_volume

Errors raised by extend_volume aren't handled by the manager.
This means the volume status will not be updated to 'error_extending'
when an error is raised during the process.

* Handle such errors and update volume status accordingly
* Add logging for the extend volume process

Fixes: bug #1199471
Change-Id: I06a037af0344d1eaf4115f0af5a85ceeab1ffd37

11 years agoMinor reorg for (array resource usage and backend options naming)
Lakhinder Walia [Fri, 12 Jul 2013 01:27:16 +0000 (18:27 -0700)]
Minor reorg for (array resource usage and backend options naming)

1. Use HUS target/initiator resources efficiently.
2. Command options aligned with openStack scheme of using dashes.
3. Self tests modified to accomodate #1 and #2.

Change-Id: I7d23a980f237c973538ca08215f77a1f69cc2517
Fixes: bug 1200441
11 years agoMerge "Check enabled backup service before rpc request"
Jenkins [Fri, 12 Jul 2013 01:25:04 +0000 (01:25 +0000)]
Merge "Check enabled backup service before rpc request"

11 years agoMerge "Fixed Ceph backup librbd segfault"
Jenkins [Fri, 12 Jul 2013 01:25:01 +0000 (01:25 +0000)]
Merge "Fixed Ceph backup librbd segfault"

11 years agoCheck enabled backup service before rpc request
xiaoxi_chen [Thu, 11 Jul 2013 07:22:04 +0000 (15:22 +0800)]
Check enabled backup service before rpc request

In previous code we didn't check whether we have an enabled
backup service there before we send out the rpc request,
results that if no enabled backup service there,the volume will
stays in "backing-up" state and the backup will stays in "creating".

This patch fixed this issue, we exam whether at least an appropriate
(same host,az as the volume and is_alive) backup service available
before we do the rpc request.

Fixes: bug #1200040
Change-Id: I77154528f489ed20f7b784e6fcefccf15dc81d1d

11 years agoMerge "Enable setting blocksize on volumes."
Jenkins [Thu, 11 Jul 2013 21:58:43 +0000 (21:58 +0000)]
Merge "Enable setting blocksize on volumes."

11 years agoFixed Ceph backup librbd segfault
Edward Hope-Morley [Thu, 11 Jul 2013 17:26:22 +0000 (18:26 +0100)]
Fixed Ceph backup librbd segfault

Change-Id: I1a6b9935eb7da9fca5b572ea4823bae3def99ea0
Fixes: bug #1198271
11 years agoMerge " cinder.api: Replace 'locals()' with explicit values"
Jenkins [Thu, 11 Jul 2013 17:41:44 +0000 (17:41 +0000)]
Merge "    cinder.api: Replace 'locals()' with explicit values"

11 years agoMerge "Fix missing volume_name_template flag."
Jenkins [Thu, 11 Jul 2013 17:38:06 +0000 (17:38 +0000)]
Merge "Fix missing volume_name_template flag."

11 years agoMerge "Consist terminate_connection function signature"
Jenkins [Thu, 11 Jul 2013 16:20:15 +0000 (16:20 +0000)]
Merge "Consist terminate_connection function signature"

11 years agoMerge "Add support for storing volumes on GPFS"
Jenkins [Thu, 11 Jul 2013 13:31:58 +0000 (13:31 +0000)]
Merge "Add support for storing volumes on GPFS"

11 years agoMerge "Add unit tests for cinder/api/versions"
Jenkins [Thu, 11 Jul 2013 11:34:34 +0000 (11:34 +0000)]
Merge "Add unit tests for cinder/api/versions"

11 years agoMerge "Update upper bound of keystoneclient version."
Jenkins [Thu, 11 Jul 2013 11:20:01 +0000 (11:20 +0000)]
Merge "Update upper bound of keystoneclient version."

11 years agoAdd support to import images into sheepdog volumes.
Wenhao Xu [Wed, 6 Mar 2013 08:51:33 +0000 (16:51 +0800)]
Add support to import images into sheepdog volumes.

Supporting import images from glance to sheepdog volumes.
Unit test framework for sheepdog is added too.

Fix Bug #1148784

Change-Id: I8ffd1bc1b2d719aed27ce0d98eaa41fef8027ca2

11 years agoAdd tests for cinder/api/urlmap.py
Julia Varlamova [Fri, 5 Jul 2013 11:33:56 +0000 (15:33 +0400)]
Add tests for cinder/api/urlmap.py

Add tests for unquoting and parsing functions in
TestParseFunction class
Add tests for Accept class methods:
 - TestAccept class - test cases for processing content types
 - TestUrlMapFactory - test cases for urlmap factory
Add tests for URLMap class methods except __call__ method in TestURLMap

Change-Id: I3f1aa527f49175d9fac6fbe7309383709c30c237

11 years agoremove improper assert usage
Kun Huang [Thu, 11 Jul 2013 04:04:52 +0000 (12:04 +0800)]
remove improper assert usage

There're many talks about it. An assert should be used for `never
happen` cases, not common paramaters validating.

With grep, we could many all assert statement used in none-test codes:

cinder/volume/drivers/san/solaris.py:110:
cinder/volume/drivers/san/solaris.py:116:
cinder/volume/drivers/san/solaris.py:161:
cinder/volume/drivers/san/solaris.py:162:
cinder/volume/drivers/san/solaris.py:163:
cinder/volume/drivers/san/solaris.py:164:
cinder/volume/drivers/san/solaris.py:170:
    checking cmd output which should never changed, so leave it
cinder/db/sqlalchemy/migration.py:113:
    ensure file existence from impossible cases, so leave it
cinder/utils.py:
    used for functional flow, so use ValueError instead

fixes bug #1199354
Change-Id: I2b1701269bdf7c8737548e57bd940921a6256372

11 years agoEnable setting blocksize on volumes.
John Griffith [Wed, 10 Jul 2013 21:34:26 +0000 (15:34 -0600)]
Enable setting blocksize on volumes.

Some back-ends support blocksizes other than the default 512 (like 4096),
this change adds a provider_geometry column to the volumes table,
format is "physical_block_size logical_block_size".

This can then be used by libvirt to determine if it should pass in
non-default block_size info, and there's a method for future
geometry/disk info that might be needed.

Fixes bug: 1196248

Change-Id: I8d40bc56403154fbe955cd4ccf8f0c55fc9eb7c5

11 years ago cinder.api: Replace 'locals()' with explicit values
Scott DAngelo [Wed, 10 Jul 2013 22:00:02 +0000 (22:00 +0000)]
cinder.api: Replace 'locals()' with explicit values

    Help bring source code into compliance with the
    Cinder Style Commandments:
    https://github.com/openstack/cinder/blob/master/HACKING.rst

    This change covers all affected source in the
    cinder api module, specifically:
    cinder/api/contrib/volume_actions.py

    Partially fixes: bug #1190758

Change-Id: I2134e69b70a5a5132847168f60b4d192bdf0b536

11 years agoUpdate upper bound of keystoneclient version.
Lin Hua Cheng [Wed, 10 Jul 2013 21:31:00 +0000 (14:31 -0700)]
Update upper bound of keystoneclient version.

This is the intermediate step so that we can update the the lower
bound of keystoneclient in openstack-requirements.

Change-Id: Ie6d973ccd1263243ebf0779ae59ef32416bf7087

11 years agoFix missing volume_name_template flag.
John Griffith [Wed, 10 Jul 2013 19:41:10 +0000 (13:41 -0600)]
Fix missing volume_name_template flag.

volume_template_name was converted to a self.configuration option,
however we don't import that opt in the self.configuration changes.

This patch switches the specifier back to the global CONF

Fixes bug: 1199909

Change-Id: I1431ba8a46b3a86ed77c02646a1c5fd1f62ae010

11 years agoChange check-detach to reject more states
Duncan Thomas [Wed, 10 Jul 2013 18:28:39 +0000 (19:28 +0100)]
Change check-detach to reject more states

Change check_detach is reject anything other than 'in-use', rather than
just rejecting 'available'.

Fixes bug #1199922

Change-Id: I3180540ca7bb699a3494ca4eea1389ae8a117df0

11 years agoImplement extend volume functionality in SolidFire
Mathieu Gagné [Tue, 9 Jul 2013 18:11:18 +0000 (14:11 -0400)]
Implement extend volume functionality in SolidFire

This implements the extend volume functionality for SolidFire driver.

Implements: blueprint solidfire-extend-size-support

Change-Id: I00dc15f722c70b8835ae5a060ca8f0c4a80a1acb

11 years agoAdd unit tests for cinder/api/versions
Jasakov Artem [Wed, 10 Jul 2013 13:15:24 +0000 (17:15 +0400)]
Add unit tests for cinder/api/versions

Added to the following unit tests:
  Test action args;
  Test get most recent update;
  Test create version entry;
  Test create feed.

Change-Id: I760e8f419be529cda969e848f151a8cab1053dce

11 years agoMerge "Add interface class for backup drivers"
Jenkins [Wed, 10 Jul 2013 11:05:49 +0000 (11:05 +0000)]
Merge "Add interface class for backup drivers"

11 years agoMerge "Make String column creation compatible with SQLAlchemy 0.8"
Jenkins [Wed, 10 Jul 2013 06:46:17 +0000 (06:46 +0000)]
Merge "Make String column creation compatible with SQLAlchemy 0.8"

11 years agoMerge "Remove suds requirement"
Jenkins [Wed, 10 Jul 2013 06:35:52 +0000 (06:35 +0000)]
Merge "Remove suds requirement"

11 years agoMerge "Move brick initiator tests to brick subdirectory."
Jenkins [Wed, 10 Jul 2013 05:28:25 +0000 (05:28 +0000)]
Merge "Move brick initiator tests to brick subdirectory."

11 years agoMerge "Don't pass 'session' arg to public DB API methods"
Jenkins [Wed, 10 Jul 2013 05:27:21 +0000 (05:27 +0000)]
Merge "Don't pass 'session' arg to public DB API methods"

11 years agoMerge "Sync install_venv_common from oslo"
Jenkins [Wed, 10 Jul 2013 05:27:14 +0000 (05:27 +0000)]
Merge "Sync install_venv_common from oslo"

11 years agoMake String column creation compatible with SQLAlchemy 0.8
David Ripton [Tue, 9 Jul 2013 17:32:08 +0000 (13:32 -0400)]
Make String column creation compatible with SQLAlchemy 0.8

3 migration scripts used the convert_unicode, unicode_error, and
_warn_on_bytestring arguments when creating String columns.  These
seem to cause problems with SQLAlchemy 0.8.  Nova excised all use
of such arguments in commit 93dec58156e when squashing migrations
for Grizzly, and seems to have no problems with SQLAlchemy 0.8.

Fixes bug 1199453

Change-Id: Ie4b46339423e6a1ad3d8ca699a2412b825206c0e

11 years agoRemove suds requirement
Dirk Mueller [Thu, 4 Jul 2013 14:16:15 +0000 (16:16 +0200)]
Remove suds requirement

Last usage of suds was removed in
https://review.openstack.org/#/c/33168/. suds is
meanwhile unmaintained and has pending security issues,
so better remove references to it.

Change-Id: I7e66a1b6e3a3189b07b30564f7b02f5e195944ff

11 years agoAdd support for storing volumes on GPFS
Dinesh Subhraveti [Wed, 3 Jul 2013 22:56:42 +0000 (15:56 -0700)]
Add support for storing volumes on GPFS

Key functions include efficient creation of snapshots and clones using
file system level copy-on-write mechanism. Copying of image blocks is
also avoided in case Glance backend repository happens to be on GPFS.

Change-Id: I0a532fe06798d07f21d79ee45444bb9c0a025430
Implements: blueprint gpfs-volume-driver

11 years agoMerge "Fix extent size issue when creating thin pool."
Jenkins [Tue, 9 Jul 2013 14:08:56 +0000 (14:08 +0000)]
Merge "Fix extent size issue when creating thin pool."

11 years agoMerge "Add ability to specify SolidFire API version"
Jenkins [Tue, 9 Jul 2013 13:01:52 +0000 (13:01 +0000)]
Merge "Add ability to specify SolidFire API version"

11 years agoMerge "Refactor reschedule in exception handling of volume manager"
Jenkins [Tue, 9 Jul 2013 13:01:50 +0000 (13:01 +0000)]
Merge "Refactor reschedule in exception handling of volume manager"

11 years agoConsist terminate_connection function signature
xiaoxi_chen [Tue, 9 Jul 2013 02:18:30 +0000 (10:18 +0800)]
Consist terminate_connection function signature

Clean up the "force=False" in function signature for terminate_connection
since it already accept **kwargs.

Thus make all function signature for terminate_connection consist to
    def terminate_connection(self, volume, connector, **kwargs)

Fixes: bug #1190419
Change-Id: I8765cb8f2aa3cfbb49ff57ae034b148aee35a8c4

11 years agoSolidFire API RequestID is useless.
John Griffith [Tue, 9 Jul 2013 01:22:34 +0000 (19:22 -0600)]
SolidFire API RequestID is useless.

The SolidFire API can take an int or a string for a request-id,
when using an int however it needs to actually be a valid int.

The driver currently was doing an int(uuid) which is too large and
as a result get's truncated making it difficult or impossible to track
request-ids.

This patch chanes the generate request-id to form a hash of the uuid so
that it can be tracked.

Fixed bug: 1199198

Change-Id: I38d5e3d189e679678898c329a9fa173a47853d47

11 years agoAdd ability to specify SolidFire API version
Mathieu Gagné [Tue, 9 Jul 2013 01:11:59 +0000 (21:11 -0400)]
Add ability to specify SolidFire API version

This change is required for future works in the SolidFire driver.
New SolidFire features (such as extend) are only available in
the latest version of the SolidFire API.

Default to '1.0' for backward compatibility. SolidFire still supports
the '1.0' version in its latest release.

Change-Id: I93590ab297d746d65a58f9166d160d0c1d833014

11 years agoRefactor reschedule in exception handling of volume manager
Zhiteng Huang [Fri, 5 Jul 2013 08:46:34 +0000 (01:46 -0700)]
Refactor reschedule in exception handling of volume manager

Previous exception handling has a pitfall that may potentially clear
the sys.exc_info() (by calling SQLalchmey to update db). This patch
refactors some part of exception handling in create_volume() to make
sure sys.exc_info() is retrieved so that we can log and reraise it;
also we make sure exception be reraised at the end of exception handling
no matter the request is rescheduled or not.

As a side effect, we fixed a bug in unittest which didn't provide
correct argument to db API but previously this exception has been wrongly
consumed by volume manager's exception handling (not reraise exception
when request is rescheduled).

fix bug: 1197648

Change-Id: Idce5d06f8be1fb6018012503ec7f844898a21b25

11 years agoMerge "Use oslo.sphinx and remove local copy of doc theme"
Jenkins [Mon, 8 Jul 2013 21:09:20 +0000 (21:09 +0000)]
Merge "Use oslo.sphinx and remove local copy of doc theme"

11 years agoDon't pass 'session' arg to public DB API methods
Roman Podolyaka [Thu, 27 Jun 2013 15:34:21 +0000 (18:34 +0300)]
Don't pass 'session' arg to public DB API methods

DB API is an abstraction layer, which is used to make it
possible to switch DB backends easily (though we've got only
SQLAlchemy backend at the moment).

Public methods of DB API should not accept any backend-specific
arguments (i. e. a Session instance, that is an SQLAlchemy entity
to work with DB transactions).

This patch removes 'session' argument from all DB API public methods
(except volume_data_get_for_project() and snapshot_data_get_fro_project(),
which are a bit tricky and will be fixed by another patch).

If a DB API method must be called by another one in the context of a started
transaction, a private method is used. It accepts the same arguments as the
corresponding public method plus one additional argument to pass the transactional
context (in case of SQLAlchemy backend it's a Session instance).

Blueprint: db-session-cleanup

Change-Id: Iabe7ea834ec07f6520614de2461b9ad1ab7a7ac2

11 years agoAdd interface class for backup drivers
Marc Koderer [Thu, 27 Jun 2013 10:05:56 +0000 (12:05 +0200)]
Add interface class for backup drivers

This fix introduces an interface class to define the structure of all backup
drivers. It also renames backup/service to backup/driver.
To be backward compatible a mapping functionality is introduced to map old
backup services to backup drivers.

Implements: blueprint refactor-backup-service

Change-Id: Ic3fca567111f4bd1b221689c73cd5c3bab4a777b

11 years agoPrevent wrongly privilege escalation of a context
XueChendi [Wed, 3 Jul 2013 14:20:32 +0000 (22:20 +0800)]
Prevent wrongly privilege escalation of a context

Current codes in create_volume() may exists a scenario that
a context which is not elevated but after it fails in volume
creation, it becomes elevated. This patch saves original
context, so that if it fails in volume creation simply use the
original context for further scheduling.

Fix bug:1187076

Change-Id: I2822b1612ec741209b278fc65f18d0f8f3243e0a

11 years agoMove brick initiator tests to brick subdirectory.
Avishay Traeger [Sun, 7 Jul 2013 09:23:19 +0000 (12:23 +0300)]
Move brick initiator tests to brick subdirectory.

Move brick initiator test file to brick subdirectory.

Change-Id: If08281ce067a3e462072bd7d9ab4db555e6930c5

11 years agoFix extent size issue when creating thin pool.
John Griffith [Tue, 25 Jun 2013 22:52:21 +0000 (16:52 -0600)]
Fix extent size issue when creating thin pool.

The LVM create thin pool rounds up extents, this
change rounds the free space down to an int to avoid
this issue and also cleans up some comments and
code around how PV's are set up and used.

Change-Id: I725aa819c21c38f464595d0146d6640ecd1e6440