]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Add debug logging before attaching volume in driver
authorMatt Riedemann <mriedem@us.ibm.com>
Sun, 30 Aug 2015 15:27:45 +0000 (08:27 -0700)
committerMatt Riedemann <mriedem@us.ibm.com>
Mon, 31 Aug 2015 16:22:47 +0000 (09:22 -0700)
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

index e765693fbbfde0dd8e6179d01c1f14c4530b13fa..eafc4ed3260bef194f32cd041a76e2ad3e7eed80 100644 (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,