From: Eric Harney Date: Wed, 25 Sep 2013 19:43:32 +0000 (-0400) Subject: Allow upgrade from Grizzly with ThinLVMVolumeDriver X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=63fc867ab709a20c3417cada12b327774bf612e6;p=openstack-build%2Fcinder-build.git Allow upgrade from Grizzly with ThinLVMVolumeDriver In Grizzly, LVM thin provisioning was used by setting volume_driver=...ThinLVMVolumeDriver. In Havana this functionality has moved under the standard LVM driver with the option "lvm_type=thin" used to enable it. We should account for the old volume_driver class path so that the volume service behaves as expected for users upgrading from Grizzly ThinLVM configurations. Closes-Bug: #1231116 Change-Id: Ic29f0e5c1036232078af5c6d83c61c75a35cccd4 --- diff --git a/cinder/volume/manager.py b/cinder/volume/manager.py index 34b4357ab..2cbee5928 100644 --- a/cinder/volume/manager.py +++ b/cinder/volume/manager.py @@ -152,6 +152,14 @@ class VolumeManager(manager.SchedulerDependentManager): LOG.warn(_("Driver path %s is deprecated, update your " "configuration to the new path."), volume_driver) volume_driver = MAPPING[volume_driver] + if volume_driver == 'cinder.volume.drivers.lvm.ThinLVMVolumeDriver': + # Deprecated in Havana + # Not handled in MAPPING because it requires setting a conf option + LOG.warn(_("ThinLVMVolumeDriver is deprecated, please configure " + "LVMISCSIDriver and lvm_type=thin. Continuing with " + "those settings.")) + volume_driver = 'cinder.volume.drivers.lvm.LVMISCSIDriver' + self.configuration.lvm_type = 'thin' self.driver = importutils.import_object( volume_driver, configuration=self.configuration,