]> review.fuel-infra Code Review - openstack-build/cinder-build.git/log
openstack-build/cinder-build.git
12 years agostorwize-svc: improved test coverage and fixes.
Avishay Traeger [Sun, 12 Aug 2012 08:31:26 +0000 (11:31 +0300)]
storwize-svc: improved test coverage and fixes.

Added test cases to cover more error paths, now providing 97% test
coverage of the storwize-svc driver. Some tests uncovered bugs in the
driver, which are fixed by this patch. In addition, there are some
fixes to the code included which address comments from the submission
of this driver to nova-volume and sync the two versions.

Change-Id: I7c646885a7f2b1e761725c14940f1d741996beb4

12 years agoMerge "Add iscsiadm path for qauntal."
Jenkins [Fri, 10 Aug 2012 20:34:01 +0000 (20:34 +0000)]
Merge "Add iscsiadm path for qauntal."

12 years agoMerge "Use openstack.common.notifier."
Jenkins [Fri, 10 Aug 2012 20:25:10 +0000 (20:25 +0000)]
Merge "Use openstack.common.notifier."

12 years agoUse setuptools-git.
Monty Taylor [Fri, 10 Aug 2012 15:55:48 +0000 (11:55 -0400)]
Use setuptools-git.

Change-Id: I6861a29d65b809362949f2c54197940fd0988785

12 years agoAdd iscsiadm path for qauntal.
Chuck Short [Fri, 10 Aug 2012 15:06:50 +0000 (10:06 -0500)]
Add iscsiadm path for qauntal.

Resynchronize with nova/etc/nova/rootwrap.d/nova.volumes.

Change-Id: I9737454bb2f48bbd97fe14bca163059e93ef825b
Signed-off-by: Chuck Short <chuck.short@canonical.com>
12 years agoCreate unique volumes_dir for testing.
Dan Prince [Tue, 7 Aug 2012 20:25:52 +0000 (16:25 -0400)]
Create unique volumes_dir for testing.

Updates test_volume.py so that we create a uniq volumes_dir for testing.
This avoids polluting the source tree with fake volume UUID's when running
tests.

Change-Id: I3c37083915effec0eff7c8d9bfffb9f7674fe6f5

12 years agoMerge "Straight port of the NetApp driver updates from nova-volume to cinder."
Jenkins [Thu, 9 Aug 2012 21:33:28 +0000 (21:33 +0000)]
Merge "Straight port of the NetApp driver updates from nova-volume to cinder."

12 years agoMerge "Remove redundant 'availability_zone' config options."
Jenkins [Thu, 9 Aug 2012 17:34:50 +0000 (17:34 +0000)]
Merge "Remove redundant 'availability_zone' config options."

12 years agoMerge "Admin users should be restricted from seeing all snapshots by default."
Jenkins [Thu, 9 Aug 2012 17:33:21 +0000 (17:33 +0000)]
Merge "Admin users should be restricted from seeing all snapshots by default."

12 years agoRemove redundant 'availability_zone' config options.
Zhiteng Huang [Wed, 8 Aug 2012 16:41:28 +0000 (00:41 +0800)]
Remove redundant 'availability_zone' config options.

There are two availability_zone related config options now:
  node_availability_zone and storage_availability_zone
While volume API uses node_availability_zone, the scheduler uses
the other, which causes failure in scheduler when these two options
have different values.

This patch removes 'node_availability_zone' so that end user
can specify 'availability zone' when create volumes using
Simple scheduler.

Partially implement blueprint implement-availability-zones

Change-Id: Ia2f0710908495ec64dacd2ee9bd10d7f8cd415df

12 years agoStraight port of the NetApp driver updates from nova-volume to cinder.
Ben Swartzlander [Wed, 8 Aug 2012 18:27:44 +0000 (14:27 -0400)]
Straight port of the NetApp driver updates from nova-volume to cinder.

These changes were already accepted into nova-volume, and I have only
altered the exception classes to match the new cinder classes.

blueprint netapp-volume-driver

Change-Id: I0d59db64e00bc7e93223a24dabadbcbd0b290fb9

12 years agoMerge "Deprecate root_helper in favor of rootwrap_config"
Jenkins [Tue, 7 Aug 2012 23:49:59 +0000 (23:49 +0000)]
Merge "Deprecate root_helper in favor of rootwrap_config"

12 years agoUse volume driver specific execeptions.
Ronen Kat [Mon, 6 Aug 2012 07:11:10 +0000 (10:11 +0300)]
Use volume driver specific execeptions.

Change generic use of exception.Error in the cinder/volume directory
to specific exceptions. The exceptions used in this patch are:
exception.VolumeBackendAPIException
exception.InvalidInput
exception.InvalidVolume
exceptio.VolumeAtatched
Patch includes updates to the appropriate tests as well.

Change-Id: I10407ff3f5babe64e88f445d3529269b7665ee16

12 years agoMerge "Add persistent volumes for tgtd."
Jenkins [Tue, 7 Aug 2012 04:09:00 +0000 (04:09 +0000)]
Merge "Add persistent volumes for tgtd."

12 years agoMerge "Send 'create volume from snapshot' to the proper host"
Jenkins [Tue, 7 Aug 2012 03:50:25 +0000 (03:50 +0000)]
Merge "Send 'create volume from snapshot' to the proper host"

12 years agoAdmin users should be restricted from seeing all
jakedahn [Sun, 5 Aug 2012 21:32:07 +0000 (14:32 -0700)]
Admin users should be restricted from seeing all
snapshots by default.

  * Now to view all snapshots across all tenants you need
    to include the all_tenants=1 GET param in your api request.
  * Fixes remaining issues blocking bug #967882

Change-Id: I2a8338d77badc70201bb315198183f2091df43fb

12 years agoUse openstack.common.notifier.
Chmouel Boudjnah [Mon, 6 Aug 2012 08:25:31 +0000 (10:25 +0200)]
Use openstack.common.notifier.

- Update openstack.common.log to use it (and fixes #1030078 for cinder as
  well so we can get review I9d4251b4292188c0174ebac1dcd98318df44c0e3
  working).
- Don't use openstack.common.context but our own just yet.

Change-Id: I10feda623788a3b2418cad6bf55cbdb860ba8ee7

12 years agoAdmin users should be restricted from seeing all
jakedahn [Tue, 31 Jul 2012 23:35:26 +0000 (16:35 -0700)]
Admin users should be restricted from seeing all
volumes by default.

  * Now to view all volumes across all tenants you need
    to include the all_tenants=1 GET param in your api request.
  * Fixes remaining issues blocking bug #967882

Change-Id: Ie9d74e9c09fa0c192ab6257b5fb02d65b593cbfb

12 years agoDeprecate root_helper in favor of rootwrap_config
Thierry Carrez [Fri, 3 Aug 2012 13:35:03 +0000 (15:35 +0200)]
Deprecate root_helper in favor of rootwrap_config

Align with recent changes in nova-rootwrap by marking the
root_helper option deprecated and introduce usage of the
rootwrap_config option instead. The root_helper option will still
fully be supported in Folsom, but will be removed in Grizzly.

Transition notes: you should replace:
root_helper=sudo cinder-rootwrap /etc/cinder/rootwrap.conf

by:
rootwrap_config=/etc/cinder/rootwrap.conf

Change-Id: I22a6d2bdee6ad2c5ad587ceec574cec4b2887f22

12 years agoSend 'create volume from snapshot' to the proper host
ZhuRongze [Fri, 13 Jul 2012 12:07:13 +0000 (12:07 +0000)]
Send 'create volume from snapshot' to the proper host

A simple solution for bug 1008866. When creating volume from snapshot on
multicluster, in volume it will check if snapshot_id is set. If snapshot_id
is set, make the call create volume directly to the volume host where the
snapshot resides instead of passing it through the scheduler. So snapshot can
be copy to new volume.

Change-Id: Ie9c1a77f62abc40e294b1d0c604cf885652728da

12 years agoAdd persistent volumes for tgtd.
Chuck Short [Fri, 27 Jul 2012 17:05:55 +0000 (12:05 -0500)]
Add persistent volumes for tgtd.

Currently if you restart the server running nova-volume
or restart tgt, you will loose your iscsi targets that
have been created. This is not good.

In order for iscsi targets to be persistent across
reboots or restarts, one has to have the target's configuration
information in /etc/tgt/targets.conf or /etc/tgt/conf.d.
So when tgtd is restarted then the iscsi targets will be there
as expected.

This patch will add a configuration file to $state_path/volumes
when the volume is created. The configuration file is identified by
the volume uuid. It creates a logicalunit when the volume is created
as well. The iscsi target and configuration file
will be removed once the volume has been removed as well.

In order to use this, you have to include the following in
your /etc/tgt/targets.conf

include $state_path/volumes/*

For upgrades, it will just re-create the volumes
already in the volumes table.

Fixes LP: #1011159

Change-Id: Ib74dcc1efa0332842041b4c045ca5fa85d4a32ca
Signed-off-by: Chuck Short <chuck.short@canonical.com>
12 years agoMerge "Include AUTHORS file in MANIFEST.in"
Jenkins [Wed, 1 Aug 2012 18:40:04 +0000 (18:40 +0000)]
Merge "Include AUTHORS file in MANIFEST.in"

12 years agoMerge "Scheduler-clean-up"
Jenkins [Wed, 1 Aug 2012 18:40:01 +0000 (18:40 +0000)]
Merge "Scheduler-clean-up"

12 years agoMerge "Add authors for IBM Storwize and SVC driver."
Jenkins [Wed, 1 Aug 2012 18:40:00 +0000 (18:40 +0000)]
Merge "Add authors for IBM Storwize and SVC driver."

12 years agoScheduler-clean-up
ZhuRongze [Sat, 28 Jul 2012 08:14:03 +0000 (08:14 +0000)]
Scheduler-clean-up

Some instance related functions and opts were still present in Cinder
Scheduler.

Remove the functions and opts and modify some computer related comments.

Change-Id: Ia01099e66bcbb129493870dfbf212d5e6669ebe1

12 years agoInclude AUTHORS file in MANIFEST.in
Chmouel Boudjnah [Wed, 1 Aug 2012 07:05:24 +0000 (09:05 +0200)]
Include AUTHORS file in MANIFEST.in

Change-Id: I4b2ddeaaaa5f58eafd25cba6bd613c6fe477ad4d

12 years agoMerge "Include volume_metadata with object on vol create"
Jenkins [Wed, 1 Aug 2012 05:27:11 +0000 (05:27 +0000)]
Merge "Include volume_metadata with object on vol create"

12 years agoAdd authors for IBM Storwize and SVC driver.
Avishay Traeger [Tue, 31 Jul 2012 18:47:57 +0000 (21:47 +0300)]
Add authors for IBM Storwize and SVC driver.

Change-Id: I0d48dd6ce595e6bd9801478fc0b90bcb8fdf5947
Co-authored-by: Ronen Kat <ronenkat@il.ibm.com>
12 years agoMerge "Remove unused instance_name_template flag"
Jenkins [Tue, 31 Jul 2012 16:22:25 +0000 (16:22 +0000)]
Merge "Remove unused instance_name_template flag"

12 years agoDriver for IBM Storwize and SVC storage.
Avishay Traeger [Sun, 15 Jul 2012 12:53:36 +0000 (15:53 +0300)]
Driver for IBM Storwize and SVC storage.

Volume driver for IBM Storwize and SVC storage systems, along with unit
tests and updated sample config file. The unit tests include a
Storwize/SVC management simulator to allow for testing without
controller hardware. Also added a new exception for volume drivers.

Change-Id: Id7e3e79cd6e62fac4b10937b6f1b5f6bcb7908fe

12 years agoRemove unused instance_name_template flag
ZhuRongze [Sat, 28 Jul 2012 07:28:50 +0000 (07:28 +0000)]
Remove unused instance_name_template flag

Only used in nova/db/sqlalchemy/models

Change-Id: I1029848bb639402cad30c01b51630c0ddd9dd7b8

12 years agoAllow XML payload for volume creation.
Eoghan Glynn [Mon, 30 Jul 2012 15:11:18 +0000 (16:11 +0100)]
Allow XML payload for volume creation.

Fixes cinder aspect of LP 1030330

Tolerate volume size attribute of type string as opposed to int.

Change-Id: I8d300a6c23c2e4e92187e26260ce49da35590545

12 years agoInclude volume_metadata with object on vol create
John Griffith [Sat, 28 Jul 2012 04:30:47 +0000 (22:30 -0600)]
Include volume_metadata with object on vol create

Fix for Bug 1029762

The symptom of this bug is that the response data of an
OSAPI create call always shows and empty dict for volume_metadata
regardless of what was passed in to created and actually used.

Upon the db create_volume call a reference to the volume
object is all that was being returned.  Since metadata is
specified and set, it should also be returned with the
create reference object.

This will result in the the osapi create call returning
a body with correct metdata info rather than always showing
and empty dict as it was previously.

Change-Id: I9ae9c737bd2aa5bfa14c19fe8b8b2a7a5aa4d43a

12 years agoTrim volume type representation.
Eoghan Glynn [Thu, 26 Jul 2012 16:26:55 +0000 (16:26 +0000)]
Trim volume type representation.

Fixes cinder aspect of LP 1027281.

Use view builder pattern to only include non-extraneous
volume type attributes in the representation.

Change-Id: I33f1b579fd6ed4ed98fa04e9148e91eca125213e

12 years agoMerge "Don't do PEP8 test for openstack-common code."
Jenkins [Tue, 24 Jul 2012 23:25:38 +0000 (23:25 +0000)]
Merge "Don't do PEP8 test for openstack-common code."

12 years agoMerge "Cleanup unused code in servce.py"
Jenkins [Tue, 24 Jul 2012 23:20:41 +0000 (23:20 +0000)]
Merge "Cleanup unused code in servce.py"

12 years agoPort nova-rootwrap changes to cinder-rootwrap
Thierry Carrez [Mon, 23 Jul 2012 14:21:28 +0000 (16:21 +0200)]
Port nova-rootwrap changes to cinder-rootwrap

Port recent nova-rootwrap changes to cinder-rootwrap, including:
* Move filter definition from Python module to configuration files
* Fix tests execution on Fedora (bug 1027814)
* Remove executable bit on cinder/rootwrap files

This certainly needs a matching change to devstack to pass gating.

Change-Id: I963bc7890ba285ae515ea61bbd960bd2523f9061

12 years agoDon't do PEP8 test for openstack-common code.
Zhiteng Huang [Mon, 23 Jul 2012 06:39:48 +0000 (14:39 +0800)]
Don't do PEP8 test for openstack-common code.

Pep8 test reports issue on openstack-common modules, which would
fail CI test. Pep8 test should skip openstack-common and assuming
they are problem-free code. Even it's not, bug/fix should go to
openstack-common first, then resync back to Cinder.  Therefore,
Cinder should skip pep8 test for openstack-common code.

Fix bug #1027774

Change-Id: I22c45542401022a6bad9f2320e8657f972915f69

12 years agoCleanup unused code in servce.py
Zhiteng Huang [Mon, 23 Jul 2012 03:17:26 +0000 (11:17 +0800)]
Cleanup unused code in servce.py

Remove unused code in Service() class which is meant to be used
by 'nova-compute'.

Change-Id: Iadd58914c7fb7a581f9878880908aabcfa5733d6
Signed-off-by: zhiteng.huang@intel.com
12 years agoUse openstack.common.setup.
Chmouel Boudjnah [Fri, 20 Jul 2012 12:26:18 +0000 (12:26 +0000)]
Use openstack.common.setup.

- Remove Authors and add it to .gitignore since this is now auto
  generated.

Change-Id: I513b362a0ea8aca9cf5e06807834316b46a5f430

12 years agoMerge "Remove unused fake memcache client"
Jenkins [Fri, 20 Jul 2012 16:41:01 +0000 (16:41 +0000)]
Merge "Remove unused fake memcache client"

12 years agoutils module is still being used by cinder-volume service
Mike Perez [Fri, 20 Jul 2012 15:59:40 +0000 (08:59 -0700)]
utils module is still being used by cinder-volume service

bug 1026949

Change-Id: I7327d94b5a9f35bc74e179a05976d511c6642a7a

12 years agoMerge "Use openstack.common.log for logging."
Jenkins [Fri, 20 Jul 2012 15:08:03 +0000 (15:08 +0000)]
Merge "Use openstack.common.log for logging."

12 years agoMerge "Remove unused check_snapshots_enabled"
Jenkins [Fri, 20 Jul 2012 15:06:36 +0000 (15:06 +0000)]
Merge "Remove unused check_snapshots_enabled"

12 years agoRemove unused fake memcache client
Mark McLoughlin [Tue, 17 Jul 2012 02:58:01 +0000 (03:58 +0100)]
Remove unused fake memcache client

Used by the consoleauth service and the EC2 and metadata APIs in Nova.

Change-Id: I3048d9ab7b1d30eff583e15044c5a7bf74d52a3c

12 years agoRemove unused check_snapshots_enabled
Mark McLoughlin [Tue, 17 Jul 2012 03:15:32 +0000 (04:15 +0100)]
Remove unused check_snapshots_enabled

Only used in Nova by the createImage action.

Change-Id: I114281fd553020ac96c499c18ff3e4a2a626c3b2

12 years agoUse openstack.common.log for logging.
Chmouel Boudjnah [Fri, 20 Jul 2012 10:53:41 +0000 (10:53 +0000)]
Use openstack.common.log for logging.

- We are not using openstack.common.notifier just yet so handedit
  openstack.common.log to use cinder.notifier now.

Change-Id: I9d912904c53a8ef5d90b4ab5792f5577701b6817

12 years agoDon't create volumes if an incorrect size was given
Mike Perez [Fri, 20 Jul 2012 06:35:32 +0000 (23:35 -0700)]
Don't create volumes if an incorrect size was given

bug 1006875

Change-Id: Ied4c6f6d03c0a70838e1e483d69f3ed1ec08a9b5

12 years agoMerge "Remove some unused helper scripts"
Jenkins [Thu, 19 Jul 2012 17:03:09 +0000 (17:03 +0000)]
Merge "Remove some unused helper scripts"

12 years agoMerge changes I4e00ca81,I223aca1a
Jenkins [Thu, 19 Jul 2012 16:57:18 +0000 (16:57 +0000)]
Merge changes I4e00ca81,I223aca1a

* changes:
  Remove unused get_{id,version}_from_href()
  Remove unused metadata serialization

12 years agoMerge "Remove unused OverLimitFault"
Jenkins [Thu, 19 Jul 2012 16:56:14 +0000 (16:56 +0000)]
Merge "Remove unused OverLimitFault"

12 years agoMerge "Remove unused wrap_errors decorator"
Jenkins [Thu, 19 Jul 2012 16:54:48 +0000 (16:54 +0000)]
Merge "Remove unused wrap_errors decorator"

12 years agoMerge "Remove unused raise_http_conflict_for_instance_invalid_state()"
Jenkins [Thu, 19 Jul 2012 16:53:43 +0000 (16:53 +0000)]
Merge "Remove unused raise_http_conflict_for_instance_invalid_state()"

12 years agoMerge "Remove unused enabled_apis flag"
Jenkins [Thu, 19 Jul 2012 16:52:28 +0000 (16:52 +0000)]
Merge "Remove unused enabled_apis flag"

12 years agoUse rpc from openstack-common.
Russell Bryant [Wed, 13 Jun 2012 14:48:54 +0000 (10:48 -0400)]
Use rpc from openstack-common.

Final patch for blueprint common-rpc.

This patch removes cinder.rpc in favor of the copy in openstack-common.

Change-Id: I9c2f6bdbe8cd0c44417f75284131dbf3c126d1dd

12 years agoAdd missing gettextutils from openstack-common.
Russell Bryant [Mon, 2 Jul 2012 15:30:10 +0000 (11:30 -0400)]
Add missing gettextutils from openstack-common.

This patch adds gettextutils from openstack-common to cinder.  It is used
by rpc, so some parts of rpc are broken without this patch.

Change-Id: I0830319f4e2011b87180abcc24354c935bea8d16

12 years agoUse save_and_reraise_exception() from common.
Russell Bryant [Tue, 1 May 2012 21:31:26 +0000 (17:31 -0400)]
Use save_and_reraise_exception() from common.

This patch common.excutils from openstack-common, which includes
save_and_reraise_exception().  The patch also converts the code
base to use it from there instead of cinder.utils and then removes
it from cinder.utils.

The initial motivation for this was removing another cinder dependency
from cinder.rpc so that it can eventually be moved to openstack-common.

Change-Id: I7354ca51a02aec9c709cf33f77d4abc46acc2742

12 years agoUse openstack.common.cfg.CONF.
Russell Bryant [Fri, 1 Jun 2012 18:42:32 +0000 (14:42 -0400)]
Use openstack.common.cfg.CONF.

Part of blueprint common-rpc.

This patch makes the rpc code use the global config object from
openstack-common.  Based on some recent discussions on the mailing list,
this may not be the final way configuration handling is done here, but
it is certainly better than the register_opts() hack that is removed by
this patch.

Change-Id: Id128126e0bc064a2a1c710c6bd32fb3d137dc7f6

12 years agoRemove cinder.log usage from cinder.rpc.
Russell Bryant [Sun, 27 May 2012 00:42:09 +0000 (20:42 -0400)]
Remove cinder.log usage from cinder.rpc.

Part of blueprint common-rpc.

This patch removes the usage of cinder.log from cinder.rpc.  This is
necessary before cinder.rpc can be moved to openstack-common.  The rpc
logging was not using any of the extra features provided in cinder.log as
far as I can tell, so the changes are very simple.

This is the final dependency.  After this change, the rpc code
can be moved to openstack-common without any changes.

Change-Id: I17ca4b691bb8d4f18e618632a2381dd12d31852a

12 years agoRemove cinder.context dependency from cinder.rpc
Russell Bryant [Fri, 25 May 2012 20:24:03 +0000 (16:24 -0400)]
Remove cinder.context dependency from cinder.rpc

Part of blueprint common-rpc.

This patch removes the usage of cinder.context from cinder.rpc.  Everything
needed to implement RpcContext now exists within cinder.rpc.

Change-Id: I9e6ec0d22e55d3d4f38e12e0fdd2df745da496f5

12 years agoLocalize rpc options to rpc code.
Russell Bryant [Fri, 25 May 2012 18:13:34 +0000 (14:13 -0400)]
Localize rpc options to rpc code.

Part of blueprint common-rpc.

Move rpc options from cinder.flags into cinder.rpc code.  This is necessary
before the rpc code can be moved to openstack-common.

Change-Id: I474c3660e1cbd3ab663571b1e088c84deb905e0b

12 years agoAdd version to scheduler rpc API.
Russell Bryant [Wed, 16 May 2012 20:40:05 +0000 (16:40 -0400)]
Add version to scheduler rpc API.

Part of blueprint versioned-rpc-apis.

One side effect of this change was that cinder.scheduler.api was removed
in favor of cinder.scheduler.rpcapi.  In this case, the api was just a
direct wrapper around rpc usage.  For other APIs, I've been following
the pattern that the rpcapi module provides the rpc client wrapper, and
if any other client-side logic is needed, that's where an api module is
used.

Change-Id: Ibd0292936f9afc77aeb5d040660bfa857861eed1

12 years agoSync cfg and iniparser from openstack-common.
Russell Bryant [Mon, 16 Jul 2012 20:24:02 +0000 (21:24 +0100)]
Sync cfg and iniparser from openstack-common.

Cherry picks af387b9cb6bf34 and c6c29ab from Nova.

This change pulls in the latest version of the cfg module from
openstack-common includes some formatting changes, spelling fixes,
support for bol/eol spaces in values and support for deprecated
options.

Change-Id: I58c7b2100b594f5f261c089d674f449a1a7d067b

12 years agoUse cfg's new global CONF object
Mark McLoughlin [Mon, 16 Jul 2012 20:19:55 +0000 (21:19 +0100)]
Use cfg's new global CONF object

Cherry picks 00786bc from Nova.

Implements blueprint cfg-global-object

Replace cinder.flags.FLAGS with openstack.common.cfg.CONF.

In future, we can do a s/FLAGS/CONF/ across the codebase.

Change-Id: If213a4a5da1faf96aac82f34b18d1e0b061495c0

12 years agoMake use of openstack.common.jsonutils.
Russell Bryant [Tue, 17 Jul 2012 04:10:29 +0000 (05:10 +0100)]
Make use of openstack.common.jsonutils.

This patch imports jsonutils from openstack-common.  It removes the
equivalent code from cinder.utils and then converts the code base to use
jsonutils.  The primary motivator for this change was to remove the rest
of the dependencies from cinder.rpc on cinder.utils.

Change-Id: I4b16577f774194a628bf84d5352e63ec1f868698

12 years agoSync with latest version of openstack.common.cfg
Mark McLoughlin [Mon, 16 Jul 2012 20:00:15 +0000 (21:00 +0100)]
Sync with latest version of openstack.common.cfg

Cherry picks c1bf456 from Nova.

Changes since last sync:

 - Alphabetize imports in openstack/common/cfg.py
 - make reset() clear defaults and overrides
 - automatically create option groups
 - allow options to be marked as required
 - use a list comprehension instead of map()

Change-Id: Ie17fe855a75b5021b031902aa86031d8ddc06dfd
Reviewed-on: https://review.openstack.org/9867
Approved: James E. Blair <corvus@inaugust.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Tested-by: James E. Blair <corvus@inaugust.com>
12 years agoConvert Cinder to use openstack-common jsonutils.
Zhiteng Huang [Tue, 17 Jul 2012 07:11:26 +0000 (15:11 +0800)]
Convert Cinder to use openstack-common jsonutils.

This patch replaces json handling code in Cinder with openstack-common
jsonutils.  Also remove some unused imports.

Implement blueprint cinder-common-jsonutils

Change-Id: I28c1a095823c2f04f30c32724144297a2d67fba4
Reviewed-on: https://review.openstack.org/9912
Reviewed-by: Mark McLoughlin <markmc@redhat.com>
Reviewed-by: Vish Ishaya <vishvananda@gmail.com>
Approved: John Griffith <john.griffith@solidfire.com>
Tested-by: Jenkins
12 years agoAdd missing ack to impl_qpid.
Russell Bryant [Tue, 12 Jun 2012 21:07:18 +0000 (17:07 -0400)]
Add missing ack to impl_qpid.

Fix bug 1012374.

Johannes Erdfelt pointed out that impl_qpid wasn't acking messages that
it received.  This turned out to be a nasty oversight, resulting in
unbounded message queue growth inside of the python-qpid library.  This
fixes it.

Change-Id: I0370293807f0282e1dbdd59246f70be031e888a9
Reviewed-on: https://review.openstack.org/9908
Reviewed-by: Vish Ishaya <vishvananda@gmail.com>
Approved: John Griffith <john.griffith@solidfire.com>
Tested-by: Jenkins
12 years agoMove queue_get_for() from db to rpc.
Russell Bryant [Tue, 29 May 2012 20:35:35 +0000 (16:35 -0400)]
Move queue_get_for() from db to rpc.

Part of blueprint common-rpc.

The function queue_get_for() is a utility function used by various
consumers of the rpc API.  This function lived in the db API, but never
ended up using anything from the database.  This patch moves it into the
rpc API so that it can be used by other users of rpc once it moves into
openstack-common.

Change-Id: If92675beecff5471b416a929c161b810e3c71939
Reviewed-on: https://review.openstack.org/9906
Reviewed-by: Vish Ishaya <vishvananda@gmail.com>
Approved: John Griffith <john.griffith@solidfire.com>
Tested-by: Jenkins
12 years agoAdd base support for rpc API versioning.
Russell Bryant [Mon, 7 May 2012 18:10:29 +0000 (14:10 -0400)]
Add base support for rpc API versioning.

Part of blueprint versioned-rpc-apis.

This commit includes the base support for versioned RPC APIs.  It
introduces the RpcProxy and RpcDispatcher classes that have common code
for handling versioning on the client and server sides, respectively.

RPC APIs will be converted one at a time using this infrastructure.

Change-Id: I07bd82e9ff60c356123950e466caaffdfce79eba
Reviewed-on: https://review.openstack.org/9901
Reviewed-by: Huang Zhiteng <zhiteng.huang@intel.com>
Reviewed-by: Vish Ishaya <vishvananda@gmail.com>
Approved: John Griffith <john.griffith@solidfire.com>
Tested-by: Jenkins
12 years agoMake kombu support optional for running unit tests.
Russell Bryant [Wed, 2 May 2012 16:14:56 +0000 (12:14 -0400)]
Make kombu support optional for running unit tests.

Fix bug 838386.

Previously, the unit tests required kombu to be installed to run.  This
patch makes it so the unit tests will still complete successfully, even
if kombu is not installed.

Change-Id: I06831a37f8c857bbfd0bce1b1c3aeda7d341a589
Reviewed-on: https://review.openstack.org/9900
Reviewed-by: Vish Ishaya <vishvananda@gmail.com>
Approved: John Griffith <john.griffith@solidfire.com>
Tested-by: Jenkins
12 years agoStop using cinder.exception from cinder.rpc.
Russell Bryant [Tue, 15 May 2012 18:43:18 +0000 (14:43 -0400)]
Stop using cinder.exception from cinder.rpc.

This patch is a part of continuing to remove dependencies from cinder.rpc
on the rest of cinder.  One RPC related exception was defined in
cinder.exception, so that was moved to cinder.rpc.common where the rest of
them live.  These exceptions were changed to no longer use CinderException
as their base.  Instead, there is a new RPCException base.

One other change that should be reviewed closely is the removal of using
cinder.exception.wrap_exception() in cinder.rpc.amqp.  As far as I can tell,
this didn't actually do anything since nothing was being passed in to
wrap_exception().

Change-Id: I36ff7c05ab0467ad8506b56d561c532eadf8dff8
Reviewed-on: https://review.openstack.org/9899
Reviewed-by: Vish Ishaya <vishvananda@gmail.com>
Approved: John Griffith <john.griffith@solidfire.com>
Tested-by: Jenkins
12 years agoRemove unused synchronization decorator
Mark McLoughlin [Tue, 17 Jul 2012 03:28:02 +0000 (04:28 +0100)]
Remove unused synchronization decorator

This is only used on the compute and network side in Nova.

Change-Id: I6211c32f585b1b5ff66d1a7a5f65dd25857d76f0
Reviewed-on: https://review.openstack.org/9888
Reviewed-by: Vish Ishaya <vishvananda@gmail.com>
Approved: John Griffith <john.griffith@solidfire.com>
Tested-by: Jenkins
12 years agoRemove 'cinder-manage config convert'
Mark McLoughlin [Mon, 16 Jul 2012 20:30:15 +0000 (21:30 +0100)]
Remove 'cinder-manage config convert'

This convers the old flagfile style config files into the the
new .ini style config files. Since Cinder is new and it's first
release will only support .ini style files there's no need for
such a command.

Change-Id: Ie2f4cd8b6f5fc66547a59d39aa3d5eb896b1ddf4
Reviewed-on: https://review.openstack.org/9871
Reviewed-by: Huang Zhiteng <zhiteng.huang@intel.com>
Reviewed-by: Vish Ishaya <vishvananda@gmail.com>
Approved: John Griffith <john.griffith@solidfire.com>
Tested-by: Jenkins
12 years agoUse cfg's new behavior of reset() clearing overrides
Mark McLoughlin [Mon, 16 Jul 2012 20:10:17 +0000 (21:10 +0100)]
Use cfg's new behavior of reset() clearing overrides

Cherry-picks b858108 from Nova.

Change-Id: I5e14dea25afd5bff03a39671b2d3b85481977bec
Reviewed-on: https://review.openstack.org/9868
Reviewed-by: Huang Zhiteng <zhiteng.huang@intel.com>
Reviewed-by: Vish Ishaya <vishvananda@gmail.com>
Approved: John Griffith <john.griffith@solidfire.com>
Tested-by: Jenkins
12 years agoMerge changes Id5a0ffab,If283dd7c,I1a11e8fd
Jenkins [Thu, 19 Jul 2012 08:11:23 +0000 (08:11 +0000)]
Merge changes Id5a0ffab,If283dd7c,I1a11e8fd

* changes:
  Remove old flagfile support
  Misused and not used config options
  Pass 'cinder' project into ConfigOpts

12 years agoMerge "Convert Cinder to use openstack-common timeutils"
Jenkins [Wed, 18 Jul 2012 17:32:54 +0000 (17:32 +0000)]
Merge "Convert Cinder to use openstack-common timeutils"

12 years agoRemove unused enabled_apis flag
Mark McLoughlin [Tue, 17 Jul 2012 03:35:28 +0000 (04:35 +0100)]
Remove unused enabled_apis flag

This is only useful in the context of Nova where there are multiple
APIs.

Change-Id: I2339a36b45166a24825882e3e35dd00a2dfb6b27

12 years agoRemove some unused helper scripts
Mark McLoughlin [Tue, 17 Jul 2012 03:33:17 +0000 (04:33 +0100)]
Remove some unused helper scripts

openstack-config init script and clean-vlans scripts are only relevant
to nova.

Change-Id: Ib139cae1e0f157f69f7d9ae7186c555538e4b1f5

12 years agoRemove unused wrap_errors decorator
Mark McLoughlin [Tue, 17 Jul 2012 03:18:40 +0000 (04:18 +0100)]
Remove unused wrap_errors decorator

Only used by rescue extension in nova.

Change-Id: I3ade99405736bf8ffb8891a8d53c02905501ae44

12 years agoRemove unused get_{id,version}_from_href()
Mark McLoughlin [Tue, 17 Jul 2012 03:10:18 +0000 (04:10 +0100)]
Remove unused get_{id,version}_from_href()

The former is only used in the compute API in Nova to e.g. get
an image or flavor ID from a client supplied ref.

The latter is unused even in Nova since the removal of the 1.0
API.

Change-Id: I4e00ca816820cb51c0ab3d4d864766d981854939

12 years agoRemove unused metadata serialization
Mark McLoughlin [Tue, 17 Jul 2012 03:06:19 +0000 (04:06 +0100)]
Remove unused metadata serialization

Only used by the compute API in Nova for e.g. images and server
metadata.

Change-Id: I223aca1a1c8e35c9339107e5c11bdd8a39968681

12 years agoRemove unused raise_http_conflict_for_instance_invalid_state()
Mark McLoughlin [Tue, 17 Jul 2012 03:04:58 +0000 (04:04 +0100)]
Remove unused raise_http_conflict_for_instance_invalid_state()

Only used by the compute API in Nova.

Change-Id: I3b2dfa33b4bd1523e13ddb5401bc0397df7466ef

12 years agoRemove unused OverLimitFault
Mark McLoughlin [Tue, 17 Jul 2012 03:00:51 +0000 (04:00 +0100)]
Remove unused OverLimitFault

Only used by compute limits in Nova.

Change-Id: I065ca64e060acc0773189f1497fcc54041621f39

12 years agoRemove old flagfile support
Ghe Rivero [Mon, 16 Jul 2012 19:31:51 +0000 (20:31 +0100)]
Remove old flagfile support

Cherry-picks 7e3e9b8 from Nova.

Change-Id: Id5a0ffabf7c6eab0bbda1b130a39a6581b26e350

12 years agoMisused and not used config options
Zhongyue Luo [Mon, 16 Jul 2012 19:37:54 +0000 (20:37 +0100)]
Misused and not used config options

Cherry picks dc9c3cb from Nova.

Fixes bug #1000071

[nova.api.sizelimit.py]
osapi_max_request_body_size: BoolOpt -> IntOpt

[nova.rpc.__init__.py]
allowed_rpc_exception_modules: IntOpt -> ListOpt

[nova.volume.driver.py]
num_shell_tries: StrOpt -> IntOpt
num_iscsi_scan_tries: StrOpt -> IntOpt

[nova.volume.driver.py]
san_thin_provision: 'true' -> True
san_is_local: 'false' -> False

Change-Id: If283dd7c4feba69c07bd483acd14f45c2659b743

12 years agoPass 'cinder' project into ConfigOpts
Rick Harris [Mon, 16 Jul 2012 19:33:45 +0000 (20:33 +0100)]
Pass 'cinder' project into ConfigOpts

Cherry-picks fb96f7d from Nova.

Change-Id: I1a11e8fd6a56b2336457f7df178c2b3c187246c3

12 years agoSync to newer openstack.common.cfg
Mark McLoughlin [Mon, 16 Jul 2012 19:48:02 +0000 (20:48 +0100)]
Sync to newer openstack.common.cfg

Cherry picks e0d891e from Nova.

Changes since last sync are:

 * New ConfigOpts.find_file() for locating conf files
 * Support for directory source of config files
 * Provide file extension when when looking for files
 * Some refactoring of the cfg cache
 * Add caching to openstack.common.cfg

Change-Id: If9852d0431093d590252bb704e934a4a56ef0263

12 years agoConvert Cinder to use openstack-common timeutils
Zhiteng Huang [Fri, 13 Jul 2012 05:58:25 +0000 (13:58 +0800)]
Convert Cinder to use openstack-common timeutils

This patch is part of effort to get Cinder to use openstack-common
package.  This part is to replace time related functions in utils.py
with 'timeutils' module.

Implement blueprint cinder-common-timeutils

Change-Id: Ic5e9e317a95a7399f0604823eec76b3642a0c1b1

12 years agoMerge "Updated HpSanISCSIDriver to use initialize/terminate methods."
Jenkins [Thu, 12 Jul 2012 20:03:42 +0000 (20:03 +0000)]
Merge "Updated HpSanISCSIDriver to use initialize/terminate methods."

12 years agoDo not duplicate nova docs in cinder
John Griffith [Thu, 12 Jul 2012 15:01:14 +0000 (09:01 -0600)]
Do not duplicate nova docs in cinder

* This modifies the index.rst file to give interim info about cinder
* We were regenerating the nova docs copied over which was bad!
* Fixes bug 1022315

Change-Id: I46531976f3e6521cec69cc13276d328d6c2d2da3

12 years agoRemove unused db api methods
John Griffith [Sat, 7 Jul 2012 00:28:53 +0000 (18:28 -0600)]
Remove unused db api methods

  * Implements cinder blueprint remove-extra-dbapi-methods
  * Related to cinder initial-db-cleanup:
      Remove db api methods associated with removed tables
  Modify/Remove tests associated with removed tables
  Remove non-existing db API calls from volume/api

Change-Id: I60e0c6ffad9c78a29d56a27a04e9ec5ebaa1f251

12 years agoCreate single initial Cinder DB migration file
John Griffith [Tue, 3 Jul 2012 22:40:15 +0000 (16:40 -0600)]
Create single initial Cinder DB migration file

 * Implements blueprint initial-db-cleanup
 * Sets initial migration
 * Removes unused tables that were brought in from nova
 * Condenses db migrations into the single initial migration/creation
 * Add explicit mysql set InnoDB in UTF8 loop
 * Folow up patches include:
 *    Remove unused db API calls
 *    Fix/Remove affected tests

Change-Id: If24b00747dbbff7037b7aca39602d5f0b1c6aa50

12 years agoUpdated HpSanISCSIDriver to use initialize/terminate methods.
Zhiteng Huang [Thu, 5 Jul 2012 07:08:34 +0000 (15:08 +0800)]
Updated HpSanISCSIDriver to use initialize/terminate methods.

This is based on Nirmal Ranganathan's patch for Nova-volume, which
added a new key 'host' for initialize/terminate volume connection
information in nova to fix bug 992729.

HpSanISCSIDriver should adopt the change in order to work properly.
Also added missing unit tests for the HpSanISCSIDriver.

Fixes bug 992729.

Change-Id: I9584811a340799161d8c9ae88b1def282380c9ad
Signed-off-by: Zhiteng Huang <zhiteng.huang@intel.com>
12 years agoPruned Authors file to active contributors (from nova-volumes).
Christopher MacGown [Wed, 4 Jul 2012 00:49:16 +0000 (17:49 -0700)]
Pruned Authors file to active contributors (from nova-volumes).

Active contributors was fetched from git blame output, for files
inside the nova/nova/volumes folder in nova.

Change-Id: I8cc63975bf1160ca76badc54fd4d51077873dfee

12 years agoMove nova-manage.rst to cinder-manage.rst.
Clark Boylan [Mon, 2 Jul 2012 21:17:31 +0000 (14:17 -0700)]
Move nova-manage.rst to cinder-manage.rst.

Cinder docs were not building because sphinx was looking for
cinder-manage.rst which did not exist. The file was simply misnamed
and renaming it to cinder-manage.rst allows the docs to build.

Change-Id: I68f4ed81230cc277a96bb34dfa172e5ce7788ac4

12 years agoAdd action extensions to support nova integration.
John Griffith [Wed, 13 Jun 2012 18:38:35 +0000 (12:38 -0600)]
Add action extensions to support nova integration.

 * Adds VolumeActions extension to support key functions
    described in blueprint volume-decoupling
 * Adds snapshot translations to APIs
 * Should be back in sync with 7992
 * blueprint compat-extensions
 * sleepsonthefloor: Moved added snapshot attributes to extension, added tests
 * sleepsonthefloor: Lock pep8==1.1 in tox.ini

Change-Id: I9c6118cd434ca8b275d2386546923f932420b975

12 years agoMerge "Revert "Add action extensions to support nova integration.""
Jenkins [Wed, 13 Jun 2012 18:23:58 +0000 (18:23 +0000)]
Merge "Revert "Add action extensions to support nova integration.""

12 years agoRevert "Add action extensions to support nova integration."
John Griffith [Wed, 13 Jun 2012 17:51:37 +0000 (17:51 +0000)]
Revert "Add action extensions to support nova integration."

This reverts commit 8d8903f466cd7d4270e46ad896817fe94c99b575

12 years agoMerge "Add action extensions to support nova integration."
Jenkins [Tue, 12 Jun 2012 04:26:40 +0000 (04:26 +0000)]
Merge "Add action extensions to support nova integration."