Improve attach/detach volume logging
Change-Id: I7569624ec1cfa8e47f8758996cd1fa66a99be67c
This commit is contained in:
parent
e84348a2da
commit
95ba50581a
@ -210,6 +210,10 @@ class Manager(periodic_task.PeriodicTasks):
|
|||||||
self.driver.attach_volume(context, volume)
|
self.driver.attach_volume(context, volume)
|
||||||
except Exception:
|
except Exception:
|
||||||
with excutils.save_and_reraise_exception():
|
with excutils.save_and_reraise_exception():
|
||||||
|
LOG.error("Failed to attach volume %(volume_id)s to "
|
||||||
|
"container %(container_id)s",
|
||||||
|
{'volume_id': volume.volume_id,
|
||||||
|
'container_id': volume.container_uuid})
|
||||||
volume.destroy()
|
volume.destroy()
|
||||||
|
|
||||||
def _detach_volumes(self, context, container, reraise=True):
|
def _detach_volumes(self, context, container, reraise=True):
|
||||||
@ -224,8 +228,10 @@ class Manager(periodic_task.PeriodicTasks):
|
|||||||
self.driver.detach_volume(context, volume)
|
self.driver.detach_volume(context, volume)
|
||||||
except Exception:
|
except Exception:
|
||||||
with excutils.save_and_reraise_exception(reraise=reraise):
|
with excutils.save_and_reraise_exception(reraise=reraise):
|
||||||
LOG.error("Failed to detach %(volume_id)s",
|
LOG.error("Failed to detach volume %(volume_id)s from "
|
||||||
{'volume_id': volume.volume_id})
|
"container %(container_id)s",
|
||||||
|
{'volume_id': volume.volume_id,
|
||||||
|
'container_id': volume.container_uuid})
|
||||||
volume.destroy()
|
volume.destroy()
|
||||||
|
|
||||||
def _use_sandbox(self):
|
def _use_sandbox(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user