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, 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