]> review.fuel-infra Code Review - openstack-build/cinder-build.git/log
openstack-build/cinder-build.git
11 years agoAdds synchronization to attach volume.
Rohit Karajgi [Fri, 28 Dec 2012 12:58:46 +0000 (04:58 -0800)]
Adds synchronization to attach volume.

This patch adds the following changes:
1. Move db update for volume status during attach to volume.manager
2. Add lock synchronization to volume attach operation
3. Related unit tests

Fixes Bug 1087253
Change-Id: I15242766bf4cfa4da67789c485fdf6886983eb45

11 years agoMerge "Add EMC Volume Driver in Cinder"
Jenkins [Fri, 28 Dec 2012 01:47:36 +0000 (01:47 +0000)]
Merge "Add EMC Volume Driver in Cinder"

11 years agoAdd EMC Volume Driver in Cinder
Xing Yang [Fri, 14 Dec 2012 05:05:14 +0000 (00:05 -0500)]
Add EMC Volume Driver in Cinder

Add support for EMC storage in the Cinder-Volume service.
This driver is based on the existing ISCSIDriver, with the ability to
create/delete and attach/detach volumes and create/delete snapshots, etc.
The Cinder Driver executes the volume operations by communicating with the
backend EMC storage. It uses a CIM client in python called PyWBEM to make
CIM operations over HTTP.
EMC CIM Object Manager (ECOM) is packaged with the SMI-S Provider. It is a
CIM server that allows CIM clients to make CIM operations over HTTP, using
SMI-S in the backend for EMC storage operations.
SMI-S Provider supports the SNIA Storage Management Initiative (SMI), an
ANSI standard for storage management. It supports VMAX/VMAXe and VNX
storage systems.

Implement bp: emc-volume-driver

Change-Id: Iafce98603d31d66a7297ef11c92d5e6ac6ba3737

11 years agoMerge "Make the NetAppISCSIDriver._is_clone_done() method able to handle empty respon...
Jenkins [Sat, 22 Dec 2012 07:00:09 +0000 (07:00 +0000)]
Merge "Make the NetAppISCSIDriver._is_clone_done() method able to handle empty responses. Add unit tests to exercise this case."

11 years agoFix typo in image_utils tempfile handling
Vishvananda Ishaya [Fri, 21 Dec 2012 17:33:22 +0000 (09:33 -0800)]
Fix typo in image_utils tempfile handling

Commit cbcd340 changed from NamedTemporaryFile to mkstemp, but
mkstemp returns a file descripter, not a file object. We therefore
need to close the fd using os.close(). This was tested using
devstack.

Change-Id: I808fa470a141e249fe30ee762ee94f47ecfd3f63

11 years agoMake the NetAppISCSIDriver._is_clone_done() method able to handle
Ben Swartzlander [Fri, 21 Dec 2012 05:24:46 +0000 (00:24 -0500)]
Make the NetAppISCSIDriver._is_clone_done() method able to handle
empty responses. Add unit tests to exercise this case.

bug 1090168

Change-Id: Ia51a73b8ebead7a0f3be9202794ca8549bdf3e5b

11 years agoMake sure we don't double remove tmp on exception
Vishvananda Ishaya [Thu, 20 Dec 2012 21:43:09 +0000 (13:43 -0800)]
Make sure we don't double remove tmp on exception

The fetch_to_raw code would fail if an exception is thrown during
fetch because it would attempt to delete the same file twice.

Fix this by using mkstemp and our wrapper which only deletes the
tmp file if it exists.

Change-Id: I7bb3171d3c7dc023fc743578c2ce6e804bbc49f5

11 years agoAdded the lockutils, fileutils, gettextutils
Walter A. Boring IV [Tue, 11 Dec 2012 19:26:16 +0000 (11:26 -0800)]
Added the lockutils, fileutils, gettextutils

The 3par driver, for both iSCSI and Fibre Channel,
that I will commit soon, needs the lockutils to ensure thread safety in
each of the driver entry points.  The driver uses a single shared http
session for all of it's connections to the 3par drive array.
This is required for the driver because of the limitation on the
3par's WSAPI only supporting a very small number of open connections.

For example without this, the driver will have problems when 2 users try and
create a volume at the same time.   I've discovered this in my threaded
stress test tool.

Change-Id: Ic9d7295e7bcbf5c06086ddf5bd9b8b2fe771faa5

11 years agoMerge "Moving host admin extension with other extensions"
Jenkins [Wed, 19 Dec 2012 18:02:27 +0000 (18:02 +0000)]
Merge "Moving host admin extension with other extensions"

11 years agoMerge "Fixes a Windows volume driver bug on disk export"
Jenkins [Wed, 19 Dec 2012 18:02:06 +0000 (18:02 +0000)]
Merge "Fixes a Windows volume driver bug on disk export"

11 years agoFixes a Windows volume driver bug on disk export
Alessandro Pilotti [Wed, 12 Dec 2012 20:10:35 +0000 (22:10 +0200)]
Fixes a Windows volume driver bug on disk export

Fixes Bug #1089168

When a VHD created by Cinder using the iSCSI Target Server is deleted
manually, at the next startup the cinder-volume service terminates with an
exception.
This fix adds a check to verify if the disk exists.

Change-Id: I830cb8332dcef845591bd88cccef1e0e9781ffcc

11 years agoMerge "Add image metadata API extension"
Jenkins [Wed, 19 Dec 2012 05:00:51 +0000 (05:00 +0000)]
Merge "Add image metadata API extension"

11 years agoMoving host admin extension with other extensions
Mike Perez [Wed, 19 Dec 2012 04:26:29 +0000 (20:26 -0800)]
Moving host admin extension with other extensions

Think this was merged during the big api changes in g1. This allows the
extension to actually be enabled.

Change-Id: I07bb9646fd11368fe5ffd7f85617ecbf103dc788

11 years agoAllow the lvm backed drivers to use mirrrors
Vishvananda Ishaya [Mon, 17 Dec 2012 22:38:53 +0000 (14:38 -0800)]
Allow the lvm backed drivers to use mirrrors

Adds a new configuration option called lvm_mirrors. If this is
set to a value > 0, it will create the specified number of mirrors
when creating volumes. Note that lvm_mirrors + 2 pvs are required
in the volume group for lvm mirroring to work properly.

Change-Id: I7e28d11c48cdbb99e17b0930b720fbd805bf9931

11 years agoMerge "CHAP support for IBM Storwize/SVC driver."
Jenkins [Mon, 17 Dec 2012 04:13:51 +0000 (04:13 +0000)]
Merge "CHAP support for IBM Storwize/SVC driver."

11 years agoCHAP support for IBM Storwize/SVC driver.
Avishay Traeger [Thu, 29 Nov 2012 10:22:00 +0000 (12:22 +0200)]
CHAP support for IBM Storwize/SVC driver.

This implements support for CHAP authentication of hosts by the IBM
Storwize/SVC controller. A host entity was created on the controller for
each server that logs in with iSCSI. Now a randomly-generated CHAP
secret is added to the host entity on the controller (passed via the
controller CLI over SSH).

Implements blueprint add-chap-support-to-storwize-svc-driver

Change-Id: I60b5ddd0ea2e1ede3070779e5293820480aa0401

11 years agoMerge "Remove instance quota re-sync code"
Jenkins [Sat, 15 Dec 2012 04:29:12 +0000 (04:29 +0000)]
Merge "Remove instance quota re-sync code"

11 years agoMerge "Support glance servers over https"
Jenkins [Fri, 14 Dec 2012 16:24:39 +0000 (16:24 +0000)]
Merge "Support glance servers over https"

11 years agoRemove instance quota re-sync code
Eoghan Glynn [Fri, 14 Dec 2012 14:19:20 +0000 (14:19 +0000)]
Remove instance quota re-sync code

Obviously came in inadvertantly in a copy'n'paste from the
nova quotas logic.

Not relevant to volume quotas and would fail if ever called
(as instance_data_get_for_project is not part of the cinder
DB API).

Change-Id: Ib52b962b51003955430ad292084a3e3010736a2c

11 years agoAdd image metadata API extension
Nikola Dipanov [Fri, 7 Dec 2012 14:53:28 +0000 (15:53 +0100)]
Add image metadata API extension

This patch introduces an API extension that will expose the volume
metadata inherited from the image if the volume was created from an image.

This data will be used by Nova when booting from volume without any
image supplied.

In addition, the patch introduces a helper method on the volume.API
class for accessing the image metadata and also updates the policy.json
files to be aware of the new extension.

This patch is part of the blueprint improve-boot-from-volume

This patch also introduces DocImpact as it extends the cinder API

Change-Id: I64515cc02f8de863e65e96c66eb1fda1a1954ac7

11 years agoRaise NotImplemented for drivers that don't support images
Sam Morrison [Fri, 14 Dec 2012 02:49:46 +0000 (13:49 +1100)]
Raise NotImplemented for drivers that don't support images

Fixes bug #1090169

Raise NotImplementedError on copy_image_to_volume and
copy_volume_to_image on drivers that inherit from
driver.ISCSIDriver that don't support this feature yet.

Change-Id: I516d424a75dd21260f2ccc68467a8f6e6ac08e4d

11 years agoAdd *.swp to gitignore.
john-griffith [Thu, 13 Dec 2012 20:17:31 +0000 (13:17 -0700)]
Add *.swp to gitignore.

Add swap files and alphabetize the list.

Change-Id: Idaa9aec831740aa965a8d2d2486f4d9ffbb50746

11 years agoSupport glance servers over https
Sam Morrison [Tue, 11 Dec 2012 23:54:54 +0000 (10:54 +1100)]
Support glance servers over https

Fixes bug 1089147

Updated glance.py from nova's version to support glance over ssl
eg. glance_api_servers=https://glance.mydomain:9292

New Flag: glance_api_insecure
Set to True to disable certificate checking

Change-Id: I53e62900265fea2de9b0ec20bbff0c40f1b14c91

11 years agoMerge "Changing display_name to name in v2 api"
Jenkins [Wed, 12 Dec 2012 18:17:30 +0000 (18:17 +0000)]
Merge "Changing display_name to name in v2 api"

11 years agoAdd commands used by NFS volume driver to rootwrap
Carlos Goncalves [Thu, 6 Dec 2012 14:50:29 +0000 (14:50 +0000)]
Add commands used by NFS volume driver to rootwrap

Fixes bug 1087282

Change-Id: Ib873c334633b4d586c2e53bac5d1cae0dcf65be7

11 years agoChanging display_name to name in v2 api
Mike Perez [Sat, 8 Dec 2012 20:16:43 +0000 (12:16 -0800)]
Changing display_name to name in v2 api

This allows the v2 api responses to be more consistent with other
projects. This approach is making the idea compatible in v2, rather
than changing the model.

blueprint name-attr-consistency

Change-Id: I74e46b4204353d5712be788fe2138784b2a72305

11 years agoMerge "Make copy_to_volume a bit more useful."
Jenkins [Sat, 8 Dec 2012 04:21:13 +0000 (04:21 +0000)]
Merge "Make copy_to_volume a bit more useful."

11 years agoMake summary and detail view consistent with other projects
Mike Perez [Mon, 3 Dec 2012 18:38:27 +0000 (10:38 -0800)]
Make summary and detail view consistent with other projects

This introduces the v2 volume view builder for ease of response
changing.

blueprint vol-api-consistency

Change-Id: If061e069d3b09ee5de15f1cbc7a46fa29c95a4cd

11 years agocreating separate v1 and v2 stubs and general fakes
Mike Perez [Sat, 1 Dec 2012 00:23:37 +0000 (16:23 -0800)]
creating separate v1 and v2 stubs and general fakes

For now contribs will use v2, but in the future will test against all
supported versions.

Change-Id: I47c30f8c2fc8a89f92065122bf1ca6aec1ce8b2d

11 years agoMake copy_to_volume a bit more useful.
john-griffith [Tue, 4 Dec 2012 04:02:19 +0000 (21:02 -0700)]
Make copy_to_volume a bit more useful.

The current implementation of cinder.driver.copy_to_volume
does not take in to account image type and is only valid
for raw images.  This doesn't do much good for the majority
of cases, and rather than require folks to have a raw version
uploaded to Glance, let's just do a convert if needed on the fly.

This simply creates a temp file, does the conversion and then
writes the temp file directly to the volume.

Change-Id: I849b04b8aae76da068abcd2a20c1fcecca8a5caa

11 years agoDelete type call in api needs update to use ID.
John Griffith [Thu, 6 Dec 2012 20:36:23 +0000 (13:36 -0700)]
Delete type call in api needs update to use ID.

https://github.com/openstack/cinder/commit/51a438c8f3f0d13c6779602264d72cde82feab9c
Introduced UUID's for volume_type ID and also changed delete to use ID
instead of name.

That changed neglected to update the call in contrib/types_manage,
this patch fixes that.

Fixes bug 1087161

Change-Id: I839228cd656afaf68caedfe673f9191488ccc397

11 years agoConvert volume_type id from int to uuid.
john-griffith [Sun, 2 Dec 2012 07:01:49 +0000 (00:01 -0700)]
Convert volume_type id from int to uuid.

This converts the volume_type id from int to uuid.  In
addition, this also corrects an issue of deleting volume_types
by name.  Even though the client/api is taking the id, it was
converting to the name of the volume_type for the db access.

We also want to continue enforcing that the name is unique on creation
so as to avoid any confusion and for clarity in Horizon.  The api
has also been enhanced to allow you to specify the type by name
or by uuid.

This does NOT modify the things like the volume details display field
(currently shows the type 'name' not 'uuid'), these types of changes
will go in to V2 of the API.

Implements blueprint vol-type-to-uuid

Change-Id: I1c54ff2a1e0c5df5891408fc11b15176db4028c3

11 years agoMerge "Rename Config osapi_compute_link_prefix to osapi_volume_base_URL"
Jenkins [Mon, 3 Dec 2012 15:09:52 +0000 (15:09 +0000)]
Merge "Rename Config osapi_compute_link_prefix to osapi_volume_base_URL"

11 years agoMerge "Revert changes to monkey_patch."
Jenkins [Sun, 2 Dec 2012 16:10:34 +0000 (16:10 +0000)]
Merge "Revert changes to monkey_patch."

11 years agoMerge "Fix exception when size is None."
Jenkins [Fri, 30 Nov 2012 23:17:51 +0000 (23:17 +0000)]
Merge "Fix exception when size is None."

11 years agoRename Config osapi_compute_link_prefix to osapi_volume_base_URL
sathish-nagappan [Fri, 30 Nov 2012 22:53:21 +0000 (14:53 -0800)]
Rename Config osapi_compute_link_prefix to osapi_volume_base_URL

fixes Bug #1046451

Renamed the config option.

Change-Id: Ia6eb057a11828bdc216e0bddbd29855285ba938c

11 years agoFix exception when size is None.
Matthew Treinish [Thu, 29 Nov 2012 22:48:03 +0000 (17:48 -0500)]
Fix exception when size is None.

If an incoming create request has a size of None raise
an exception.

Fixes: bug 1084711
Change-Id: I5ad377073cc6853b502889ad9292b5758522ca88

11 years agoMerge "attaching volumes will set instance_uuid instantly"
Jenkins [Fri, 30 Nov 2012 17:42:58 +0000 (17:42 +0000)]
Merge "attaching volumes will set instance_uuid instantly"

11 years agoEnsure request_spec can be serialized.
Russell Bryant [Fri, 30 Nov 2012 14:19:05 +0000 (09:19 -0500)]
Ensure request_spec can be serialized.

request_spec includes some objects that must be converted to primitive
types to ensure they can be serialized by any of the rpc drivers.  In
this case, it's the volume type.  It's a sqlalchemy model.
to_primitive() will ensure that it gets converted to a dict so that it
can be serialized for messaging.

I saw this error in a smokestack log that was running tempest with qpid.
You won't see this error if you're using rabbit with the kombu driver.
We have some magic with the kombu driver that will fix these problems
automatically if they are missed.

Change-Id: I9a1b7662bca7caa2acb61d1e3879ac2654d5b32e

11 years agoattaching volumes will set instance_uuid instantly
Mike Perez [Thu, 29 Nov 2012 11:18:08 +0000 (03:18 -0800)]
attaching volumes will set instance_uuid instantly

This change allows the instance_uuid field to be set instantly when
beginning an attach action. The user will no longer have to wait for the
attachment to be complete to know what it is attaching to. If attaching
fails on the driver layer, we got error state and keep the instance_uuid
set for troubleshooting purposes.

blueprint instance-attached-field
Change-Id: Ie9860876ab865f766c0ae4cb616a45fd363931f8

11 years agoMerge "Unpin lxml requirements"
Jenkins [Wed, 28 Nov 2012 19:25:15 +0000 (19:25 +0000)]
Merge "Unpin lxml requirements"

11 years agoRevert changes to monkey_patch.
John Griffith [Wed, 28 Nov 2012 19:19:14 +0000 (12:19 -0700)]
Revert changes to monkey_patch.

As a work-around to deal with bug 1075838, we modified
monkey_patch in the Cinder binaries.  The root cause of the
issue is/was actually a bug in eventlet but this was a quick
work-around.

Since the change Change-Id: I69ba75136e32e95c6fdf108f0c4fe21a5e3bdbe6
to do this landed, the problem has also been addressed in Keystone.

So, let's revert this patch to get back the greenthread performance
that we may have lost with this change.  For now, everything should
be addressed as long as we don't implement multi api worker in Cinder,
if we do and the evenlet fix hasn't been released we'll need to turn
the modification back on for bin/cinder-api.

Change-Id: Ie845bade85dbceacd91f15e082325602d9a79c74

11 years agoMerge "Provide i18n to those messages without _()"
Jenkins [Wed, 28 Nov 2012 05:44:37 +0000 (05:44 +0000)]
Merge "Provide i18n to those messages without _()"

11 years agoMerge "Use auth_token middleware from keystoneclient."
Jenkins [Wed, 28 Nov 2012 05:21:24 +0000 (05:21 +0000)]
Merge "Use auth_token middleware from keystoneclient."

11 years agoMerge "Fix import order to make it alphabetical."
Jenkins [Wed, 28 Nov 2012 03:54:29 +0000 (03:54 +0000)]
Merge "Fix import order to make it alphabetical."

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 agoFix import order to make it alphabetical.
Matthew Treinish [Tue, 27 Nov 2012 16:01:05 +0000 (11:01 -0500)]
Fix import order to make it alphabetical.

Change-Id: I159d9f5a6d131485d6063985a4e1638878b7463e

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 agoUse auth_token middleware from keystoneclient.
Yaguang Tang [Tue, 27 Nov 2012 09:06:25 +0000 (17:06 +0800)]
Use auth_token middleware from keystoneclient.

auth_token middleware has been move from keystone to python-keystonecient,
so add python-keystoneclient dependence instead of keystone.Also adds
missing signing_dir option.

Change-Id: I24a4f422c35b721338c7519212c21ed2fbc255b3

11 years agoProvide i18n to those messages without _()
daisy-ycguo [Wed, 21 Nov 2012 16:16:04 +0000 (00:16 +0800)]
Provide i18n to those messages without _()

bug 1081498

There are a few log messages without _(), but a lot messages with _().
Wrap these log messages with _() in order to make the code consistent.

Change-Id: Ie8961453569e9a75bd0fd0733344db8059d05222

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 agoUnpin lxml requirements
Chuck Short [Sun, 25 Nov 2012 21:42:19 +0000 (15:42 -0600)]
Unpin lxml requirements

Ubuntu is using a much newer version of lxml so
we shouldn't lock the versions in our infrasctructure.

Change-Id: I73589af70e4156968f14d2494b3af36fa8f4794e
Signed-off-by: Chuck Short <chuck.short@canonical.com>
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."