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.
John Griffith [Wed, 31 Oct 2012 22:43:09 +0000 (16:43 -0600)]
Detect and fix issues caused by vol ID migration
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: I4683df4ef489972752dc58cb4e91d458a79a8ef2 Fixes: bug 1065702enter the commit message for your changes. Lines starting
Sean Dague [Wed, 31 Oct 2012 15:39:40 +0000 (11:39 -0400)]
pin sqlalchemy to the 0.7.x series
sqlalchemy 0.8beta is now out and has internal changes
which means it's not an in place seemless upgrade. This pins
sqlalchemy to the 0.7.x series to avoid those breaks.
Thomas Goirand [Fri, 26 Oct 2012 11:07:48 +0000 (11:07 +0000)]
* Now uses pkgos_func functions for debconf and dbconfig-common handling.
* Renames /etc/sudoers.d/cinder_sudoers as /etc/sudoers.d/cinder-common.
* Debconf now users cinder/<debconf-screen-name> and not cinder-common/.
* Reviewed long and short descriptions in debian/control.
* Bumped Build-Depends-Indep: python-all to 2.6.6-3~ since we are using dh_python2.
* Added everyone in the team as Uploaders:.
* Changed Homepage field to http://cinder.openstack.org/.
* Dependencies are now by alpha order.
* Removed useless empty cinder-volume.postrm, cinder-api.postrm,
cinder-scheduler.postinst, cinder-scheduler.postrm.
* Pre-Depends: dpkg (>= 1.15.6~) because we use xz compression.
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.
This ensures that we fail-fast if the tgtd configuration does
not include the directory for volume iscsi target configs,
instead of only blowing up when tgtd is restarted.
The code in nova for logging added an extra root handler to be
able to log messages to the console during log setup. This handler
was removed in the setup method. The common setup method no longer
removes this handler, so don't create it. Note that there may be
a small period before the logging setup is finished where messages
will not appear.
Currently nova and cinder have to have the same set of az's for
the ec2 api to work properly. Therefore, set the default az for
cinder to nova so they will match.
Includes a hack to az to set cinder to nova to work around gate
issues. The hack can be removed once the gate sets the zone to
nova properly.
John Griffith [Thu, 20 Sep 2012 23:27:13 +0000 (17:27 -0600)]
Add lun number (0) to model_update in HpSanDriver
The HpSanDriver was not setting the lun number in model_update
and as a result default value of 1 was being used. Trouble is the
Lun number used by LeftHand is 0, so the connect info would be
wrong and fail when trying to attach the volume.
Even when the san_is_local config option was set to false, the
SolarisISCSIDriver's _execute method was accidentally set to
util.execute by the VolumeDriver's __init__ method.
John Griffith [Tue, 18 Sep 2012 19:29:20 +0000 (13:29 -0600)]
Add nova migrate_version check to cinder import
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.
John Griffith [Mon, 17 Sep 2012 21:36:10 +0000 (15:36 -0600)]
Clean up db.volume_create()
Adding the metadata return to db.volume_create() introduced some
messy and unnecessary repitition in the code. This patch
cleans that up and makes use of existing volume_get functions rather
than duplicating the code in volume_create.
This syncs cinder up with the patch as it's been submitted for nova
in https://review.openstack.org/#/c/10461/
Update quota when deleting volume that failed to be scheduled
If one volume was failed to get scheduled, removing such volume should
also clean up reservation.
Also when create_volume is ready to send to scheduler, reservation
should be committed no matter backend can successfully create that
volume or not since deleting volume call will do a minus reservation
even on volume with 'error' status.
John Griffith [Thu, 13 Sep 2012 16:53:52 +0000 (10:53 -0600)]
Add a resume delete on volume manager startup
Currently if for some reason the volume service was stopped
during the zero out operation of a volume delete there was
no way to get the volume removed from the system (it would
be present in deleting status forever).
This change adds a simple check of volumes in the DB with status
of deleting, and if any are found it restarts the delete process
on them.