Fix some ordering/pep8/hacking issues in preperation for re-enabling
full pep8/HACKING checks in tox.
Change-Id: I7151ac73d1ace5d98046580e6d1c6a1dcc6c4cef
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
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
Sync up with changes made in Nova, this adds information
about line continuation (PEP8), OpenStack capitalization,
and commit messages.
Change-Id: Id6637307411bcc7a3637ac514c4ec34e26481e0d
It seems many point in the internal API and openstack.common changed, but
this binary has been forgotten.
Also, context ie needed when using the notifier, so import it.
This fixes bug #1053502
Change-Id: I306b8671e7b0ed8c2ce2548a51a4c5e6393e13cb
Signed-off-by: Julien Danjou <julien@danjou.info>
Python ignores SIGPIPE on startup, because it prefers to check every
write and raise an IOError exception rather than taking the signal. Most
Unix subprocesses don't expect to work this way. This patch (adapted
from Colin Watson's post at http://tinyurl.com/2a7mzh5) sets SIGPIPE
back to the default action for cinder.utils.execute and cinder-rootwrap
created subprocesses.
Fixes bug 1053364
Change-Id: I4b3307bd2f0f5d0da529d8b7d80fabae28c57732
Cinder-manage migrate import only works from Nova/Folsom--->Cinder/Folsom
this change adds an explicit check of the nova migrate_version (133)
to make sure we have all of the volume id/uuid changes that are needed
to be compatable, and presents an error message if that's not the case.
Addresses bug #1052598
Change-Id: I7f32cf35e33320f4348b7bc44a8e92b5716b71d8
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
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.
Fixes LP Bug #1044386.
Change-Id: I7692a543cc67af2d342a64b84626de38c0a64f81
* Fixes bug 1039615
* Now that quotas are back we need to handle migration
of volume related quota data in the cinder-manage migrate helper
* Only resource types transferred are volumes and gigabytes
Change-Id: Idd9aab834612e929683491f47fa1e1861bdbd0d1
adding the volume notifications
added unit tests for notifications
added context for notify with rabbit
blueprint cinder-notifications
Change-Id: I5aef1e718eebb9a61e0670d524fcd5f438dee016
Helper cmds to transition from nova to cinder
Implements an import section in cinder-manage to transfer
applicable tables from local or remote Nova database into a
fresh Cinder database.
Also implements optional method to copy persistent target files.
Change-Id: I2e655e26c55f1986f3b1554726cead9e73ee9bd6
Align with recent changes in nova-rootwrap by marking the
root_helper option deprecated and introduce usage of the
rootwrap_config option instead. The root_helper option will still
fully be supported in Folsom, but will be removed in Grizzly.
Transition notes: you should replace:
root_helper=sudo cinder-rootwrap /etc/cinder/rootwrap.conf
by:
rootwrap_config=/etc/cinder/rootwrap.conf
Change-Id: I22a6d2bdee6ad2c5ad587ceec574cec4b2887f22
Port recent nova-rootwrap changes to cinder-rootwrap, including:
* Move filter definition from Python module to configuration files
* Fix tests execution on Fedora (bug 1027814)
* Remove executable bit on cinder/rootwrap files
This certainly needs a matching change to devstack to pass gating.
Change-Id: I963bc7890ba285ae515ea61bbd960bd2523f9061
- We are not using openstack.common.notifier just yet so handedit
openstack.common.log to use cinder.notifier now.
Change-Id: I9d912904c53a8ef5d90b4ab5792f5577701b6817
Final patch for blueprint common-rpc.
This patch removes cinder.rpc in favor of the copy in openstack-common.
Change-Id: I9c2f6bdbe8cd0c44417f75284131dbf3c126d1dd
Part of blueprint common-rpc.
This patch makes the rpc code use the global config object from
openstack-common. Based on some recent discussions on the mailing list,
this may not be the final way configuration handling is done here, but
it is certainly better than the register_opts() hack that is removed by
this patch.
Change-Id: Id128126e0bc064a2a1c710c6bd32fb3d137dc7f6
Cherry picks 00786bc from Nova.
Implements blueprint cfg-global-object
Replace cinder.flags.FLAGS with openstack.common.cfg.CONF.
In future, we can do a s/FLAGS/CONF/ across the codebase.
Change-Id: If213a4a5da1faf96aac82f34b18d1e0b061495c0
Part of blueprint common-rpc.
The function queue_get_for() is a utility function used by various
consumers of the rpc API. This function lived in the db API, but never
ended up using anything from the database. This patch moves it into the
rpc API so that it can be used by other users of rpc once it moves into
openstack-common.
Change-Id: If92675beecff5471b416a929c161b810e3c71939
Reviewed-on: https://review.openstack.org/9906
Reviewed-by: Vish Ishaya <vishvananda@gmail.com>
Approved: John Griffith <john.griffith@solidfire.com>
Tested-by: Jenkins
This convers the old flagfile style config files into the the
new .ini style config files. Since Cinder is new and it's first
release will only support .ini style files there's no need for
such a command.
Change-Id: Ie2f4cd8b6f5fc66547a59d39aa3d5eb896b1ddf4
Reviewed-on: https://review.openstack.org/9871
Reviewed-by: Huang Zhiteng <zhiteng.huang@intel.com>
Reviewed-by: Vish Ishaya <vishvananda@gmail.com>
Approved: John Griffith <john.griffith@solidfire.com>
Tested-by: Jenkins
This patch is part of effort to get Cinder to use openstack-common
package. This part is to replace time related functions in utils.py
with 'timeutils' module.
Implement blueprint cinder-common-timeutils
Change-Id: Ic5e9e317a95a7399f0604823eec76b3642a0c1b1