]> review.fuel-infra Code Review - openstack-build/cinder-build.git/log
openstack-build/cinder-build.git
12 years agoLog the body of an /action
Derrick J. Wippler [Fri, 19 Oct 2012 14:53:18 +0000 (14:53 +0000)]
Log the body of an /action

The inability to deduce an /action request from the logs
makes diagnosing integration with nova difficult. This change
logs the action method and arguments

Change-Id: Iea4f46c7da9c61e07aa23e897b60992b8fdb6663

12 years agoAdd VolumeHostAttribute API extension
Brian Waldon [Sat, 27 Oct 2012 22:36:30 +0000 (15:36 -0700)]
Add VolumeHostAttribute API extension

Expose the host on which a volume resides through a new API
extension. This is only presented to Admins by default. This
can be controlled with the 'volume_host_attribute' policy
rule.

Fixes bug 1035350.

Change-Id: I0a74a0dfbd78e853219150fbe0d3fba77c6f9bb6

12 years agoAdd default volume type flag
Zhiteng Huang [Wed, 3 Oct 2012 09:10:57 +0000 (17:10 +0800)]
Add default volume type flag

Where using volume type scheduler, 'volume type' is an essential input for
scheduler to perform sophysticated scheduling.  This patch adds a new
flag 'default_volume_type to allow admin to set one volume type as the
default type for volume creation if user doesn't specify any.

Also add more clear 404 message to API if create request provided non-existing
volume type.

Note: Setting the 'default_volume_type' flag to non-existing volume type
is problematic and should be avoided, and the outcome of such behavior is
equivlant to setting default volume type to None.

This is part of patch set implementing 'volume-type-scheduler'.

Change-Id: Ib2b2bbdc9bc96ab097cca2821c9aef04c65c2857

12 years agoFix typo so setting volume_tmp_dir works
Josh Durgin [Thu, 25 Oct 2012 23:14:07 +0000 (16:14 -0700)]
Fix typo so setting volume_tmp_dir works

This can be controlled by environment variables without setting
volume_tmp_dir as well, so there's an easy workaround for
Folsom.

Fixes LP bug #1071536
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
Change-Id: I50996c7c7a870d8e2bab1d3f44fd4d15b8ced6a6

12 years agoRollback for resources during volume creation failure
Rongze Zhu [Tue, 23 Oct 2012 12:12:30 +0000 (12:12 +0000)]
Rollback for resources during volume creation failure

Fixes bug #1070258

Add a single QUOTAS.rollback for all exceptions. Ensure that no stale
"reservations" are left in place after a failed volume creation.

Change-Id: Iedb193b213b8ee700a5765278ac4d00dac66d53a

12 years agoMerge "Drop unused quota_usage db methods"
Jenkins [Wed, 24 Oct 2012 17:52:45 +0000 (17:52 +0000)]
Merge "Drop unused quota_usage db methods"

12 years agoMerge "Update HACKING.rst and related changes from Nova/PEP8."
Jenkins [Wed, 24 Oct 2012 17:22:53 +0000 (17:22 +0000)]
Merge "Update HACKING.rst and related changes from Nova/PEP8."

12 years agoMerge "Adds support for Windows 2012 Storage Server blueprint windows2012driver https...
Jenkins [Wed, 24 Oct 2012 15:00:39 +0000 (15:00 +0000)]
Merge "Adds support for Windows 2012 Storage Server blueprint windows2012driver https://blueprints.launchpad.net/cinder/+spec/windows2012driver"

12 years agoAdd the generation of the username and password for iSCSI target.
Vincent Hou [Mon, 22 Oct 2012 05:50:56 +0000 (13:50 +0800)]
Add the generation of the username and password for iSCSI target.

When a volume is created, a pair of username and password is generated by the
driver for tgtadm and ietadm.

Implementation of bpiSCSI-CHAP.

Change-Id: I4f382a96ba4553158dc609e8caf9e70486e30603

12 years agoMerge "Add trove classifiers for PyPI"
Jenkins [Tue, 23 Oct 2012 01:17:19 +0000 (01:17 +0000)]
Merge "Add trove classifiers for PyPI"

12 years agoUpdate HACKING.rst and related changes from Nova/PEP8.
Eric Harney [Mon, 22 Oct 2012 22:37:11 +0000 (18:37 -0400)]
Update HACKING.rst and related changes from Nova/PEP8.

Sync up with changes made in Nova, this adds information
about line continuation (PEP8), OpenStack capitalization,
and commit messages.

Change-Id: Id6637307411bcc7a3637ac514c4ec34e26481e0d

12 years agoMerge "Ensure device node exists before wiping during volume deletion"
Jenkins [Mon, 22 Oct 2012 22:39:03 +0000 (22:39 +0000)]
Merge "Ensure device node exists before wiping during volume deletion"

12 years agoMerge "Update volume and snapshot status on delete"
Jenkins [Mon, 22 Oct 2012 22:37:53 +0000 (22:37 +0000)]
Merge "Update volume and snapshot status on delete"

12 years agoAdd trove classifiers for PyPI
Doug Hellmann [Mon, 22 Oct 2012 22:25:01 +0000 (18:25 -0400)]
Add trove classifiers for PyPI

Add classifiers so we can eventually register the project
on PyPI to reserve the name, even though we won't release
packages there.

Change-Id: I11fa429d34301ba9a1ec9a543f88d57eb3ac56bb
Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com>
12 years agoEnsure device node exists before wiping during volume deletion
Eric Harney [Mon, 22 Oct 2012 22:02:17 +0000 (18:02 -0400)]
Ensure device node exists before wiping during volume deletion

If the LVM device node is missing when a Cinder volume is deleted,
a large amount of data will be written to /dev/.  Check that the
device node exists before performing a _copy_volume('/dev/zero'...)
to wipe it.  Fixes bug 1070023.

Change-Id: I77a0a5545a54a4adc905a781ed8120db7adccc27

12 years agoUpdate volume and snapshot status on delete
Clay Gerrard [Mon, 22 Oct 2012 21:47:12 +0000 (16:47 -0500)]
Update volume and snapshot status on delete

Change the status of "deleting" resources at the same time we update boolean
flag for deleted.  Makes dumb queries looking for stuck statuses a little
easier.

Change-Id: Iaf3386526a369f9bf281eb4be42eb11277038c92

12 years agoDrop unused quota_usage db methods
Brian Waldon [Mon, 22 Oct 2012 21:37:26 +0000 (14:37 -0700)]
Drop unused quota_usage db methods

The quota_usage_update and quota_usage_destroy db methods are
not used anywhere - drop them.

Change-Id: Iaa23d1de1642ac7ec9ab4b4cbe119ec742346505

12 years agoDrop duplicate sqlalchemy db api methods
Brian Waldon [Mon, 22 Oct 2012 21:17:40 +0000 (14:17 -0700)]
Drop duplicate sqlalchemy db api methods

Several methods were redefined at the bottom of
cinder/db/sqlalchemy/api.py. They have been removed:
- quota_get
- quota_get_all_by_project
- quota_create
- quota_update
- quota_destroy
- quota_destroy_all_by_project
- quota_class_get
- quota_class_get_all_by_name
- quota_class_create
- quota_class_update
- quota_class_destroy
- quota_class_destroy_all_by_name
- quota_usage_get
- quota_usage_get_all_by_project
- quota_usage_create
- quota_usage_update
- quota_usage_destroy

Fix bug 1070033

Change-Id: I64b0b0045af7251853da97a8a8c4b2cb09b1dd53

12 years agoMerge "Update common."
Jenkins [Mon, 22 Oct 2012 19:11:22 +0000 (19:11 +0000)]
Merge "Update common."

12 years agoChange output strings to i18ned
Rongze Zhu [Mon, 22 Oct 2012 03:39:04 +0000 (03:39 +0000)]
Change output strings to i18ned

Fixes bug #1069601.

Ensure visible message in cinder-volume-usage-audit got through
translation.

Change-Id: I5c32ce3b2ef2541b8a5520ed53feaf8e00f43c9d

12 years agoAdds support for Windows 2012 Storage Server
Pedro Navarro Perez [Thu, 18 Oct 2012 20:44:59 +0000 (22:44 +0200)]
Adds support for Windows 2012 Storage Server
blueprint windows2012driver
https://blueprints.launchpad.net/cinder/+spec/windows2012driver

Change-Id: I3f7efb1b976fedc4afb736b87d550a34c330c839

12 years agoUpdate common.
Michael Still [Thu, 18 Oct 2012 18:43:12 +0000 (11:43 -0700)]
Update common.

policy.py is not updated as it causes test failures. I will investigate
that separately.

Change-Id: I9936137c1ab5b368ba6c3c35c423568b38bf913f

12 years agoFix incorrect class path for legacycinder formatter in logging_sample.conf
Cory Wright [Thu, 18 Oct 2012 15:00:41 +0000 (08:00 -0700)]
Fix incorrect class path for legacycinder formatter in logging_sample.conf

Change-Id: I313609f7b996650dfa2c804ebe964aa31549f5ea

12 years agoError message references incorrect variable
Eric Harney [Wed, 10 Oct 2012 14:38:22 +0000 (10:38 -0400)]
Error message references incorrect variable

In remove_iscsi_target() for the TgtAdm class, the "Failed to
create iscsi target for volume id:" message references a
variable that doesn't exist -- use the correct variable name.

Fixes bug 1065073.

Change-Id: I55acb0dd2ee368fdc62a0ded6280d7ef7cd8ab7f

12 years agoMerge "Configuration Options clean up"
Jenkins [Tue, 9 Oct 2012 02:32:13 +0000 (02:32 +0000)]
Merge "Configuration Options clean up"

12 years agoLoosen anyjson dependency to avoid clash with ceilometer
Eoghan Glynn [Thu, 27 Sep 2012 21:03:16 +0000 (22:03 +0100)]
Loosen anyjson dependency to avoid clash with ceilometer

Ceilometer depends on anyjson 0.3.1, whereas cinder requires
exacly 0.2.4.

The net effect is a devstack with ceilometer installed will
appear to work initially, as ceilometer is sparked up after
cinder. However, if any of the cinder services are subsequently
restarted, they fail with:

  pkg_resources.DistributionNotFound: anyjson==0.2.4

By simply allowing the cinder anyjson dependency version to
be greater than as opposed to an exact match, we can avoid
the clash.

Change-Id: I21737a2504705f15dd16e6762b44624678177442

12 years agoConfiguration Options clean up
Zhiteng Huang [Mon, 8 Oct 2012 07:36:39 +0000 (15:36 +0800)]
Configuration Options clean up

Small clean up of configuration options including:
 * unused config opts:
   - reclaim_instance_interval
 * rename 'instance' in config opts name/help message to 'volume'
   - 'instance_usage_audit_period' to 'volume_usage_audit_period'
   - help message of 'volume_name_template'

This change also re-generates cinder.conf.sample file.

Change-Id: I3d6c43cf56a5335b4bf768c51d65d76735213431

12 years agoMerge "Add snapshot force delete admin action"
Jenkins [Fri, 5 Oct 2012 18:16:35 +0000 (18:16 +0000)]
Merge "Add snapshot force delete admin action"

12 years agoMerge "Mock out sleep in some retry tests"
Jenkins [Fri, 5 Oct 2012 17:49:44 +0000 (17:49 +0000)]
Merge "Mock out sleep in some retry tests"

12 years agoFix typo in policy documentation
Julien Danjou [Fri, 5 Oct 2012 12:29:19 +0000 (14:29 +0200)]
Fix typo in policy documentation

Change-Id: I61df9dc9b752e1598f4a472771e581091f4de18f
Signed-off-by: Julien Danjou <julien@danjou.info>
12 years agoMerge "Use policy based rule to define context.is_admin"
Jenkins [Fri, 5 Oct 2012 04:32:15 +0000 (04:32 +0000)]
Merge "Use policy based rule to define context.is_admin"

12 years agoAdd snapshot force delete admin action
clayg [Thu, 4 Oct 2012 07:31:28 +0000 (02:31 -0500)]
Add snapshot force delete admin action

Change-Id: I289030cf0db42aa78cd2d8441d89610dad6cbeaa

12 years agoMock out sleep in some retry tests
Clay Gerrard [Wed, 3 Oct 2012 18:00:07 +0000 (13:00 -0500)]
Mock out sleep in some retry tests

Stub sleep in storwize tests
Stub sleep in glance tests

Change-Id: Ia935d561d104a4cd6373624208dedf5891b516e3

12 years agoMerge "Fix typo in sample configuration file"
Jenkins [Wed, 3 Oct 2012 17:29:41 +0000 (17:29 +0000)]
Merge "Fix typo in sample configuration file"

12 years agoMerge "Replace builtin hash with MD5 to solve 32/64-bit issues."
Jenkins [Wed, 3 Oct 2012 17:19:08 +0000 (17:19 +0000)]
Merge "Replace builtin hash with MD5 to solve 32/64-bit issues."

12 years agoMerge "Remove unused code: check_for_export."
Jenkins [Wed, 3 Oct 2012 17:15:11 +0000 (17:15 +0000)]
Merge "Remove unused code: check_for_export."

12 years agoMerge "Update distribute version in test requires."
Jenkins [Tue, 2 Oct 2012 22:58:34 +0000 (22:58 +0000)]
Merge "Update distribute version in test requires."

12 years agoUse policy based rule to define context.is_admin
Clay Gerrard [Mon, 1 Oct 2012 16:33:25 +0000 (11:33 -0500)]
Use policy based rule to define context.is_admin

When creating a context set is_admin based on policy instead of
hard coded requirement for a role named 'admin'.

Fixes: bug# 1053181
Change-Id: I9c05b8ecde887467557c4f01e074145b6a6372aa

12 years agoSync openstack common and add policy
Clay Gerrard [Fri, 28 Sep 2012 21:27:09 +0000 (16:27 -0500)]
Sync openstack common and add policy

openstack-common.conf now includes network_utils and policy

The default kombu imple for openstack.common.rpc seems to depends on
network_utils.

Fixes: bug #1058353
Change-Id: I2526c7355e7f2be67b25bf22854c56ec65741d9a

12 years agoFix typo in sample configuration file
Julien Danjou [Fri, 28 Sep 2012 09:49:46 +0000 (11:49 +0200)]
Fix typo in sample configuration file

Change-Id: I9f7f6c7c15969fe8cd701ac7580f33d173ea1375
Signed-off-by: Julien Danjou <julien@danjou.info>
12 years agoUpdate distribute version in test requires.
John Griffith [Fri, 28 Sep 2012 00:45:39 +0000 (18:45 -0600)]
Update distribute version in test requires.

Changes in openstack-infrastructure have upgraded version of distribute.
We should match this to keep things consistent.

CI systems are installing virtualenv>=1.8 which gives distribute
0.6.28, so we'll add that to our test-requires.

Change-Id: I44ad33fd0e96576379ee62a6f584f742e466ce74

12 years agoMerge "Fixes remove_export for IetAdm"
Jenkins [Tue, 25 Sep 2012 21:13:07 +0000 (21:13 +0000)]
Merge "Fixes remove_export for IetAdm"

12 years agoMerge "Fix NetAppCmodeISCSIDriver._get_lun_handle() method"
Jenkins [Tue, 25 Sep 2012 20:55:17 +0000 (20:55 +0000)]
Merge "Fix NetAppCmodeISCSIDriver._get_lun_handle() method"

12 years agoRevert explicit usage of tgt-adm --conf option.
Eoghan Glynn [Tue, 25 Sep 2012 14:52:38 +0000 (15:52 +0100)]
Revert explicit usage of tgt-adm --conf option.

Fixes bug 1056246.

This reverts commit 0903603971033536751ba40df98a3c39175d3189.

This ensures that we fail-fast if the tgtd configuration does
not include the directory for volume iscsi target configs,
instead of only blowing up when tgtd is restarted.

Change-Id: I30aa3f1d8944eb33cd4a42d65e227031023406b4

12 years agoFixes remove_export for IetAdm
MotoKen [Tue, 25 Sep 2012 05:08:34 +0000 (13:08 +0800)]
Fixes remove_export for IetAdm

* Corrects indentation.
* Uses specific iqn as keyword argument.

Fixes bug 1055401

Change-Id: Ie99dd8a34924f0d7f447cf41a305353659a51d11

12 years agoAdd missing entries in setup, fix up pip-requires
John Griffith [Mon, 24 Sep 2012 18:59:15 +0000 (12:59 -0600)]
Add missing entries in setup, fix up pip-requires

setup.py still has references to nova/compute and was missing some
requires statements, and more importantly didn't hvae the install_requires.

Also, tools/pip-requires needed lxml versions set, as well as
added the missing setuptools_git entry.

This was exposed when trying to run Grenade as the requires.txt
file was never generated.

Fixes bug #1055693

Change-Id: Iaf9669d66e89507989ef3fde630dc2b488a97cfc

12 years agoFix NetAppCmodeISCSIDriver._get_lun_handle() method
Ben Swartzlander [Mon, 24 Sep 2012 16:30:48 +0000 (12:30 -0400)]
Fix NetAppCmodeISCSIDriver._get_lun_handle() method

bug 1055578

Change-Id: I06da6a9a59fa2320f1cae9698e5e63562e534916

12 years agoMerge "Fix cinder-volume-usage-audit"
Jenkins [Fri, 21 Sep 2012 21:56:48 +0000 (21:56 +0000)]
Merge "Fix cinder-volume-usage-audit"

12 years agoRemove unused code: check_for_export.
Russell Bryant [Fri, 21 Sep 2012 18:51:17 +0000 (14:51 -0400)]
Remove unused code: check_for_export.

This code has been unused since cinder was split from nova.  It used to
be used as a safety check during live migration.  The check was removed
recently in nova, since it wasn't being used with Cinder anyway (just
nova-volumes).

An alternative approach would be to expose this from Cinder somehow if
we feel it's important, but until then, there's no reason to keep dead
code around.

Change-Id: I5adfb405c1bd04bcc1ad61d511afb227a198f4ed

12 years agoMerge "Return 400 if create volume snapshot force parameter is invalid"
Jenkins [Fri, 21 Sep 2012 17:23:25 +0000 (17:23 +0000)]
Merge "Return 400 if create volume snapshot force parameter is invalid"

12 years agoReturn 400 if create volume snapshot force parameter is invalid
Rongze Zhu [Wed, 12 Sep 2012 10:18:31 +0000 (10:18 +0000)]
Return 400 if create volume snapshot force parameter is invalid

Fixes bug #1014689

* Add is_valid_boolstr function in utils.py
* Add force parameter check in SnapshotsController.create()
* Add unittest for invalid force parameter.

Change-Id: I0f64326f33eb4fad1cf384bd825f56f09e935f40

12 years agoFix cinder-volume-usage-audit
Julien Danjou [Thu, 20 Sep 2012 16:37:36 +0000 (18:37 +0200)]
Fix cinder-volume-usage-audit

It seems many point in the internal API and openstack.common changed, but
this binary has been forgotten.

Also, context ie needed when using the notifier, so import it.

This fixes bug #1053502

Change-Id: I306b8671e7b0ed8c2ce2548a51a4c5e6393e13cb
Signed-off-by: Julien Danjou <julien@danjou.info>
12 years agoSync with nova change I135ed85a.
Avishay Traeger [Fri, 21 Sep 2012 12:58:27 +0000 (15:58 +0300)]
Sync with nova change I135ed85a.

This patch syncs the cinder driver code with that of the nova code,
as we received comments in the review process there.  All changes are
minor: (1) removing unnecessary type checks of the flags, (2) not
using getattr to access the FLAGS, and (3) using the self.flags()
infrastructure that test.TestCase provides.

Change-Id: Id740be6441862f048c3a9267394492a7ed65db84

12 years agoMerge "Remove cinder gating hack"
Jenkins [Fri, 21 Sep 2012 04:45:51 +0000 (04:45 +0000)]
Merge "Remove cinder gating hack"

12 years agoMerge "Stop double logging to the console"
Jenkins [Fri, 21 Sep 2012 04:04:42 +0000 (04:04 +0000)]
Merge "Stop double logging to the console"

12 years agoMerge "Set the default availability zone back to nova"
Jenkins [Fri, 21 Sep 2012 03:32:03 +0000 (03:32 +0000)]
Merge "Set the default availability zone back to nova"

12 years agoRemove cinder gating hack
Vishvananda Ishaya [Fri, 21 Sep 2012 00:32:56 +0000 (00:32 +0000)]
Remove cinder gating hack

The hack was necessary while we switched the name used for az's
in the gating tests. Now it can be removed

Change-Id: I970205910ac0950ab4a961aa0537eb964d7f0d3c

12 years agoSet the default availability zone back to nova
Vishvananda Ishaya [Thu, 20 Sep 2012 16:34:59 +0000 (16:34 +0000)]
Set the default availability zone back to nova

Currently nova and cinder have to have the same set of az's for
the ec2 api to work properly. Therefore, set the default az for
cinder to nova so they will match.

Includes a hack to az to set cinder to nova to work around gate
issues. The hack can be removed once the gate sets the zone to
nova properly.

Fixes bug 1053508

Change-Id: I9c30ccc5c79b9c4e6c1ebeb3e80d0098e1ffbb11

12 years agoAdd lun number (0) to model_update in HpSanDriver
John Griffith [Thu, 20 Sep 2012 23:27:13 +0000 (17:27 -0600)]
Add lun number (0) to model_update in HpSanDriver

The HpSanDriver was not setting the lun number in model_update
and as a result default value of 1 was being used.  Trouble is the
Lun number used by LeftHand is 0, so the connect info would be
wrong and fail when trying to attach the volume.

Fixes bug #1053717

Change-Id: If82a66c6a78ab03da09223a7b79abe559a6f702f

12 years agoMerge "Fixes to the SolarisISCSI Driver"
Jenkins [Thu, 20 Sep 2012 22:59:47 +0000 (22:59 +0000)]
Merge "Fixes to the SolarisISCSI Driver"

12 years agoFixes to the SolarisISCSI Driver
Yosef Berman [Thu, 20 Sep 2012 17:34:24 +0000 (10:34 -0700)]
Fixes to the SolarisISCSI Driver

Even when the san_is_local config option was set to false, the
SolarisISCSIDriver's _execute method was accidentally set to
util.execute by the VolumeDriver's __init__ method.

Fix bug 1053041

Change-Id: Ie3299f5065e2b084644ec2956f0c6ebae4264a49

12 years agoStop double logging to the console
Vishvananda Ishaya [Thu, 20 Sep 2012 16:52:51 +0000 (16:52 +0000)]
Stop double logging to the console

The code in nova for logging added an extra root handler to be
able to log messages to the console during log setup. This handler
was removed in the setup method. The common setup method no longer
removes this handler, so don't create it. Note that there may be
a small period before the logging setup is finished where messages
will not appear.

Fixes bug 1053512

Change-Id: I559cca8ffc2a33beff22025e42a9713487245980

12 years agoRestore SIGPIPE default action for subprocesses
Thierry Carrez [Thu, 20 Sep 2012 12:21:00 +0000 (14:21 +0200)]
Restore SIGPIPE default action for subprocesses

Python ignores SIGPIPE on startup, because it prefers to check every
write and raise an IOError exception rather than taking the signal. Most
Unix subprocesses don't expect to work this way. This patch (adapted
from Colin Watson's post at http://tinyurl.com/2a7mzh5) sets SIGPIPE
back to the default action for cinder.utils.execute and cinder-rootwrap
created subprocesses.

Fixes bug 1053364

Change-Id: I4b3307bd2f0f5d0da529d8b7d80fabae28c57732

12 years agoMerge "Correct IetAdm remove_iscsi_target"
Jenkins [Thu, 20 Sep 2012 05:05:14 +0000 (05:05 +0000)]
Merge "Correct IetAdm remove_iscsi_target"

12 years agoReplace builtin hash with MD5 to solve 32/64-bit issues.
Ben Swartzlander [Wed, 19 Sep 2012 21:07:47 +0000 (17:07 -0400)]
Replace builtin hash with MD5 to solve 32/64-bit issues.

It seems that Python's builtin hash returns different
values on 32-bit and 64-bit architectures, so it's
safer to use a well-defined hash like MD5.

bug 1050359

Change-Id: I0a4f11b34a1f76cda279ec801cede1440c6e5966

12 years agoCorrect IetAdm remove_iscsi_target
John Griffith [Wed, 19 Sep 2012 17:18:51 +0000 (11:18 -0600)]
Correct IetAdm remove_iscsi_target

Remove logical units should be done before delete the target while
unexport iSCSI volume. Or ietd will show "No such file or directory"
error.

Fix bug 1043107

Change-Id: Iab5b97044c5a30c788fcabce827923ff82a84b91

12 years agoAdd nova migrate_version check to cinder import
John Griffith [Tue, 18 Sep 2012 19:29:20 +0000 (13:29 -0600)]
Add nova migrate_version check to cinder import

Cinder-manage migrate import only works from Nova/Folsom--->Cinder/Folsom
this change adds an explicit check of the nova migrate_version (133)
to make sure we have all of the volume id/uuid changes that are needed
to be compatable, and presents an error message if that's not the case.

Addresses bug #1052598

Change-Id: I7f32cf35e33320f4348b7bc44a8e92b5716b71d8

12 years agoMerge "Add update to volume and snapshot controllers"
Jenkins [Tue, 18 Sep 2012 20:13:30 +0000 (20:13 +0000)]
Merge "Add update to volume and snapshot controllers"

12 years agoMerge "Bump version to 2013.1"
Jenkins [Tue, 18 Sep 2012 17:30:17 +0000 (17:30 +0000)]
Merge "Bump version to 2013.1"

12 years agoMerge "Clean up db.volume_create()"
Jenkins [Tue, 18 Sep 2012 16:30:19 +0000 (16:30 +0000)]
Merge "Clean up db.volume_create()"

12 years agoBump version to 2013.1
Thierry Carrez [Tue, 18 Sep 2012 13:41:42 +0000 (15:41 +0200)]
Bump version to 2013.1

Bump version to 2013.1 on master branch to open Grizzly development.

Change-Id: Iad73bf47c4ff77216ee27c3b08117dcaa9487ddf

12 years agoMerge "Fix volume deletion when device mapper is used"
Jenkins [Tue, 18 Sep 2012 08:12:09 +0000 (08:12 +0000)]
Merge "Fix volume deletion when device mapper is used"

12 years agoClean up db.volume_create()
John Griffith [Mon, 17 Sep 2012 21:36:10 +0000 (15:36 -0600)]
Clean up db.volume_create()

 Adding the metadata return to db.volume_create() introduced some
 messy and unnecessary repitition in the code.  This patch
 cleans that up and makes use of existing volume_get functions rather
 than duplicating the code in volume_create.

 This syncs cinder up with the patch as it's been submitted for nova
 in https://review.openstack.org/#/c/10461/

 Addresses bug #1052176

Change-Id: I17aca069fbb0240770613f176430a1b2fcf2b25a

12 years agoMerge "Update quota when deleting volume that failed to be scheduled"
Jenkins [Mon, 17 Sep 2012 20:37:07 +0000 (20:37 +0000)]
Merge "Update quota when deleting volume that failed to be scheduled"

12 years agoFix volume deletion when device mapper is used
Rafi Khardalian [Wed, 5 Sep 2012 05:51:43 +0000 (05:51 +0000)]
Fix volume deletion when device mapper is used

Call dmsetup remove if there is a /dev/mapper/nova--volumes-
element present.

Resolves bug 979020

Change-Id: Iddaaed411a77dda4bd32f9a97687ff17744119eb

12 years agoMerge "Fix FLAGS.volumes_dir help message"
Jenkins [Mon, 17 Sep 2012 18:14:34 +0000 (18:14 +0000)]
Merge "Fix FLAGS.volumes_dir help message"

12 years agoUpdate quota when deleting volume that failed to be scheduled
Zhiteng Huang [Mon, 17 Sep 2012 09:26:09 +0000 (17:26 +0800)]
Update quota when deleting volume that failed to be scheduled

If one volume was failed to get scheduled, removing such volume should
also clean up reservation.
Also when create_volume is ready to send to scheduler, reservation
should be committed no matter backend can successfully create that
volume or not since deleting volume call will do a minus reservation
even on volume with 'error' status.

Fix bug 1052052

Change-Id: Iaec9926024ad5adb38b08b07772095f49b8593c2

12 years agoSync a change to rpc from openstack-common.
Russell Bryant [Fri, 14 Sep 2012 17:50:47 +0000 (13:50 -0400)]
Sync a change to rpc from openstack-common.

This commit pulls in the following change from openstack-common:

    ee44222 Change the qpid_heartbeat default to 60 seconds.

Fix bug 1050661.

Change-Id: I999e16c18227f9aab4dc8c2ff88cd6907c7c8191

12 years agoMerge "Sync notifier changes from openstack-common"
Jenkins [Fri, 14 Sep 2012 03:43:28 +0000 (03:43 +0000)]
Merge "Sync notifier changes from openstack-common"

12 years agoMerge "Add a resume delete on volume manager startup"
Jenkins [Fri, 14 Sep 2012 03:43:06 +0000 (03:43 +0000)]
Merge "Add a resume delete on volume manager startup"

12 years agoMerge "Improve entity validation in volumes APIs"
Jenkins [Fri, 14 Sep 2012 03:41:14 +0000 (03:41 +0000)]
Merge "Improve entity validation in volumes APIs"

12 years agoAdd a resume delete on volume manager startup
John Griffith [Thu, 13 Sep 2012 16:53:52 +0000 (10:53 -0600)]
Add a resume delete on volume manager startup

  Currently if for some reason the volume service was stopped
  during the zero out operation of a volume delete there was
  no way to get the volume removed from the system (it would
  be present in deleting status forever).

  This change adds a simple check of volumes in the DB with status
  of deleting, and if any are found it restarts the delete process
  on them.

  addresses bug #1011150

Change-Id: Id4c4a3bc61f95245ebc6658234b4b88029956562

12 years agoMerge "Add entity body validation helper"
Jenkins [Thu, 13 Sep 2012 16:45:10 +0000 (16:45 +0000)]
Merge "Add entity body validation helper"

12 years agoImprove entity validation in volumes APIs
Mark McLoughlin [Wed, 12 Sep 2012 11:51:40 +0000 (12:51 +0100)]
Improve entity validation in volumes APIs

Fixes bug #1048565

Use the new Controller.is_valid_body() helper to validate the entity
body in various volumes related POST/PUT handlers and return 422
as appropriate.

Change-Id: I04127972981522c1ed81903893396c4f9665bcd3

12 years agoAdd entity body validation helper
Mark McLoughlin [Wed, 12 Sep 2012 11:51:23 +0000 (12:51 +0100)]
Add entity body validation helper

Add a _valid_body() helper for the to avoid repeating the same tests in
multiple methods. Include a check that the entity itself is actually a
dict.

(Cherry-picks part of commit d1ad73ee from Nova)

Change-Id: If8114cc76d68567005c85c803f29e30e034db89a

12 years agoShould've added super().tearDown() in test_iscsi
John Griffith [Thu, 13 Sep 2012 14:50:09 +0000 (08:50 -0600)]
Should've added super().tearDown() in test_iscsi

  Made changes to use tempfiles and implemented teardown,
  but should have also called super().tearDown as well.

  Associated with chage: I9b9a2400

Change-Id: I2e9d1cb7bfbe78323630eb2f3270698a7ce7e4c4

12 years agoFixes bug 1050135.
Avishay Traeger [Tue, 11 Sep 2012 14:11:41 +0000 (17:11 +0300)]
Fixes bug 1050135.

Regenerate cinder.conf.sample and fix a couple related bugs.

Change-Id: I3e472f9c69ad4888dc15f901f4bc7cd825fb5ba1

12 years agoFix FLAGS.volumes_dir help message
Joe Gordon [Thu, 13 Sep 2012 01:06:34 +0000 (18:06 -0700)]
Fix FLAGS.volumes_dir help message

And other nova/volume/iscsi.py typos

Change-Id: I781a07b4f11b6cf336c278a6994bd5575ae1a70a

12 years agoMerge "Use tmpdir and avoid leaving test files behind"
Jenkins [Thu, 13 Sep 2012 00:16:08 +0000 (00:16 +0000)]
Merge "Use tmpdir and avoid leaving test files behind"

12 years agoMerge "Sync log format changes from openstack-common."
Jenkins [Thu, 13 Sep 2012 00:15:40 +0000 (00:15 +0000)]
Merge "Sync log format changes from openstack-common."

12 years agoMerge "Update rpc from openstack-common."
Jenkins [Thu, 13 Sep 2012 00:15:16 +0000 (00:15 +0000)]
Merge "Update rpc from openstack-common."

12 years agoUse tmpdir and avoid leaving test files behind
John Griffith [Wed, 12 Sep 2012 22:52:02 +0000 (16:52 -0600)]
Use tmpdir and avoid leaving test files behind

 We were just creating a file for testing iscsi persist files and
 weren't cleaning up after the test.

 Change this to use a tmpdir and make sure we leave no tracks.

 Fixes bug #1050086

Change-Id: I9b9a2400a172d52987d76f3132793cb042fd201c

12 years agoMerge "Add volume quota in volume/api.py and olume/manager.py"
Jenkins [Wed, 12 Sep 2012 23:24:55 +0000 (23:24 +0000)]
Merge "Add volume quota in volume/api.py and olume/manager.py"

12 years agoMerge "Fixes bug 1049446."
Jenkins [Wed, 12 Sep 2012 17:40:45 +0000 (17:40 +0000)]
Merge "Fixes bug 1049446."

12 years agoSync log format changes from openstack-common.
Russell Bryant [Wed, 12 Sep 2012 16:34:43 +0000 (12:34 -0400)]
Sync log format changes from openstack-common.

This patch pulls in the following change from openstack-common:

    9f88d84 Improve logging of process id

Change-Id: I6c5be346ed332d14357441b2b147ad1f09157f41

12 years agoUpdate rpc from openstack-common.
Russell Bryant [Wed, 12 Sep 2012 16:30:04 +0000 (12:30 -0400)]
Update rpc from openstack-common.

Fix bug 1049843.

This commit syncs the following commit from openstack-common:

    commit 7e9f72bb28456c912aa80945dbdb8d200f81b462
    Make projects define 'control_exchange'.

This change allows cinder to set a project-specific default of 'cinder'
for the 'control_exchange' option.  The option is now defined in
cinder.flags.

Change-Id: Ia91c172ca0665798d616f9faf5880770074235c8

12 years agoAdd volume quota in volume/api.py and olume/manager.py
Rongze Zhu [Wed, 12 Sep 2012 07:10:53 +0000 (07:10 +0000)]
Add volume quota in volume/api.py and olume/manager.py

Fixes bug #1048158

volume.api.API.create() call QUOTAS.reserve(), then
volume.manager.VolumeManager.create_volume call QUOTAS.commit().
volume.manager.VolumeManager.delete_volume call QUOTAS.reserve() and
QUOTAS.commit().

It also fixes bug #1049459.

Change-Id: I764aeec83cce93595fbe9aa00205a7d8c9e13c35

12 years agoFixes bug 1049446.
Avishay Traeger [Tue, 11 Sep 2012 10:31:01 +0000 (13:31 +0300)]
Fixes bug 1049446.

Removed the "vtype" option which did not work in the driver, and
added the "easytier" option. Added another check to _check_flags
and made sure -warning flag is passed properly. Added unit tests
to check all option variations.

Change-Id: I4e66436f8f62d851a079ec80209fe9d6b27fb5b4

12 years agoMerge "Remove null_kernel option."
Jenkins [Tue, 11 Sep 2012 22:58:09 +0000 (22:58 +0000)]
Merge "Remove null_kernel option."

12 years agoMerge "Revert "Don't zero out snapshot volume on snapshot_delete""
Jenkins [Tue, 11 Sep 2012 22:15:46 +0000 (22:15 +0000)]
Merge "Revert "Don't zero out snapshot volume on snapshot_delete""