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.
Dan Prince [Fri, 7 Sep 2012 01:54:16 +0000 (21:54 -0400)]
Nail the pip requirement at 1.1.
The most recent version of pip (1.2.1 as of a couple days ago) fails
to install the required Cinder .venv packages. Nailing the installed
pip version when using run_tests.sh seems like a reasonable solution
to this issue.
John Griffith [Wed, 5 Sep 2012 19:27:48 +0000 (19:27 +0000)]
Don't zero out snapshot volume on snapshot_delete
When trying to zero out an LVM snapshot on precise the kernel sometimes
hangs when performing the dd. Also the dd process itself can take
an extremely long time even when it does succesfully complete.
This can be up to 30 minutes for a 1 Gig volume/snapshot.
I believe this is a kernel specific issue with LVM snapshots. The
zeroing process is unreliable and can cause kernel hangs to let's remove it.
In order to protect against data leakage we'll implement the zeroing process
on volume creation. This doesn't seem to have a significant impact and doesn't
suffer from the same isues tha zeroing out an LVM snapshot does.
No reason to continue zero on delete, the zero on creation should
probably be sufficient.
Doesn't seem to cause any timing issues but need to keep this in mind.
John Griffith [Sat, 8 Sep 2012 16:40:55 +0000 (10:40 -0600)]
Recent changes to SolidFire API changed iqn format
The SF API initially didn't supply the in prefix so we
formed it manually in the OpenStack driver.
This has been fixed in the API so we dropped the manual
build of the prefix in volume create. Unfortunatly missed
the same case needed in create-from-snapshot.
Going forward we're adding running integration tests against
SF to catch this sort of thing.
Merge "Update dev docs * Quick pass at implementing the basics for cinder dev docs * Remove the N/A compute related stuff * Clean up the architecture a bit to only show cinder related * Remove various modules form TOC's that aren't applicable"
* remove _ec2_volume_get_query and _ec2_snapshot_get_query in
cinder.db.sqlalchemy.api, because they no longer be used in cinder.
* import openstack.commmon.utils.timeutils, because notify_usage_exists use it.
Dan Prince [Fri, 7 Sep 2012 02:52:35 +0000 (22:52 -0400)]
Handle missing 'provider_location' in rm_export.
Updates the remove_export function in the ISCSIDriver so that
it handles the case where provider_location isn't set on
a volume. This can occur if a volume is created but not exported.
The dd process when clearing volumes, was seen to starve
the system when writing to an iSCSI SAN connected over GigE.
So use O_DIRECT within the dd process so that the system
buffer cache is not impacted, which is generally the
best thing to do when streaming large amounts of data.
Also one could drop the I/O priority of the dd process
by prepending "ionice -c3". That would change the priority
from "normal" (best effort) to "idle", which means zeroing
will only proceed when there is no other I/O on the system.
It was thought best to leave scheduling decisions to the
system however, rather than specifying them explicitly.
Dan Prince [Tue, 4 Sep 2012 02:11:59 +0000 (22:11 -0400)]
Remove dependencies for netaddr.
Updates cinder utils.py to remove the parse_server_string and
is_valid_cidr functions. These functions aren't in use
and are the only reason we need the netaddr dependency.
Updates pip-requires to drop the netaddr dependency.
Also removes the unit tests for removed functions.
Change-Id: I521ae60b758324069fb1ffa1701b1f9deb780f65
Clay Gerrard [Fri, 31 Aug 2012 20:16:29 +0000 (20:16 +0000)]
Filter volumes and snapshots by query string
Fix query string search_opts filters in api.openstack.volume.volumes and
snapshots. Fix get_all methods in volumes.api to adequately handle
parameter matching.
The current api does not properly apply query string filters by
display_name, status, or (in the case of snapshots) volume_id. These
filters are needed both for the end user and operator to display logical
grouping of these resources.
Dan Prince [Wed, 5 Sep 2012 17:20:54 +0000 (13:20 -0400)]
Remove null_kernel option.
This option was only used in the image/fake.py class. In this patch
I've updated the fake to use an inline 'nokernel' string instead of
this option which we don't make use of in the runtime Cinder code.
Mark McLoughlin [Wed, 5 Sep 2012 11:04:16 +0000 (12:04 +0100)]
Sync cfg changes from openstack-common
Syncs the following from stable/folsom:
4dc2043 cfg: clean up None value handling 513bd3a Allow set_default and set_override to use None 0a36c92 Tilde expansion for --config-file and --config-dir 038d597 Add import_opt() method to ConfigOpts
John Griffith [Mon, 3 Sep 2012 23:16:49 +0000 (17:16 -0600)]
Update dev docs
* Quick pass at implementing the basics for cinder dev docs
* Remove the N/A compute related stuff
* Clean up the architecture a bit to only show cinder related
* Remove various modules form TOC's that aren't applicable
Clay Gerrard [Mon, 27 Aug 2012 07:48:32 +0000 (07:48 +0000)]
Add admin actions extension
The optional os-admin-actions extension adds new wsgi_actions to the
volumes/action resource and a new snapshots/action endpoint.
With this extension both controllers will support an os-reset_status
action to force a database update of a volume or snapshot that is stuck
in a failed/incorrect status. The os-reset_status action works
similarly to the compute api's os-reset_state action for instances.
The os-force_delete action behaves similarly to the "cinder-manage
volume delete" command and allows operators/admins to retry the delete
operation after it has gone into an error_deleting status with an admin
api call.
The os-admin-actions extension is enabled by default, but limited to the
admin api by the default policy.json rules. Individual admin actions
can be disabled with policy rules as well.
The new admin only api can assist deployers who encounter bugs or
operational issues that result in failed actions.
It can also be used by future storage backends to support async callback
style status updates from long running actions or operations which have
encountered an error will be retried.
Also updates the api.openstack.wsgi.ControllerMetaclass to support
sub-classing wsgi.Controllers that define wsgi_actions.
Dan Prince [Fri, 31 Aug 2012 13:56:50 +0000 (09:56 -0400)]
Add cinder- prefix to all binaries.
Renames clear_rabbit_queues and volume-usuage-audit binaries
so that they are prefixed with 'cinder-'.
As part of this change the clear_rabbit_queues binary was changed
to use dashes instead of underscores for consistency with the rest
of the cinder binaries.
Chuck Short [Tue, 28 Aug 2012 20:06:25 +0000 (15:06 -0500)]
Fix creation of iscsi targets
Previously when creating iscsi volumes, we were using
tgt-admin -e -c <config file> --update volume-id
Unfortunately the side affect of this is that tgt-admin
removed other volumes that weren't connected to an iscsi
connector. Which is obvlously not what we want.
In order to fix this we create the targets.conf for the
volume but we call tgt-admin --update icssi qualified name.
We're dropping the use of iscsi_targets table when using TgtAdm.
Compatability for other target admin types is maintained.
John Griffith [Thu, 16 Aug 2012 21:52:52 +0000 (15:52 -0600)]
Implement volume quota support in Cinder
parital fix for bug 1023311
* To use needs cinderclient https://review.openstack.org/#/c/11509/
* Updates quota classes with changes in Nova
* Adds needed quota related DB tables
* Updates test_quota to reflect changes in Nova
* Adds absolute limits and empty rate limit functions
* Updates test/integration/test_volume to make it work w/ above changes
When attach a volume , the volume status is "available -> attaching ->
in-use", But when detaching a volume , the volume status is "in-use ->
available". So We need 'detaching' volume status, it make the change of
state of the volume more clearly.
Rongze Zhu [Thu, 23 Aug 2012 03:00:08 +0000 (03:00 +0000)]
Typo fix in cinder: existant => existent
Impact:
* locale message in cinder/locale/*/LC_MESSAGES/nova.po
* locale message in cinder/locale/nova.po
* Test function names
* Test strings and comments