]> review.fuel-infra Code Review - openstack-build/cinder-build.git/log
openstack-build/cinder-build.git
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 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 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

11 years agoMerge "Add check for snapshot to Brick LVM."
Jenkins [Sat, 6 Jul 2013 04:38:54 +0000 (04:38 +0000)]
Merge "Add check for snapshot to Brick LVM."

11 years agoSync install_venv_common from oslo
Monty Taylor [Sat, 6 Jul 2013 02:27:13 +0000 (22:27 -0400)]
Sync install_venv_common from oslo

Also grab a related doc reference while we're at it.

Change-Id: I2590970767f043f35a62a4dfa94be4ee86fbf138

11 years agoUse oslo.sphinx and remove local copy of doc theme
Doug Hellmann [Fri, 28 Jun 2013 23:06:10 +0000 (19:06 -0400)]
Use oslo.sphinx and remove local copy of doc theme

Use the new oslo.sphinx version of the OpenStack doc
theme instead of copying it into this repo.

blueprint oslo.sphinx

Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com>
Change-Id: I0bd91f7bb43f97b99051fed65b75fc05d5149cc8

11 years agoMerge "Add execute wrapper to brick LVM code."
Jenkins [Fri, 5 Jul 2013 16:36:56 +0000 (16:36 +0000)]
Merge "Add execute wrapper to brick LVM code."

11 years agoMerge "Rename cinder.flags to cinder.common.config"
Jenkins [Fri, 5 Jul 2013 10:10:07 +0000 (10:10 +0000)]
Merge "Rename cinder.flags to cinder.common.config"

11 years agoMerge "Scheduler should not select down volume managers"
Jenkins [Thu, 4 Jul 2013 22:00:24 +0000 (22:00 +0000)]
Merge "Scheduler should not select down volume managers"

11 years agoMerge "xenapi: implement xenserver image to volume"
Jenkins [Thu, 4 Jul 2013 18:49:24 +0000 (18:49 +0000)]
Merge "xenapi: implement xenserver image to volume"

11 years agoMerge "Fix typo 'Flase' -> 'False'"
Jenkins [Thu, 4 Jul 2013 18:49:16 +0000 (18:49 +0000)]
Merge "Fix typo 'Flase' -> 'False'"

11 years agoMerge "Make os-services API extension consistent"
Jenkins [Thu, 4 Jul 2013 17:56:28 +0000 (17:56 +0000)]
Merge "Make os-services API extension consistent"

11 years agoMerge "Quotas by Volume Type"
Jenkins [Thu, 4 Jul 2013 17:13:21 +0000 (17:13 +0000)]
Merge "Quotas by Volume Type"

11 years agoScheduler should not select down volume managers
Ollie Leahy [Thu, 4 Jul 2013 13:58:08 +0000 (13:58 +0000)]
Scheduler should not select down volume managers

Currently volume managers that are not disabled, but are not running
may be selected by the scheduler for volume creation operations.

Change-Id: Ia06a3da8b31eef918d55aaaf71f863683c721026
Fixes: bug #1197741
11 years agoAdd check for snapshot to Brick LVM.
John Griffith [Thu, 4 Jul 2013 15:25:03 +0000 (09:25 -0600)]
Add check for snapshot to Brick LVM.

Adds a check to the LVM code in brick to see if
a snapshot exists.  This implements the incorrectly
named "is_busy" method that exists in the cinder LVM driver.

Change-Id: Ia0f6cbd3d5b4561c5368545448abaafa67caf05d

11 years agoFix typo 'Flase' -> 'False'
Sascha Peilicke [Thu, 4 Jul 2013 13:47:11 +0000 (15:47 +0200)]
Fix typo 'Flase' -> 'False'

Change-Id: I986a943d06d715ac7bc284d5ebdf1d8963f5dc3e

11 years agoRename cinder.flags to cinder.common.config
Sergey Vilgelm [Wed, 3 Jul 2013 07:28:05 +0000 (11:28 +0400)]
Rename cinder.flags to cinder.common.config

Replace FLAGS with cfg.CONF
Rename modules fake_flags to conf_fixture, test_flags to test_conf, declare_flags to declare_conf, runtime_flags to runtime_conf
Renamed cinder.flags, because exactly the same was done in the glance and nova

Fixes: bug #1182037
Change-Id: I3424d0a401b3ef7a3254d3e913263554361a52ff

11 years agoMerge "Skip brick_initiator test in virtual environments"
Jenkins [Wed, 3 Jul 2013 06:46:46 +0000 (06:46 +0000)]
Merge "Skip brick_initiator test in virtual environments"

11 years agoMerge "Imported Translations from Transifex"
OpenStack Jenkins [Wed, 3 Jul 2013 06:46:42 +0000 (06:46 +0000)]
Merge "Imported Translations from Transifex"

11 years agoAdd execute wrapper to brick LVM code.
John Griffith [Tue, 2 Jul 2013 19:16:28 +0000 (13:16 -0600)]
Add execute wrapper to brick LVM code.

Add an execute wrapper to the brick lvm code and
enable the ability to pass in a desired executor other
than just using the default common/processutils executor
if there's some reason to do so.

This will enable the switch of the cinder/volume/drivers/lvm.py
driver to continue using cinder/utils execute until we switch over
to common/processutils and also helps immensely with the tests.

Change-Id: Iaecba475debb2100d0c40b5e54ece6d4420271c5

11 years agoMerge "Adding host attaching support to Cinder"
Jenkins [Tue, 2 Jul 2013 20:48:19 +0000 (20:48 +0000)]
Merge "Adding host attaching support to Cinder"

11 years agoImported Translations from Transifex
OpenStack Jenkins [Tue, 2 Jul 2013 18:11:01 +0000 (18:11 +0000)]
Imported Translations from Transifex

Change-Id: I488133a2ae2c0f04dfd91bc85107df58c701ab41

11 years agoCoraidDriver: Create_volume_from_snapshot of a different size
Jean-Baptiste Ransy [Thu, 20 Jun 2013 15:39:45 +0000 (17:39 +0200)]
CoraidDriver: Create_volume_from_snapshot of a different size

When you create a Volume from a Snapshot, the 'size' argument for the
new volume isn't used at all.
So, the new volume created will be created (successfully but) with the
same size as the snapshot size.

Cinder think the volume has been created with the right size.

We just need to call Coraid ESM LV Resize with the REST API after
the volume has been created.

Fixes bug 1158959

Change-Id: I760fe1ba4052bb2d5b1a1a5c55c9a976522af107

11 years agoMake os-services API extension consistent
Qiu Yu [Tue, 2 Jul 2013 07:14:36 +0000 (15:14 +0800)]
Make os-services API extension consistent

Updates the os-services API extension so that it is consistent
internally (index and update return similar formats), and so
that it works with the following cinderclient code changes which sends
the the following request body format:

  {"binary": "cinder-volume", "host": "host1"}

It addresses a similar issue which happens in nova os-services extention
before. https://bugs.launchpad.net/nova/+bug/1147746

This change added 'binary' key in request and 'status' key in response
while still keeping 'service' ane 'disabled' key for API compatibility
sake.

Implements blueprint os-services-extension

Change-Id: I7f3fa889294ca6caebdf46b8689345bcac1cdf54

11 years agoMerge "Handle ECONNREFUSED exception in SolidFire driver."
Jenkins [Tue, 2 Jul 2013 06:36:23 +0000 (06:36 +0000)]
Merge "Handle ECONNREFUSED exception in SolidFire driver."

11 years agoMerge "Removes 3PAR domain option from cinder config file"
Jenkins [Tue, 2 Jul 2013 05:03:17 +0000 (05:03 +0000)]
Merge "Removes 3PAR domain option from cinder config file"

11 years agoMerge "Imported Translations from Transifex"
OpenStack Jenkins [Tue, 2 Jul 2013 04:50:41 +0000 (04:50 +0000)]
Merge "Imported Translations from Transifex"

11 years agoMerge "Added Cinder volume backup to Ceph support"
Jenkins [Tue, 2 Jul 2013 00:13:31 +0000 (00:13 +0000)]
Merge "Added Cinder volume backup to Ceph support"

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

Change-Id: Ifa128b8d4e3cbd8655ea1d9ffe756d1ffc41e817

11 years agoRemoves 3PAR domain option from cinder config file
Viraj Hardikar [Tue, 25 Jun 2013 22:37:09 +0000 (15:37 -0700)]
Removes 3PAR domain option from cinder config file

The HP 3PAR domain is no longer required to be specified in the
cinder configuration file. This patch automatically looks up the
domain using the Common Provisioning Group (CPG) specified.
hp3par_domain will remain in the config for now and will be
logged as deprecated. It will be removed in the I release.

DocImpact
Change-Id: I3ed01eed26209caa1904bec1f585059860294f38
Fixes: bug 1194599
11 years agoMerge "Calculate count for customized dd blocksize"
Jenkins [Mon, 1 Jul 2013 16:13:44 +0000 (16:13 +0000)]
Merge "Calculate count for customized dd blocksize"

11 years agoSkip brick_initiator test in virtual environments
Dirk Mueller [Sat, 29 Jun 2013 17:28:27 +0000 (19:28 +0200)]
Skip brick_initiator test in virtual environments

/dev/disk/by-path does not exist in certain virtual
environments. Skip the test.

Fixes LP Bug #1196464

Change-Id: Ifc5bb061db59aaa6b7c089eda5e4eb1c9eff2dbf

11 years agoAdded Cinder volume backup to Ceph support
Edward Hope-Morley [Tue, 25 Jun 2013 09:11:11 +0000 (10:11 +0100)]
Added Cinder volume backup to Ceph support

Added new Ceph backup service to allow backup
of Cinder volumes to a Ceph object store. This
driver is compatible with the existing backup
interface provided by the Swift backup service.

Implements: blueprint cinder-backup-to-ceph

Change-Id: I299f033347cb263e7169c4a4efb758d19e753f46

11 years agoMerge "Add os-availability-zone extension"
Jenkins [Mon, 1 Jul 2013 03:27:51 +0000 (03:27 +0000)]
Merge "Add os-availability-zone extension"

11 years agoHandle ECONNREFUSED exception in SolidFire driver.
John Griffith [Fri, 28 Jun 2013 21:56:46 +0000 (15:56 -0600)]
Handle ECONNREFUSED exception in SolidFire driver.

The SolidFire driver wasn't handling connection exceptions
during init (capacity updates from scheduler).

This patch add a try/except wrap around the two places
that this is called and logs and error rather than crashing
cinder-volume service.

Fixes bug: 1195910

Change-Id: I30347cc0973bbf9dbc30ea02e204560095fc75b4

11 years agoAdd os-availability-zone extension
Brian Waldon [Wed, 26 Jun 2013 16:43:48 +0000 (09:43 -0700)]
Add os-availability-zone extension

* Query /os-availability-zone to get an object representing the configured
  availability zones and their state
* This implements a subset of Nova's os-availability-zone extension

Fixes bug 1195461

Change-Id: Ic0a8eb5a82ca0a4eed3b1e1cd6cf3a4665589307

11 years agoMerge "Fix service alive information in os-services extension"
Jenkins [Fri, 28 Jun 2013 14:00:10 +0000 (14:00 +0000)]
Merge "Fix service alive information in os-services extension"

11 years agoMerge "Imported Translations from Transifex"
OpenStack Jenkins [Fri, 28 Jun 2013 14:00:07 +0000 (14:00 +0000)]
Merge "Imported Translations from Transifex"

11 years agoMerge "Run flake8 also on cinder/*/openstack"
Jenkins [Fri, 28 Jun 2013 05:46:03 +0000 (05:46 +0000)]
Merge "Run flake8 also on cinder/*/openstack"

11 years agoMerge "Add Brick iSCSI attach/detach."
Jenkins [Thu, 27 Jun 2013 22:51:02 +0000 (22:51 +0000)]
Merge "Add Brick iSCSI attach/detach."

11 years agoRun flake8 also on cinder/*/openstack
Dirk Mueller [Fri, 14 Jun 2013 21:37:11 +0000 (23:37 +0200)]
Run flake8 also on cinder/*/openstack

exclude=openstack also matches cinder/api/openstack,
which is however not merged from oslo-incubator.
Exclude=common instead, and explicitely include
cinder/common

Change-Id: I331d8c0d17e519386ae72caeca8a336eecde3ad3

11 years agoImported Translations from Transifex
OpenStack Jenkins [Thu, 27 Jun 2013 18:10:56 +0000 (18:10 +0000)]
Imported Translations from Transifex

Change-Id: I1f87c3138e95a1da654a22425e07cd1b0ad1cdb7

11 years agoMerge "Fix check_for_setup_error for sheepdog driver"
Jenkins [Thu, 27 Jun 2013 17:56:45 +0000 (17:56 +0000)]
Merge "Fix check_for_setup_error for sheepdog driver"

11 years agoQuotas by Volume Type
Cory Stone [Wed, 22 May 2013 15:31:13 +0000 (10:31 -0500)]
Quotas by Volume Type

The VolumeTypeQuotaEngine creates a volume, snapshot, and gigabyte
quota for each volume type that exists, in addition to the existing
global quotas for each. These are queried every time a quota operation
happens.

The resources for creating quotas are named: volumes_<vtype>,
gigabytes_<vtype>, and snapshots_<vtype>.

Another patch will have changes to cinderclient for setting project
quotas by volume type.

blueprint quotas-limits-by-voltype
DocImpact

Change-Id: I88261676edcd6eb5b7cea40654a931f32c00815c

11 years agoxenapi: implement xenserver image to volume
Mate Lakat [Mon, 24 Jun 2013 13:37:08 +0000 (14:37 +0100)]
xenapi: implement xenserver image to volume

Amend image_utils, so that it could handle xenserver type images (vhd
chains inside a tgz archive). This requires the vhd-util binary, if the
image contains a vhd chain (e.g.: snapshot)

DocImpact
- Copy a XenServer type OpenStack image (tgz -ed vhd chain) is now
  supported.
- To use the above functionality, the cinder box must have access to the
  vhd-util binary. In ubuntu, this is done by apt-get installing
  blktap-utils.

Change-Id: I99b58868439c4d5187c2fe3666110bfda0924181

11 years agoSave some more image attributes to volume_glance_metadata.
Vincent Hou [Thu, 27 Jun 2013 07:43:00 +0000 (15:43 +0800)]
Save some more image attributes to volume_glance_metadata.

Current issue: When copying an image to a volume, attributes like size, disk_format, container_format,
checksum, min_disk and min_ram have not been copied so far. When booting a VM from a volume, we are
not able to check these atrributes without giving the image id. Furthermore, if the original
image is deleted, we will lose all the information.

This patch saves these attributes into volume_glance_metadata. We can still check these attributes
without giving the image id when booting a VM from a volume.

Fixed Bug 1159824.

Change-Id: I42ce676026d32be6e3f4bec6fd269908e2df0a8c

11 years agoMerge "Added volume backup and restore to Ceph RBD driver"
Jenkins [Thu, 27 Jun 2013 08:56:41 +0000 (08:56 +0000)]
Merge "Added volume backup and restore to Ceph RBD driver"

11 years agoFix check_for_setup_error for sheepdog driver
Kai Zhang [Thu, 27 Jun 2013 07:31:36 +0000 (00:31 -0700)]
Fix check_for_setup_error for sheepdog driver

Current implementation of check_for_setup_error() of sheepdog driver
cannot work correctly with the latest version of sheepdog cluster.
This patch fixes it and adds tests for both old and new version.

Fixes: bug #1195098
Change-Id: Ia710789e4bedd7c83cd47eff6b2fc532af39d94a

11 years agoMerge "Raise an error if iSCSI is not supported"
Jenkins [Thu, 27 Jun 2013 05:47:54 +0000 (05:47 +0000)]
Merge "Raise an error if iSCSI is not supported"

11 years agoAdd Brick iSCSI attach/detach.
Walter A. Boring IV [Tue, 11 Jun 2013 22:27:56 +0000 (15:27 -0700)]
Add Brick iSCSI attach/detach.

This patch adds the new brick initiator connector object
which contains the code to do volume attach and detach to a host
machine.  It includes hooks to work in both cinder and nova.
Nova has different exec wrapper and it also needs to talk to a
hypervisor at certain points during detach.

This patch also pulls the copy/pasted code from nova in the base
ISCSIDriver's _attach_volume method to use this new brick library.

This patch also includes a fix in the ISCSIDriver's
copy_volume_to_image code that didn't actually detach a volume
when it was done with the operation.
Bug 1194962

This patch also includes a fix for iSCSI detaches where the
iSCSI LUN wasn't being removed from the system until the very
last detach issues an iscsiadm logout.
Bug 1112483

This patch includes a fix for iSCSI multipath detaches where
the multipath device and the iSCSI LUNs for the multipath device
were never removed from the kernel.
Bug 1112483

Blueprint cinder-refactor-attach

Change-Id: Ieb181f896adb9230bbb6a2e5c42f261d61a0f140

11 years agoAdded volume backup and restore to Ceph RBD driver
Edward Hope-Morley [Wed, 26 Jun 2013 09:25:11 +0000 (10:25 +0100)]
Added volume backup and restore to Ceph RBD driver

It is now possible to backup and restore volumes
when using volume.drivers.rbd.RBDDriver

Implements: blueprint cinder-backup-to-ceph

Change-Id: Ic1b8db8f0acd7974423414171b8fb45197d05dc6

11 years agoFix service alive information in os-services extension
Qiu Yu [Wed, 26 Jun 2013 07:52:09 +0000 (15:52 +0800)]
Fix service alive information in os-services extension

Service alive information need to be compared with service_down_time
value and updated accordingly.

Change-Id: I9b9798c108a2da07ab78d5d05cbb51a73b14363e

11 years agoCalculate count for customized dd blocksize
Zhiteng Huang [Tue, 18 Jun 2013 20:43:26 +0000 (04:43 +0800)]
Calculate count for customized dd blocksize

In previous commit we introduce a configurable blocksize option for
'dd' command, however the 'count' value wasn't updated accordingly.
As a result, count could be too small which is bug.  This patch
introduce a private method to 1) validate custom dd blocksize; 2)
calculate correct count value.

Fix bug: 1192258

Change-Id: Icfd2d80e8f615ed585bd1d40c741a97cf55299d3

11 years agoContent-length missing in put_object
Marc Koderer [Wed, 19 Jun 2013 14:07:44 +0000 (16:07 +0200)]
Content-length missing in put_object

Radosgw returns a "411 Length Required" in case the content-length is not
specified. The parameter content_type is not set which leads to the problem
that content_length cannot be determined. Since the content length is already
computed in backup/services/swift it shouldn't be a problem to set this
parameter.

Conflicts:
cinder/backup/services/swift.py

Change-Id: I4c56823d70fcd1a801a75bfd14f474a2780dc1ac

11 years agoMerge "Update kombu requirement"
Jenkins [Wed, 26 Jun 2013 04:39:51 +0000 (04:39 +0000)]
Merge "Update kombu requirement"

11 years agoMerge "Register used CONF entries in cinder.api.common.py"
Jenkins [Tue, 25 Jun 2013 21:42:14 +0000 (21:42 +0000)]
Merge "Register used CONF entries in cinder.api.common.py"

11 years agoMerge "Replace glance_metadata check with bootable column."
Jenkins [Tue, 25 Jun 2013 20:50:35 +0000 (20:50 +0000)]
Merge "Replace glance_metadata check with bootable column."

11 years agoMerge "Imported Translations from Transifex"
OpenStack Jenkins [Tue, 25 Jun 2013 19:45:33 +0000 (19:45 +0000)]
Merge "Imported Translations from Transifex"

11 years agoReplace glance_metadata check with bootable column.
John Griffith [Wed, 19 Jun 2013 05:22:48 +0000 (23:22 -0600)]
Replace glance_metadata check with bootable column.

This patch adds a column to indicate if a volume is bootable or not.

Cinder API V1 was using get.volume_glance_metadata to determine
if a volume was bootable for translate_view.

This is fine until you put a heavy load on the system and things
can fall apart, particularly the backref of the glance meta is no longer
available and the call blows up.  Also this results in a bit of extra
unnecessary data being passed around with every create and get call.
This is especially an issue when creating hundreds or thousands of volumes.
Even better we can now reliably create thousands of volumes.

Fixes bug: 1192390

Change-Id: Idd47a0a8069ee905b81c7aae562b82767ad91930

11 years agoMerge "Added extra-spec key scoping to the 3PAR drivers"
Jenkins [Tue, 25 Jun 2013 18:50:48 +0000 (18:50 +0000)]
Merge "Added extra-spec key scoping to the 3PAR drivers"

11 years agoImported Translations from Transifex
OpenStack Jenkins [Tue, 25 Jun 2013 18:10:58 +0000 (18:10 +0000)]
Imported Translations from Transifex

Change-Id: Ib1f73f11952a60695f49cf8c6cd8fbca9946bd6f

11 years agoMerge "Do not raise NEW exceptions"
Jenkins [Tue, 25 Jun 2013 17:58:48 +0000 (17:58 +0000)]
Merge "Do not raise NEW exceptions"

11 years agoMerge " cinder.[brick,db,image] Replace 'locals()'"
Jenkins [Tue, 25 Jun 2013 17:23:10 +0000 (17:23 +0000)]
Merge "        cinder.[brick,db,image] Replace 'locals()'"

11 years agoMerge "Avoid winning the useless use of cat award"
Jenkins [Tue, 25 Jun 2013 17:23:07 +0000 (17:23 +0000)]
Merge "Avoid winning the useless use of cat award"