Add debug logging before attaching volume in driver

It'd be helpful to log the volume/instance/mount/host
information in attach_volume before calling the volume
driver to do the attachment to know we have the right
values.

Change-Id: I8e1111e900032d19d5c46bad266b79b050b40851
Related-Bug: #1205344
This commit is contained in:
Matt Riedemann 2015-08-30 08:27:45 -07:00
parent ea67b21c72
commit a661f96b72
1 changed files with 6 additions and 0 deletions

View File

@ -857,6 +857,12 @@ class VolumeManager(manager.SchedulerDependentManager):
# and the volume status updated.
utils.require_driver_initialized(self.driver)
LOG.debug('Attaching volume %(volume_id)s to instance '
'%(instance)s at mountpoint %(mount)s on host '
'%(host)s.',
{'volume_id': volume_id, 'instance': instance_uuid,
'mount': mountpoint, 'host': host_name_sanitized},
resource=volume)
self.driver.attach_volume(context,
volume,
instance_uuid,