19830 Commits

Author SHA1 Message Date
Jenkins
0a6789462e Merge "Typo nova => cinder" 2012-09-07 14:46:35 +00:00
Jenkins
fb789516b0 Merge "Remove unused db api" 2012-09-07 14:46:12 +00:00
Mark McLoughlin
2c7c976537 Remove unused utils.wrap_exception
Moved into utils by commit 6ad36074, but it hasn't been used in cinder
since commit 9e4242c3 which prepared for switching to common rpc.

Change-Id: I9dff70e81c0bae36f26df893ac6971e17ba46bb3
2012-09-07 11:29:00 +01:00
Mark McLoughlin
e2553117e1 Sync notifier changes from openstack-common
Syncs the following from stable/folsom:

 c767e9b Add multiple-driver support to the notifier api.

Also remove notification_driver from cinder.flags. This should
have been done when first adopting this code from openstack-common
since the option is defined there now.

Note: I've left the cinder-specific change to use cinder's context
rather than openstack-common's context.

Change-Id: I6ff4b5d45ca9cc4acaf37c62c143f2886ebee423
2012-09-07 09:26:59 +01:00
Rongze Zhu
a17fc22b4d Clean up some codes about compute in VolumeTestCase
self.compute have not be assigned in VolumeTestCase, so clean up some
codes about it.

Change-Id: Ie2577065ad27b4ee5b54dec65adfe723bf93985f
2012-09-07 14:47:51 +08:00
Rongze Zhu
aba4dcbf9d Remove unused db api
service_get_all_compute_by_host and service_get_all_compute_sorted are
not be used by cinder.

Change-Id: Ie384d2666bbfea1d5fab74e4e3e021909f6c0e3f
2012-09-07 14:40:45 +08:00
Jenkins
e5a2cd8976 Merge "Fixes potential bugs found by pylint" 2012-09-07 06:36:02 +00:00
Rongze Zhu
3e9b64c09e Typo nova => cinder
Change-Id: I715feee8ca84fb65518e750585f82e942e710ecd
2012-09-07 14:25:27 +08:00
Rongze Zhu
f926eb6f7c Remove vpn_ping function in cinder/utils.py
vpn_ping is not be used by cinder.

Change-Id: I3ea04200360a23259ce3cce54ff88125895e217b
2012-09-07 14:13:11 +08:00
John Griffith
2d211b6699 Update SolidFire driver to reflect IQN changes
Prior to release the SolidFire device returned only
 a partial iqn string in it's api call.

 With the GA release, this was modified to return the entire
 iqn string, so just drop the prefix we were using in beta.

Change-Id: I7fa9d1ec6e2639149375a1115198eee90c527ef1
2012-09-06 23:52:55 -06:00
Rongze Zhu
21f415347a Rename test_nova_rootwrap.py to test_cinder_rootwrap.py
Change-Id: I13554b7afa994ec7c68e86e27568110445d1e4ed
2012-09-07 12:21:40 +08:00
Rongze Zhu
590d3e7b0f Fixes potential bugs found by pylint
Partial fixes bug #1043884

* 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.

Change-Id: I3e989b940b6a99ac7751c940fa766aa13c61607b
2012-09-07 11:16:36 +08:00
Dan Prince
42cfb8fbb2 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.

This was a regression from a previous commit
(9785963c841aff5ea1c159da81f93c2bf62c70c6) which changed the way iscsi
targets are created/deleted.

Fixes LP Bug #1046484.

Change-Id: Ie762b092dd2a84fe4f3b72c46c03a97ae67c53b7
2012-09-06 22:52:35 -04:00
Jenkins
2cd6a4d68f Merge "Sync cfg changes from openstack-common" 2012-09-06 23:31:02 +00:00
Jenkins
956fb8236a Merge "Sync misc changes from openstack-common" 2012-09-06 23:30:11 +00:00
Jenkins
66eb4a1eb4 Merge "Sync zmq changes from openstack-common" 2012-09-06 23:29:51 +00:00
Jenkins
8235a22f19 Merge "Remove default_schedule_zone." 2012-09-06 23:28:06 +00:00
Jenkins
1d92751ccf Merge "Remove memcached_servers config option." 2012-09-06 23:09:43 +00:00
Jenkins
5c0c72051f Merge "Remove dependencies for netaddr." 2012-09-06 22:49:39 +00:00
Jenkins
5edbbd3f34 Merge "Fix Typo in LOG.error" 2012-09-06 22:49:07 +00:00
Jenkins
d16b820dd5 Merge "Specify the conf file when creating a volume." 2012-09-06 22:47:05 +00:00
Jenkins
01b1a9e179 Merge "Fix xml metadata for volumes api in cinder." 2012-09-06 22:30:57 +00:00
Dan Prince
0903603971 Specify the conf file when creating a volume.
Updates the tgt-admin command to actually use the config file
we create for the volume being created.

This fixes an issue introduced in
9785963c841aff5ea1c159da81f93c2bf62c70c6 which breaks iscsi
volume creation.

Fixes LP Bug #1046985.

Change-Id: I06e83c9ba351c2b4846b557a3abb170a51d506c0
2012-09-06 17:41:56 -04:00
Pádraig Brady
d9b8a5189f avoid the buffer cache when copying volumes
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.

Fixes bug: 937694
Change-Id: Ic842d7b83209c41d8ff05075990ed12e6f86283a
2012-09-06 20:37:41 +01:00
Jenkins
5d72e7a40e Merge "Add admin actions extension" 2012-09-06 19:24:57 +00:00
Chuck Short
d6a5d0f9fa Fix Typo in LOG.error
Fix typo in LOG.error, it should be
vol_id rather than volume_id.
Fixes bug #1046875

Change-Id: Id162c6f185a110b63e8f9f509f5cde75f3626cbf
Signed-off-by: Chuck Short <chuck.short@canonical.com>
2012-09-06 09:53:30 -05:00
Dan Prince
7b458073ce 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
2012-09-06 09:18:14 -04:00
Clay Gerrard
aef9f4ab05 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.

Fixes: bug #1046353

Change-Id: Ia12ffe1bf8a27c8a78daa24c4b728b394932a2b0
2012-09-05 13:32:21 -05:00
Dan Prince
e756bb932d 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.

Change-Id: I05d4f227f1278c827ace2ce3c62319f9b18d04d4
2012-09-05 13:22:55 -04:00
Dan Prince
6985bf48be Remove default_schedule_zone.
We don't use this config options.

Change-Id: I94a7940dc74341580ab954ffcda1f91fb5433e3f
2012-09-05 13:22:55 -04:00
Dan Prince
c86483b596 Remove memcached_servers config option.
We don't use this in Cinder.

Change-Id: Id8503ff373622a2667fe0575f79e089056677019
2012-09-05 13:22:55 -04:00
Dan Prince
802c05b86a Regenerate cinder.conf.sample.
Create a new version of cinder.conf.sample using
tools/conf/generate_sample.sh.

Old version had 475 options.

New version has 133 options (more accurate).

Change-Id: Id60aec1d91179a294e1969b7ab1f54051cb7a728
2012-09-05 13:22:55 -04:00
Dan Prince
0094303e36 Sync improvements to config file generator tools.
We made some improvements to the config file generator in
Nova during Folsom including spacing and formatting changes.

This patch merges these into Cinder so we can make use of
them to generate a new sample config file.

Change-Id: I1e1166ac6e2a28cc179223e5af547995f58b36e6
2012-09-05 13:22:55 -04:00
Jenkins
b7745f5e8d Merge "Removed unnecessary call to ensure_export" 2012-09-05 17:19:01 +00:00
Mark McLoughlin
46060d6416 Sync misc changes from openstack-common
Syncs the following changes from stable/folsom:

 769ec65 Don't trap then re-raise ImportError.
 202b8b7 Fix spelling typos
 01b4f31 Support for marshalling datetime while preserving microseconds.

Change-Id: I6ed5e71ed18cdf3c528351713a42645f31fd8965
2012-09-05 12:23:53 +01:00
Mark McLoughlin
dc89c6f3d2 Sync zmq changes from openstack-common
Syncs the following from stable/folsom:

 9f9e14c Update zmq context cleanup to use term.
 704fb8b Remove register_opts from client methods
 f88d38b Rename FLAGS to CONF; Remove self.conf

Change-Id: Ic6ab732d71420aba032554c51904dd71f1d23b78
2012-09-05 12:19:49 +01:00
Mark McLoughlin
8eb64625e5 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

Change-Id: Ifa85280fdc072965f3e9ae8641bdf85268a9a6ac
2012-09-05 12:09:27 +01:00
Jenkins
700583d262 Merge "Fix bug where image size is incorrectly rejected." 2012-09-04 17:59:05 +00:00
Jenkins
5586119f4a Merge "Make size optional when creating a volume from a snap" 2012-09-04 17:56:21 +00:00
Matthew Treinish
51a008dfdb Fix xml metadata for volumes api in cinder.
Fixes bug 1040891.

Change-Id: Idf8cc641162617ade2aeb77b666270cf1ce54c54
Signed-off-by: Matthew Treinish <treinish@linux.vnet.ibm.com>
2012-09-04 11:14:57 -04:00
Dermot Tynan
ffe5036fa0 Fix bug where image size is incorrectly rejected.
Fixes bug 1043952.

Added GB-1 (one byte less than a gig) to the numerator to
correct round-off errors.

Change-Id: I6d97f3c53ab5a8ff5a0752400fd189f23223958f

Fixed PEP8 complaints.

Change-Id: Iacecddd4e65c80964f4860d6580872d897ec2356
2012-09-04 15:05:11 +00:00
Jenkins
bdba7e3bbf Merge "Several hacking compliance fixes." 2012-09-04 03:24:45 +00:00
Dan Prince
b60c3909ce Several hacking compliance fixes.
Updates bin/nova-manage and the solidfire driver with several
hacking compliance fixes.

Makes it so run_tests.sh -p runs clean again.

Change-Id: Iee675cae06acda6a585a77073e773651aab9d5a1
2012-09-03 22:17:06 -04:00
Dan Prince
56405da849 Remove Cheetah from pip-requires.
We don't use Cheetah so no need to install it w/ pip.

Change-Id: I29ea1b0ec2bf2eaebe4378c15c3cfc0caebabf99
2012-09-03 22:02:22 -04:00
John Griffith
922fdd0bdc 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

Change-Id: I0089c388524c9def7494658e836f4ed03a61f5b5
2012-09-03 17:18:10 -06:00
RongzeZhu
bedc8b6622 Typo fix: nova => cinder
Change-Id: I816473b3aa7de16bd2d8569c695c6ced9e1d9033
2012-09-03 12:27:45 +08:00
Ben Swartzlander
c58e87cfe1 Move newly created NFS exceptions to standard location in exception.py
Addresses bug 1037619

bug 1037619

Change-Id: I20b1c612c03ef90eeb074814b979a9bc7492109c
2012-08-31 22:44:15 -04:00
Jenkins
99e8882f5f Merge "Remove unused flags" 2012-09-01 00:57:54 +00:00
Clay Gerrard
c191d0d10c 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.

Example of os-reset_status action on a volume:

curl http://localhost:8776/v1/${PROJECT_ID}/volumes/${VOLUME_ID}/action \
    -H 'x-auth-token: ${ADMIN_AUTH_TOKEN}' \
    -H 'content-type: application/json' \
    -d '{"os-reset_status": {"status": "error"}}'

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.

Partial fix for bug #1039706

Change-Id: I29f4b892a99108b6c24eebc3eb58033a9e01e679
2012-08-31 14:58:13 -05:00
Jenkins
fe70a0ebc4 Merge "Use event.listen() instead of deprecated listeners kwarg" 2012-08-31 16:41:24 +00:00