]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Detect and fix issues caused by vol ID migration
authorJohn Griffith <john.griffith@solidfire.com>
Wed, 31 Oct 2012 22:43:09 +0000 (16:43 -0600)
committerJohn Griffith <john.griffith@solidfire.com>
Wed, 31 Oct 2012 22:43:09 +0000 (16:43 -0600)
commit7f34ba39abcaa4f885d7448b427148fab4e49892
treebd9ffc83aa93f6b95ed71b68e1df1eba80a955e4
parent1c99b242e97ebc8b46e2a9175091dbe0d117a26c
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
cinder/volume/driver.py
cinder/volume/iscsi.py
cinder/volume/manager.py
etc/cinder/rootwrap.d/volume.filters