478 Commits

Author SHA1 Message Date
Chuck Short
2adf688923 Add pyflakes
Add tox option to use pyflakes.

Change-Id: Ic77ec3f54cb89341d5b01feb3417e07f43d20c9c
Signed-off-by: Chuck Short <chuck.short@canonical.com>
2013-01-02 08:44:42 -06:00
Jenkins
18269eaad8 Merge "Add EMC Volume Driver in Cinder" 2012-12-28 01:47:36 +00:00
Xing Yang
21788e4a42 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
2012-12-25 17:41:55 -05:00
Jenkins
4c42d1eb86 Merge "Make the NetAppISCSIDriver._is_clone_done() method able to handle empty responses. Add unit tests to exercise this case." 2012-12-22 07:00:09 +00:00
Vishvananda Ishaya
c2e9e2f378 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
2012-12-21 09:34:51 -08:00
Ben Swartzlander
035cd28ed3 Make the NetAppISCSIDriver._is_clone_done() method able to handle
empty responses. Add unit tests to exercise this case.

bug 1090168

Change-Id: Ia51a73b8ebead7a0f3be9202794ca8549bdf3e5b
2012-12-21 00:24:46 -05:00
Vishvananda Ishaya
cbcd340c67 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
2012-12-20 13:49:47 -08:00
Walter A. Boring IV
3b02985805 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
2012-12-19 12:01:33 -08:00
Jenkins
319221d567 Merge "Moving host admin extension with other extensions" 2012-12-19 18:02:27 +00:00
Jenkins
deb88ed7cb Merge "Fixes a Windows volume driver bug on disk export" 2012-12-19 18:02:06 +00:00
Alessandro Pilotti
147e30b4a8 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
2012-12-19 17:36:44 +02:00
Jenkins
10c6c7cfcb Merge "Add image metadata API extension" 2012-12-19 05:00:51 +00:00
Mike Perez
afe1d21988 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
2012-12-18 20:26:29 -08:00
Vishvananda Ishaya
f61e854460 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
2012-12-17 16:11:20 -08:00
Jenkins
792d3a166b Merge "CHAP support for IBM Storwize/SVC driver." 2012-12-17 04:13:51 +00:00
Avishay Traeger
be3d8ea90a 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
2012-12-16 11:39:28 +02:00
Jenkins
5bda255e64 Merge "Remove instance quota re-sync code" 2012-12-15 04:29:12 +00:00
Jenkins
e10da6e8ee Merge "Support glance servers over https" 2012-12-14 16:24:39 +00:00
Eoghan Glynn
33b21f3f46 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
2012-12-14 14:27:18 +00:00
Nikola Dipanov
349d5bdf0e 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
2012-12-14 09:04:27 +01:00
Sam Morrison
403142a43f 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
2012-12-14 14:01:59 +11:00
john-griffith
11c80571ae Add *.swp to gitignore.
Add swap files and alphabetize the list.

Change-Id: Idaa9aec831740aa965a8d2d2486f4d9ffbb50746
2012-12-13 16:57:40 -07:00
Sam Morrison
db9cf2bca1 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
2012-12-13 12:17:00 +11:00
Jenkins
97ec985303 Merge "Changing display_name to name in v2 api" 2012-12-12 18:17:30 +00:00
Carlos Goncalves
65b3421f4b Add commands used by NFS volume driver to rootwrap
Fixes bug 1087282

Change-Id: Ib873c334633b4d586c2e53bac5d1cae0dcf65be7
2012-12-10 00:36:31 +00:00
Mike Perez
484fb9e1c7 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
2012-12-08 12:21:00 -08:00
Jenkins
29b9290cb9 Merge "Make copy_to_volume a bit more useful." 2012-12-08 04:21:13 +00:00
Mike Perez
0c507aa6d0 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
2012-12-07 15:24:39 -08:00
Mike Perez
29b3da71bf 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
2012-12-06 18:05:30 -08:00
john-griffith
6a31bf3e43 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
2012-12-06 14:01:06 -07:00
John Griffith
ad770a3eae Delete type call in api needs update to use ID.
51a438c8f3
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
2012-12-06 13:44:20 -07:00
john-griffith
51a438c8f3 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
2012-12-04 11:50:49 -07:00
Jenkins
b1e4232996 Merge "Rename Config osapi_compute_link_prefix to osapi_volume_base_URL" 2012-12-03 15:09:52 +00:00
Jenkins
c4a4a4e59d Merge "Revert changes to monkey_patch." 2012-12-02 16:10:34 +00:00
Jenkins
9d73415f11 Merge "Fix exception when size is None." 2012-11-30 23:17:51 +00:00
sathish-nagappan
842521cb12 Rename Config osapi_compute_link_prefix to osapi_volume_base_URL
fixes Bug #1046451

Renamed the config option.

Change-Id: Ia6eb057a11828bdc216e0bddbd29855285ba938c
2012-11-30 14:55:33 -08:00
Matthew Treinish
503e92332d 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
2012-11-30 13:39:02 -05:00
Jenkins
e1b834a294 Merge "attaching volumes will set instance_uuid instantly" 2012-11-30 17:42:58 +00:00
Russell Bryant
31629f637b 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
2012-11-30 09:19:05 -05:00
Mike Perez
e27b171883 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
2012-11-30 00:56:58 -08:00
Jenkins
de14700f95 Merge "Unpin lxml requirements" 2012-11-28 19:25:15 +00:00
John Griffith
44a2b8949f 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
2012-11-28 12:23:28 -07:00
Jenkins
79e0052e79 Merge "Provide i18n to those messages without _()" 2012-11-28 05:44:37 +00:00
Jenkins
4b6ba6eeb9 Merge "Use auth_token middleware from keystoneclient." 2012-11-28 05:21:24 +00:00
Jenkins
e40ec2d832 Merge "Fix import order to make it alphabetical." 2012-11-28 03:54:29 +00:00
Adam Gandelman
d030c5b10e 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
2012-11-27 17:52:01 -08:00
Matthew Treinish
2bdc7a7feb Fix import order to make it alphabetical.
Change-Id: I159d9f5a6d131485d6063985a4e1638878b7463e
2012-11-27 16:21:57 -05:00
Jenkins
d81113f55e Merge "Fix None being passed into as_int()." 2012-11-27 21:08:17 +00:00
Jenkins
dc9f03901a Merge "Make pep8 checks a bit stricter." 2012-11-27 16:32:23 +00:00
Matthew Treinish
3fe5bd6a71 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
2012-11-27 10:58:00 -05:00