Many except blocks catch exceptions and only log partial information before raising a new exception. We should at least log the original exceptions information and traceback. Example below. In these cases, we should be logging the info with LOG.exception instead of LOG.error. Otherwise, it can be very difficult for an admin to determine the root issue.
https://github.com/openstack/cinder/blob/d943bafbb8908ba9f85be8e2a0e48a80d27ae48a/cinder/volume/flows/manager/create_volume.py#L465
464 except Exception as ex:
465 LOG.error(_("Failed to copy image %(image_id)s to " <--------------- If this were Log.exception, the exception details would be logged
466 "volume: %(volume_id)s, error: %(error)s") %
467 {'volume_id': volume_id, 'error': ex,
468 'image_id': image_id})
469 if not isinstance(ex, exception.ImageCopyFailure):
470 raise exception.ImageCopyFailure(reason=ex)
471 else:
472 raise
Fix proposed to branch: master /review. openstack. org/165380
Review: https:/