]> review.fuel-infra Code Review - openstack-build/cinder-build.git/log
openstack-build/cinder-build.git
11 years agoImprove provider_location cleanup code for RBD.
Adam Gandelman [Wed, 28 Nov 2012 01:51:26 +0000 (17:51 -0800)]
Improve provider_location cleanup code for RBD.

The RBD driver does not make use of the 'provider_location' field
but the current cleanup code assumes it does.  Ensure the field
is in use before testing whether or not it needs fixing.

Fixes bug 1083818.

Change-Id: Id6ff85101f85e70575ba244c2df7aca0196cf224

11 years agoMerge "Fix None being passed into as_int()."
Jenkins [Tue, 27 Nov 2012 21:08:17 +0000 (21:08 +0000)]
Merge "Fix None being passed into as_int()."

11 years agoMerge "Make pep8 checks a bit stricter."
Jenkins [Tue, 27 Nov 2012 16:32:23 +0000 (16:32 +0000)]
Merge "Make pep8 checks a bit stricter."

11 years agoFix None being passed into as_int().
Matthew Treinish [Tue, 27 Nov 2012 15:41:25 +0000 (10:41 -0500)]
Fix None being passed into as_int().

Currently when a create is received and the size is of NoneType
a stack trace is dumped because of the TypeError. This will
correct it so the functionality won't change, but the TypeError
is will be caught now.

Change-Id: Ic83dd182e0083c887af8f6209a23af38bfff2be7

11 years agoMerge "Revert "use O_DIRECT when copying from /dev/zero too""
Jenkins [Tue, 27 Nov 2012 07:18:34 +0000 (07:18 +0000)]
Merge "Revert "use O_DIRECT when copying from /dev/zero too""

11 years agoRevert "use O_DIRECT when copying from /dev/zero too"
John Griffith [Tue, 27 Nov 2012 05:46:58 +0000 (05:46 +0000)]
Revert "use O_DIRECT when copying from /dev/zero too"

It turns out running oflag=direct against the LVM snapshot fails for an IO error every time.  Works fine against the regular volume, but fails on snapshot.

This reverts commit 1405a6440d646524d41adfed4fc1344948e2871f

11 years agoMake pep8 checks a bit stricter.
John Griffith [Sun, 25 Nov 2012 03:17:32 +0000 (20:17 -0700)]
Make pep8 checks a bit stricter.

Along with moving to pep8 1.3.3, we also want to standardize
on what we ignore. This patch get's us most of the way there
by setting the ignore list to:
N4,E125, E126, E711,E712.

Almost all changes made here are white-space/indentation changes.

The removal of Hacking N4 errors from the ignore list will
be handled in a seperate patch.

Change-Id: If45f156600485d23769449018590f60b4f69b0c5

11 years agoMerge "Remove redundant db.volume_update() in volume manager create_volume()"
Jenkins [Mon, 26 Nov 2012 18:21:45 +0000 (18:21 +0000)]
Merge "Remove redundant db.volume_update() in volume manager create_volume()"

11 years agoMerge "use O_DIRECT when copying from /dev/zero too"
Jenkins [Mon, 26 Nov 2012 17:04:28 +0000 (17:04 +0000)]
Merge "use O_DIRECT when copying from /dev/zero too"

11 years agoMerge "Add CONTRIBUTING file."
Jenkins [Fri, 23 Nov 2012 16:54:11 +0000 (16:54 +0000)]
Merge "Add CONTRIBUTING file."

11 years agouse O_DIRECT when copying from /dev/zero too
Pádraig Brady [Fri, 23 Nov 2012 11:24:44 +0000 (11:24 +0000)]
use O_DIRECT when copying from /dev/zero too

We need to avoid trying O_DIRECT with virtual
devices like /dev/zero and /dev/urandom etc.
as it's not supported there, which because of
our later check, would cause O_DIRECT to be
not applied to the output device either.

Related to bug 937694
Possibly related to bug 1023755
Change-Id: I034d8345c3d00689c1f1fffcc2c110735c49ee01

11 years agoAdd CONTRIBUTING file.
john-griffith [Thu, 22 Nov 2012 16:44:53 +0000 (09:44 -0700)]
Add CONTRIBUTING file.

If the CONTRIBUTING[.md] file exists, Github will show a link to it to
anyone who files an issue on Github or opens a pull request on
Github. This files points folks to the OpenStack wiki page which
provides the proper instructions on how to contribute to OpenStack.

See also <https://github.com/blog/1184-contributing-guidelines>.

Change-Id: I8fef06b71aa993c4c68a1ec92c39a540318aaf31

11 years agoAdd the persistency to the volume created by iscsi IET.
Vincent Hou [Tue, 13 Nov 2012 09:15:41 +0000 (17:15 +0800)]
Add the persistency to the volume created by iscsi IET.

Bug 1070649.

Change-Id: Ia2e095a8a60a5d5ca028272ed2a35c20b4ad45a7

11 years agoMerge "Add hosts extension to Cinder."
Jenkins [Thu, 22 Nov 2012 07:27:57 +0000 (07:27 +0000)]
Merge "Add hosts extension to Cinder."

11 years agoadding copy of v1 as v2
Mike Perez [Wed, 21 Nov 2012 08:15:39 +0000 (00:15 -0800)]
adding copy of v1 as v2

finishes blueprint bp/apiv2

Change-Id: I36dff480aacc438565875cdd23dc396e369da9bd

11 years agoMoving contrib to cinder.api
Mike Perez [Tue, 13 Nov 2012 05:13:55 +0000 (21:13 -0800)]
Moving contrib to cinder.api

This moves over all contrib to a common place for all api versions to
use. Test directory structure has been adjusted to match.

For compatibility with old cinder config settings, we ignore the old
contrib path and use the new location.

progress on blueprint apiv2

Change-Id: If1a24fd3c4d15db559674a021f6928613966e3a1

11 years agoMoving api v1 implementation into v1 directory
Mike Perez [Fri, 9 Nov 2012 09:57:44 +0000 (01:57 -0800)]
Moving api v1 implementation into v1 directory

Adjusts paste to use composite factory for routing properly to v1 and
future api versions. Tests have been adjusted to match directory
structure.

progress on blueprint apiv2

Change-Id: I2cd3908705d224872b2d615cabe210fb1c453232

11 years agoSwitching api to use base extension manager
Mike Perez [Mon, 12 Nov 2012 05:37:14 +0000 (21:37 -0800)]
Switching api to use base extension manager

progress on blueprint apiv2

Change-Id: I68640a88c7c2b7ee4c6661fa26a4f82d9c63b00f

11 years agomoving all middleware code in cinder.api.middleware
Mike Perez [Sun, 4 Nov 2012 09:20:47 +0000 (01:20 -0800)]
moving all middleware code in cinder.api.middleware

This includes auth, sizelimit, and faultwrapper middleware. Test
directory struture has been adjusted to match.

progress on blueprint apiv2

Change-Id: I62eecb208553abfee8dc8d2679264884b4cec153

11 years agoMoving common api code into cinder.api
Mike Perez [Sun, 4 Nov 2012 08:34:27 +0000 (01:34 -0700)]
Moving common api code into cinder.api

This is progress for beginning to have separate versions of the
cinder api. Common code that would be shared by v1, v2 etc will use
these modules, so we'll just move them to a common place. Test directory
structure has also been updated.

progress on blueprint apiv2

Change-Id: I99fd95fc3bb5d4f4fc3d9ef5b76b6372a1f6033d

11 years agoMerge "Add volume bootable information to api response"
Jenkins [Thu, 22 Nov 2012 05:12:27 +0000 (05:12 +0000)]
Merge "Add volume bootable information to api response"

11 years agoMerge "Cleaning up volume driver paths"
Jenkins [Thu, 22 Nov 2012 02:14:03 +0000 (02:14 +0000)]
Merge "Cleaning up volume driver paths"

11 years agoMerge "Removes the xensm driver"
Jenkins [Thu, 22 Nov 2012 01:03:23 +0000 (01:03 +0000)]
Merge "Removes the xensm driver"

11 years agoCleaning up volume driver paths
Nirmal Ranganathan [Wed, 21 Nov 2012 17:44:27 +0000 (11:44 -0600)]
Cleaning up volume driver paths

Moved all the remaining drivers under
cinder.volume.drivers. Updated the tests with
the new module paths and add backwards compatibilty
for the existing paths.

Implements bp driver-cleanup

Change-Id: I7673b5209cc072ac859d7d32cdeed2e7a17331e8

11 years agoAdd volume bootable information to api response
Mike Perez [Mon, 19 Nov 2012 05:27:39 +0000 (21:27 -0800)]
Add volume bootable information to api response

If there is any glance metadata associated with a volume, we'll consider
the volume bootable. This will return the information for both /volumes
and /detail calls.

blueprint list-bootable-volumes

Change-Id: Id9dbe5cb648be62fb19bb8bd6a97d8eab05ec25a

11 years agoMerge "Add XenAPINFSDriver"
Jenkins [Wed, 21 Nov 2012 17:33:35 +0000 (17:33 +0000)]
Merge "Add XenAPINFSDriver"

11 years agoAdd XenAPINFSDriver
Mate Lakat [Mon, 5 Nov 2012 09:57:52 +0000 (09:57 +0000)]
Add XenAPINFSDriver

Related to blueprint xenapi-storage-manager-nfs

As xensm was not pulled to Cinder, this change shows an implementation
example for using an NFS export for volumes. This change contains the
volume create and delete functions, as a minimal set of functionality.
The connection information structure is compatible with the previous
xensm implementation.

Activate the driver with the following configuration entries in
cinder.conf:

volume_driver=cinder.volume.xenapi_sm.XenAPINFSDriver
xenapi_connection_url=http://<yourxenserver>
xenapi_connection_username=root
xenapi_connection_password=<secret>
xenapi_nfs_server=<nfs_server_address>
xenapi_nfs_serverpath=/exported_catalog

Change-Id: Ieaf077f540fc026c5bc37f2e3eb9d48fb96d0b74

11 years agoAdd db table for Glance Metadata
Ollie Leahy [Thu, 15 Nov 2012 11:48:27 +0000 (11:48 +0000)]
Add db table for Glance Metadata

This commit implements the blueprint
https://blueprints.launchpad.net/cinder/+spec/retain-glance-metadata-for-billing

It creates the new table volume_glance_metadata in the cinder
database, provides the CRUD methods for it, and populates the table
when a volume or snapshot is created from a Glance image.

Patch set 2: remove superflous line

Patch set 3: Fix incorrect column types in sqlalchemy/models.py

Patch set 4: Define exception class GlanceMetadataExists

Change-Id: I8f98f6eaae005a33bfd49cea783774407b7aa120

11 years agoRemove redundant db.volume_update() in volume manager create_volume()
Zhiteng Huang [Tue, 20 Nov 2012 17:02:37 +0000 (01:02 +0800)]
Remove redundant db.volume_update() in volume manager create_volume()

Since scheduler has already updated db to set the 'host' field and
recorded 'scheduled_at' time, it's not necessary to do db.volume_update()
again in volume manager create_volume() method.  Also let volume api
to update db when creating volume from snapshot while snapshot_same_host
is true, thus the behavior is consistent (updating db when placement
decision is made).

Change-Id: I43aaee8e2a5d0ceadb98bd608cc147467488349e

11 years agoPin pep8 1.3.3
Chuck Short [Tue, 20 Nov 2012 15:05:57 +0000 (09:05 -0600)]
Pin pep8 1.3.3

Apart of making pep8 version standard across all openstack
projects.

Also fix tools/hacking.py so it is compliant for pep8 1.2
and beyond, taken from fbc4568 in the nova tree.

Change-Id: I801c98a01960fa113dae1b6174c1a06bb149fea3
Signed-off-by: Chuck Short <chuck.short@canonical.com>
11 years agoRemoves the xensm driver
John Garbutt [Fri, 9 Nov 2012 14:38:56 +0000 (14:38 +0000)]
Removes the xensm driver

This code does not work, and is slowly being replaced by
alternative XenServer specific drivers.

Fixes LP bug #1077011

Change-Id: I1af92ecdbb49a57a0ff4c05a70d77bcb69958cb2

11 years agoPass in correct volume_ref to create_from_snapshot.
John Griffith [Tue, 20 Nov 2012 00:50:27 +0000 (00:50 +0000)]
Pass in correct volume_ref to create_from_snapshot.

The new rpc versioning change introduced a bug in the
create_from_snapshot code.  The originating volume_ref
was being passed in instead of the newly created volume_ref
as expected.

Fixes bug 1080898

Change-Id: I6ba4f4989c77e29685abb2649af8e003c447ab0f

11 years agoAdd hosts extension to Cinder.
John Griffith [Tue, 13 Nov 2012 19:03:50 +0000 (19:03 +0000)]
Add hosts extension to Cinder.

This adds the hosts extension to Cinder which is similar to
the extension by the same name in Nova.

This extension allows an admin user to check the status of
Cinder services on different hosts.  In addition it also
provides the capability to get host and project specific information
regarding volume count and space allocated for volumes on a specified
host.

Implements blueprint cinder-hosts-extension

Change-Id: Ic3679cfcd900baecdc2da17e42194cac99c9d422

11 years agoMerge "Volume RPC API Versioning"
Jenkins [Fri, 16 Nov 2012 09:14:04 +0000 (09:14 +0000)]
Merge "Volume RPC API Versioning"

11 years agoMerge "Make tox.ini run pep8/hacking checks on bin."
Jenkins [Fri, 16 Nov 2012 05:33:38 +0000 (05:33 +0000)]
Merge "Make tox.ini run pep8/hacking checks on bin."

11 years agoMerge "Remove unused python-daemon dependency"
Jenkins [Fri, 16 Nov 2012 01:27:31 +0000 (01:27 +0000)]
Merge "Remove unused python-daemon dependency"

11 years agoMerge "Various pep8/HACKING fixes for Cinder."
Jenkins [Thu, 15 Nov 2012 21:55:26 +0000 (21:55 +0000)]
Merge "Various pep8/HACKING fixes for Cinder."

11 years agoRemove unused python-daemon dependency
Eric Harney [Thu, 15 Nov 2012 20:26:16 +0000 (15:26 -0500)]
Remove unused python-daemon dependency

python-daemon is listed as a dependency, but it is not needed.

Change-Id: I4d6eadfef5d60cd277ff7395a12f5ad255db7155

11 years agoMake tox.ini run pep8/hacking checks on bin.
Dan Prince [Thu, 15 Nov 2012 16:27:06 +0000 (11:27 -0500)]
Make tox.ini run pep8/hacking checks on bin.

This updates the pep8 checks in our tox.ini file so that
we are also scanning the bin directory.

Additionally, it updates the main pep8 check so that it scans
cinder properly as well. Previously there were a bunch of files
getting skipped due to some of the pep8 pattern matching.

Change-Id: Ib47a590303409e62546a75625ee356c9fa7af6ad

11 years agoVarious pep8/HACKING fixes for Cinder.
Dan Prince [Thu, 15 Nov 2012 16:26:31 +0000 (11:26 -0500)]
Various pep8/HACKING fixes for Cinder.

Fix some ordering/pep8/hacking issues in preperation for re-enabling
full pep8/HACKING checks in tox.

Change-Id: I7151ac73d1ace5d98046580e6d1c6a1dcc6c4cef

11 years agoMerge "Remove gen_uuid()"
Jenkins [Thu, 15 Nov 2012 18:03:18 +0000 (18:03 +0000)]
Merge "Remove gen_uuid()"

11 years agoVolume RPC API Versioning
Zhiteng Huang [Fri, 9 Nov 2012 17:32:22 +0000 (01:32 +0800)]
Volume RPC API Versioning

Add versioning to Volume Rpc API version.  This is initial version
1.0, which is compatible with previous non-versioned RPC API.

Note: this patch slightly change the db.volume_update() behavior,
which now returns updated volume info.

Change-Id: I78036b6ed97c5bc369d8c85307ecaaad8e31ff90

11 years agoRemove gen_uuid()
Zhongyue Luo [Wed, 14 Nov 2012 13:49:07 +0000 (22:49 +0900)]
Remove gen_uuid()

Removed gen_uuid and uuid related unittests
Replaced utils.gen_uuid() with uuid.uuid4()

Change-Id: If34096f47fdea719e2dc180b448654519ede9bc9

11 years agoMerge "Remove obsolete use_local_volumes"
Jenkins [Wed, 14 Nov 2012 17:02:06 +0000 (17:02 +0000)]
Merge "Remove obsolete use_local_volumes"

11 years agoMerge "Remove unused volume API method - remove_from_compute()"
Jenkins [Wed, 14 Nov 2012 16:50:39 +0000 (16:50 +0000)]
Merge "Remove unused volume API method - remove_from_compute()"

11 years agoRemove obsolete use_local_volumes
Julien Danjou [Tue, 13 Nov 2012 14:26:48 +0000 (15:26 +0100)]
Remove obsolete use_local_volumes

Reading documentation, I felt on that option, but grepping the source
everywhere saw no use at all, and removing seems to be safe.

Change-Id: I0ec22bcc406402420bc06fd28c352b84a4e21b69
Signed-off-by: Julien Danjou <julien@danjou.info>
11 years agoImport order cleanup per HACKING
Zhongyue Luo [Wed, 7 Nov 2012 07:56:33 +0000 (15:56 +0800)]
Import order cleanup per HACKING

Change-Id: I5540a5d24f45aa51e0ef58b43427fbaf7726da89

11 years agoRemove unused volume API method - remove_from_compute()
Zhiteng Huang [Fri, 9 Nov 2012 06:37:21 +0000 (14:37 +0800)]
Remove unused volume API method - remove_from_compute()

remove_from_compute() method in cinder.volume.api is never used
by others and it is also broken since the interface in Nova has
been changed to remove_volume_connection(), thus it should be
removed from Cinder.

Change-Id: Ibcb2cf7f88606d9a540cc9a03b5c95990fca8c3e

11 years agoMerge "Scheduler API clean up and refactor"
Jenkins [Fri, 9 Nov 2012 06:11:58 +0000 (06:11 +0000)]
Merge "Scheduler API clean up and refactor"

11 years agoScheduler API clean up and refactor
Zhiteng Huang [Sat, 6 Oct 2012 17:11:41 +0000 (01:11 +0800)]
Scheduler API clean up and refactor

Unlike Nova scheduler, which has to consider serving compute and volume
scheduling, Cinder scheduler only serves volume scheduling, so there's no
need to keep generic interface 'schedule'. Instead, 'schedule_create_volume'
is added (if missing) to manager/driver class and chance/simple scheduler
driver implementation.

Also this patch changes the interface between API service and scheduler to
allow more information about volume is passed to scheduler for advanced
scheduling while maintained backward compatibility. And this change bumps
scheduler RPC API to version 1.2.

Change-Id: I42be05675cd73f89a03c84105ec512d7ee4f3c3a

11 years agoMerge "Add 'create_volume' to scheduler RPC API."
Jenkins [Wed, 7 Nov 2012 02:15:42 +0000 (02:15 +0000)]
Merge "Add 'create_volume' to scheduler RPC API."

11 years agoRemove dm_setup(remove) call in volume_delete.
John Griffith [Tue, 6 Nov 2012 18:08:58 +0000 (11:08 -0700)]
Remove dm_setup(remove) call in volume_delete.

While it makes sense to perform the dm_setup(remove) before
performing the lvm remove, it seems to cause some buffer IO
errors as evident by kern.log.

I'm also a bit suspicous in that it seems the delete timeouts
we see seems to have increased in frequency with this addition.
I propose this step is removed until we completely understand the
impact of the kernel error on Precise kernels.

Fixes bug: #1075675

Change-Id: I7ae4decea42d8f070d774d3e6376686b3e5b4f83

11 years agoAdd ability to disable secure volume delete.
john-griffith [Tue, 6 Nov 2012 06:26:07 +0000 (23:26 -0700)]
Add ability to disable secure volume delete.

Due to gating issues caused by secure delete on LVM volumes,
add the ability to disable via flag.secure_delete.

Default will be set to True, but we add a way for the gate tests
to disable this until we can come up with a fix for
https://bugs.launchpad.net/cinder/+bug/1023755 OR implement an alternative
secure delete method that doesn' suck.

Change-Id: I2a06e4f0021ba1f5d5aad7d0a5997a992e268858

11 years agoRemove the zeroing out of the volume altogether
john-griffith [Tue, 6 Nov 2012 05:11:52 +0000 (22:11 -0700)]
Remove the zeroing out of the volume altogether

Temporary change to get in new version which will
make the secure_delete configurable.

After pushing this and modifying the gate setup we'll
push the flag version.

Change-Id: Ic8a08566e02d822ab0eb309f61993fd8b7d21232

11 years agoAdd 'create_volume' to scheduler RPC API.
Zhiteng Huang [Thu, 4 Oct 2012 09:34:01 +0000 (17:34 +0800)]
Add 'create_volume' to scheduler RPC API.

Instead of directly call RPC methods, 'create_volume' should be
implemented in scheduler RPC API in order to do versioning.

This increases scheduler RPC version to 1.1

Change-Id: I22d5a097ec3a73c3460f4acd35c602da57f8b52d

12 years agoFix run_tests.sh ambiguous usage msg and behaviour for -x option
Rushi Agrawal [Sat, 3 Nov 2012 06:51:28 +0000 (12:21 +0530)]
Fix run_tests.sh ambiguous usage msg and behaviour for -x option

In commit
https://github.com/openstack/cinder/commit/
50792c2ff41fdc7e73b3e3c51f4510366debfd14,
the committer wanted to add an option in run_tests.sh for generating XML
coverage report, but ended up accidentally overriding the default nose
option -x. But, the usage message still showed that using option -x will
'Stop running tests after the first error or failure'. So, I changed the
option to generate XML report to  -X (capitalized 'x'). So now both -x and
-X options are available, with different purposes.

Fixes bug 1070047

Change-Id: Ie8c30c14629d4811d6db74f3eea9cdecb1d27c8a

11 years agoAdd admin only action for force detach
clayg [Thu, 25 Oct 2012 09:55:13 +0000 (02:55 -0700)]
Add admin only action for force detach

This action calls the same methods nova would after it successfully
detaches a volume.  By exposing it to the administrator it makes it's
easier to repair un-syncronized state between services.  Generally when
the host is no longer attached, but the volume state is wrong.

Future work: The Iscsi based drivers don't seem to use
initialize_connection and terminate_connection to create the export for
the volume.  This would be more useful with drivers that do that.

I added the force parameter to terminate_connection for drivers that may
want to differintiate between a normal terminate and the force detach.

Future Nova work:  Nova will want an admin action to update the bdm
tables - today it's a bit of nova-manage shell work.

Change-Id: Icc1cff0f50a5ace9ebdae62c85524ee8d6ec23e0

11 years agoMerge "Splitting out volume drivers in driver.py"
Jenkins [Wed, 7 Nov 2012 17:20:59 +0000 (17:20 +0000)]
Merge "Splitting out volume drivers in driver.py"

11 years agoMerge "Port openstack-common/uuidutils to Cinder"
Jenkins [Wed, 7 Nov 2012 16:43:14 +0000 (16:43 +0000)]
Merge "Port openstack-common/uuidutils to Cinder"

11 years agoChanges bit mode of zadara.py to 644
Zhongyue Luo [Wed, 7 Nov 2012 07:59:35 +0000 (15:59 +0800)]
Changes bit mode of zadara.py to 644

Change-Id: I0b4693d7da4ecfe5242dc302630c40ed2b8268ef

11 years agoPort openstack-common/uuidutils to Cinder
Zhiteng Huang [Mon, 5 Nov 2012 17:46:09 +0000 (01:46 +0800)]
Port openstack-common/uuidutils to Cinder

openstack-common has a new uuidutils to handle is_uuid_like(),
port it to Cinder.

Change-Id: I0ccc6166854193137af6a3210d3c465dd38fd955

11 years agoFix 401 from auth_token middleware
Vishvananda Ishaya [Wed, 7 Nov 2012 04:12:00 +0000 (20:12 -0800)]
Fix 401 from auth_token middleware

The openssl popen call to verify the token returns an error code
of 2 when a file doesn't exist. Normally this is caught and the
relevant file is downloaded, but monkeypatching os causes this
error code to be eaten and cinder to return a 401. Note that this
is likely a race condition that depends on exactly when greenthreads
are switching that is causing the return code from Popen to get
overwritten.

It is possible that this is exposing an underlying bug in eventlet
but the workaround is simply to make sure that we don't monkeypatch
os.

Fixes bug 1075838

Change-Id: I69ba75136e32e95c6fdf108f0c4fe21a5e3bdbe6

11 years agoSplitting out volume drivers in driver.py
Nirmal Ranganathan [Sun, 21 Oct 2012 19:07:13 +0000 (14:07 -0500)]
Splitting out volume drivers in driver.py

Moved RBDDriver, SheepdogDriver into their own respective driver
files under cinder/volume/drivers/*. Moved FakeISCSIDriver and
LoggingVolumeDriver into a fake driver file under the tests,
since that's the only place where those are used.

Implements bp driver-cleanup

Change-Id: I39d91ac8e498a9e42c5443db16706203b988444b

12 years agoMerge "Adding a SSH Connection Pool."
Jenkins [Sat, 3 Nov 2012 00:08:05 +0000 (00:08 +0000)]
Merge "Adding a SSH Connection Pool."

12 years agoMinor optimization in create_volume in HpSanISCSIDriver
Nirmal Ranganathan [Fri, 2 Nov 2012 16:49:17 +0000 (11:49 -0500)]
Minor optimization in create_volume in HpSanISCSIDriver

Removing extra call to getClusterInfo in HpSANISCSIDriver
on every create_volume call. The cluster info is now
being lazily stored in a local variable.

Fixes bug 1074201

Change-Id: Iadf8383dbf87a8e82c649c312c67978c7dd3df71

12 years agoAdding a SSH Connection Pool.
Nirmal Ranganathan [Fri, 2 Nov 2012 04:05:35 +0000 (23:05 -0500)]
Adding a SSH Connection Pool.

Adds a connection pool using eventlet.pools
which works well with greenthreads. Adding new
parameters ssh_min_pool_conn and ssh_max_pool_conn.

Updating the _run_ssh method in san.py to use the
connection pool and cleaning up the existing
single connections, also added retries.

Fixes bug 1074185

Change-Id: I90dd89ffc025d09fc6ad060c4273508103b85456

12 years agoMerge "Return volume type name on volume create"
Jenkins [Thu, 1 Nov 2012 17:02:07 +0000 (17:02 +0000)]
Merge "Return volume type name on volume create"

12 years agoMerge "Allow the user to update a volume's metadata"
Jenkins [Thu, 1 Nov 2012 03:48:14 +0000 (03:48 +0000)]
Merge "Allow the user to update a volume's metadata"

12 years agoMerge "Log the body of an /action"
Jenkins [Thu, 1 Nov 2012 03:44:20 +0000 (03:44 +0000)]
Merge "Log the body of an /action"

12 years agoMerge "Detect and fix issues caused by vol ID migration"
Jenkins [Wed, 31 Oct 2012 22:01:29 +0000 (22:01 +0000)]
Merge "Detect and fix issues caused by vol ID migration"

12 years agoReturn volume type name on volume create
Clay Gerrard [Wed, 31 Oct 2012 20:25:55 +0000 (15:25 -0500)]
Return volume type name on volume create

Update openstack api controller for volumes to fully inflate the
returned volume model on create to populate the volume_type fields so
the response serializer will return the name of the volume_type instead
of the id on volume create requests.  Returning the name on create is
consistent with the show and index commands.

fixes bug #1071436

Change-Id: Ie091cf824a2df40211d8bcfa7f177fc851d737f5

12 years agoMerge "Add VolumeTenantAttribute API extension"
Jenkins [Wed, 31 Oct 2012 18:29:20 +0000 (18:29 +0000)]
Merge "Add VolumeTenantAttribute API extension"

12 years agopin sqlalchemy to the 0.7 series
Sean Dague [Wed, 31 Oct 2012 14:10:29 +0000 (10:10 -0400)]
pin sqlalchemy to the 0.7 series

sqlalchemy 0.8 beta has hit mirrors, and changes dependencies, thus
breaking jenkins. This pins it to 0.7 series until all the projects
agree to move forward to 0.8.

Fixes bug #1073569

Change-Id: If11f39d311ba9ef5cb2b198c9649a8997b2a52b5

12 years agoAdd VolumeTenantAttribute API extension
Brian Waldon [Tue, 30 Oct 2012 22:06:12 +0000 (15:06 -0700)]
Add VolumeTenantAttribute API extension

Expose the ID of the project to which a volume belongs through a
new API extension. This is only presented to Admins by default.
Visibility can be controlled with the 'volume_tenant_attribute'
policy rule.

Change-Id: If85d9759af6a9457bf3230375cc64af9efe4a088

12 years agoMerge "Split out drivers in san.py"
Jenkins [Tue, 30 Oct 2012 18:28:08 +0000 (18:28 +0000)]
Merge "Split out drivers in san.py"

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 agoDetect and fix issues caused by vol ID migration
John Griffith [Wed, 24 Oct 2012 22:28:02 +0000 (16:28 -0600)]
Detect and fix issues caused by vol ID migration

The migration from volume ID to UUID neglected to update the provider_location
field on the volume.  As a result the iqn and volume name no long match and
existing volumes are no longer able to be attached after an upgrade
(essex -> folsom and then nova-vol->cinder).

This patch adds a method to the volume driver that will check for the
mismatch of volume name in the iqn during service start up.  If
detected it will update the provider_location field in the database
to include the new ID.  Also it will create a symlink to the device backing
file that also has the correct naming convention.

Note: We don't disturb an connections that are currently attached.
For this case we add a check in manager.detach and do any provider_location
cleanup that's needed at that time.  This ensures that connections
persist on restarts of tgtd and reboot.

Change-Id: I8224824b793c98a9767c5d8dd741d892be720c4f
Fixes: bug 1065702
12 years agoSplit out drivers in san.py
Nirmal Ranganathan [Sun, 21 Oct 2012 16:38:45 +0000 (11:38 -0500)]
Split out drivers in san.py

The SolarisISCSIDriver and HpSanISCSIDriver have been removed from
san.py and placed in their own files. The default SanISCSIDriver
implementing some common methods still resides in san.py. These
san drivers have now been grouped in the san module.

Implements bp driver-cleanup

Change-Id: I68802f01a4a8c7e93e097777d305fbee0d15128a

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 agoAllow the user to update a volume's metadata
jking-6 [Wed, 24 Oct 2012 17:15:03 +0000 (13:15 -0400)]
Allow the user to update a volume's metadata

The fix mainly involves updating the VolumeController's update method
to allow the 'metadata' key to be a valid key in a request body.

The _translate_volume_summary_view method is updated to check for a
'metadata' key in the vol parameter after checking first for
'volume_metadata'.  This is to avoid making a third call to the
database after updating the volume model.  This solution introduces
the least amount of new code.

Change-Id: I41256d03f9c4c7a0866ff0f2d35fce8e4fd26b11
Fixes: bug #1046382
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