Log detailed attach/detach volumes info
Change cinder-volume logs level from debug to info to have information about volume attach/detach usage. Need to change cinder.conf for usage 'resource' variable in log messages. Change-Id: I32257d8b80f5089d567af6d808e9d6d357dc70ff Partial-Bug: #1642571
This commit is contained in:
parent
850a197226
commit
55e3d5cf68
@ -993,12 +993,12 @@ class VolumeManager(manager.CleanableManager,
|
||||
# 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)
|
||||
LOG.info(_LI('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,
|
||||
@ -1075,11 +1075,11 @@ class VolumeManager(manager.CleanableManager,
|
||||
# and the volume status updated.
|
||||
utils.require_driver_initialized(self.driver)
|
||||
|
||||
LOG.debug('Detaching volume %(volume_id)s from instance '
|
||||
'%(instance)s.',
|
||||
{'volume_id': volume_id,
|
||||
'instance': attachment.get('instance_uuid')},
|
||||
resource=volume)
|
||||
LOG.info(_LI('Detaching volume %(volume_id)s from instance '
|
||||
'%(instance)s.'),
|
||||
{'volume_id': volume_id,
|
||||
'instance': attachment.get('instance_uuid')},
|
||||
resource=volume)
|
||||
self.driver.detach_volume(context, volume, attachment)
|
||||
except Exception:
|
||||
with excutils.save_and_reraise_exception():
|
||||
|
Loading…
x
Reference in New Issue
Block a user