From a661f96b72d88c80f75470551975c6ca761c963e Mon Sep 17 00:00:00 2001 From: Matt Riedemann Date: Sun, 30 Aug 2015 08:27:45 -0700 Subject: [PATCH] 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 --- cinder/volume/manager.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cinder/volume/manager.py b/cinder/volume/manager.py index e765693fb..eafc4ed32 100644 --- a/cinder/volume/manager.py +++ b/cinder/volume/manager.py @@ -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, -- 2.45.2