Detach volumes when unavailable
This patch makes sure we detach a volume if is unavailable before raising a DeviceUnavailable exception.
This commit is contained in:
parent
0c2a82a8bf
commit
f6cb4ed3b3
@ -5,6 +5,10 @@ History
|
||||
0.2.3 (2018-MM-DD)
|
||||
------------------
|
||||
|
||||
- Bug fixes:
|
||||
|
||||
- Detach a volume when it's unavailable.
|
||||
|
||||
- Features:
|
||||
|
||||
- Provide better message when device is not available.
|
||||
|
@ -726,6 +726,7 @@ class Connection(Object, LazyVolumeAttr):
|
||||
LOG.exception(error_msg)
|
||||
|
||||
if error_msg:
|
||||
self.detach(force=True, ignore_errors=True)
|
||||
raise cinder_exception.DeviceUnavailable(
|
||||
path=self.path, attach_info=self._ovo.connection_information,
|
||||
reason=error_msg)
|
||||
|
Loading…
Reference in New Issue
Block a user