From: John Griffith Date: Tue, 27 Aug 2013 00:52:02 +0000 (+0000) Subject: Fix except in lvm.py X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=ccfc7e96ff6c2e56c5f94a8634c9d4270a5b07ce;p=openstack-build%2Fcinder-build.git Fix except in lvm.py Consolidation of brick exceptions into a single brick exception.py file neglected to updated files that were using it: (see change I577d403f02c2fd0d727d2694776008e1e9791453) The result is the lvm driver was doing an except on lvm.VolumeGroupNotFound which didn't exist anymore as it's in brick/exception now. We still need to clean up exceptions all through here, and this still isn't handled by service init anyway, but at least with this we are raising a valid exception. Change-Id: I588e9ac6548823b291d284f68f6133879bf3dfbf Fixes: bug 1216122 --- diff --git a/cinder/volume/drivers/lvm.py b/cinder/volume/drivers/lvm.py index 6e6ace625..c4e2794aa 100644 --- a/cinder/volume/drivers/lvm.py +++ b/cinder/volume/drivers/lvm.py @@ -26,6 +26,7 @@ import socket from oslo.config import cfg +from cinder.brick import exception as brick_exception from cinder.brick.iscsi import iscsi from cinder.brick.iser import iser from cinder.brick.local_dev import lvm as lvm @@ -84,7 +85,7 @@ class LVMVolumeDriver(driver.VolumeDriver): root_helper, lvm_type=self.configuration.lvm_type, executor=self._execute) - except lvm.VolumeGroupNotFound: + except brick_exception.VolumeGroupNotFound: message = ("Volume Group %s does not exist" % self.configuration.volume_group) raise exception.VolumeBackendAPIException(data=message)