From 671cd61704551a5d1fd753bb890650edd6dcd152 Mon Sep 17 00:00:00 2001 From: Avishay Traeger Date: Sun, 12 Jan 2014 15:43:34 +0200 Subject: [PATCH] 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 --- cinder/volume/manager.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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 -- 2.45.2