Fix encryption key deletion error handling on volume delete
e.msg is only present for CinderExceptions, not all exception types. Closes-Bug: #1681874 Change-Id: I02601ae2a9ba95ab7145b86e24a094272f4cfbf6
This commit is contained in:
parent
3ecfc460b3
commit
6e2d8fd066
@ -467,9 +467,12 @@ class API(base.Base):
|
||||
if encryption_key_id is not None:
|
||||
try:
|
||||
self.key_manager.delete(context, encryption_key_id)
|
||||
except Exception as e:
|
||||
except exception.CinderException as e:
|
||||
LOG.warning("Unable to delete encryption key for "
|
||||
"volume: %s.", e.msg, resource=volume)
|
||||
except Exception:
|
||||
LOG.exception("Unable to delete encryption key for "
|
||||
"volume.")
|
||||
|
||||
self.volume_rpcapi.delete_volume(context,
|
||||
volume,
|
||||
|
Loading…
x
Reference in New Issue
Block a user