From: Avishay Traeger Date: Sun, 12 Jan 2014 13:43:34 +0000 (+0200) Subject: Print driver exception on retype X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=671cd61704551a5d1fd753bb890650edd6dcd152;p=openstack-build%2Fcinder-build.git Print driver exception on retype If the driver raises an exception, make sure it is printed. Also change the logging level from info to error because an exception should not be thrown under normal conditions. Change-Id: I003959c3f7c7667124ef61911587012fd4e1d667 Closes-Bug: #1268294 --- diff --git a/cinder/volume/manager.py b/cinder/volume/manager.py index d95b0b0e8..fdb3f7e8b 100644 --- a/cinder/volume/manager.py +++ b/cinder/volume/manager.py @@ -1101,11 +1101,12 @@ class VolumeManager(manager.SchedulerDependentManager): diff, host) if retyped: LOG.info(_("Volume %s: retyped succesfully"), volume_id) - except Exception: + except Exception as ex: retyped = False - LOG.info(_("Volume %s: driver error when trying to retype, " - "falling back to generic mechanism."), - volume_ref['id']) + LOG.error(_("Volume %s: driver error when trying to retype, " + "falling back to generic mechanism."), + volume_ref['id']) + LOG.exception(ex) # We could not change the type, so we need to migrate the volume, where # the destination volume will be of the new type