From 81f462778ff03e746a60d08d0b4bb489ebd1aa69 Mon Sep 17 00:00:00 2001 From: Rajat Dhasmana Date: Fri, 6 Aug 2021 02:05:37 -0400 Subject: [PATCH] Log connection info returned from driver Currently there is no way to verify the connection info returned from the driver to cinder is the same as what cinder sends to nova (or other consumers) to connect to the volume. This log will help narrow down issues during attachments since there are many components involved (nova, cinder, os-brick). Change-Id: I8ed3567f8ae6c6384244cc1d07f1eaafbd7bf58e (cherry picked from commit 6a0b41a8ffa3b82e4aa646f3d1eaa23b80e57db8) (cherry picked from commit 74c5a3332b0d08d360d1f1c1ddf73d5c73045430) --- cinder/volume/manager.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cinder/volume/manager.py b/cinder/volume/manager.py index e7cdf318c5e..69f5fe77f0e 100644 --- a/cinder/volume/manager.py +++ b/cinder/volume/manager.py @@ -45,6 +45,7 @@ from oslo_serialization import jsonutils from oslo_service import periodic_task from oslo_utils import excutils from oslo_utils import importutils +from oslo_utils import strutils from oslo_utils import timeutils from oslo_utils import units from oslo_utils import uuidutils @@ -4543,6 +4544,9 @@ class VolumeManager(manager.CleanableManager, self.db.volume_attachment_update(ctxt, attachment.id, values) connection_info['attachment_id'] = attachment.id + LOG.debug("Connection info returned from driver %(connection_info)s", + {'connection_info': + strutils.mask_dict_password(connection_info)}) return connection_info def attachment_update(self,