From 363c0e3eb23ad53c3460d6b4bcfc5cb6d689c25f Mon Sep 17 00:00:00 2001 From: Rodrigo Queiro Date: Fri, 12 Mar 2021 14:59:27 +0100 Subject: [PATCH] Remove EXTRA from log messages This cleans up a log message that looks like: I0312 14:36:50.280018 12866 operation_generator.go:869] UnmountDevice succeeded for volume "my-volume" %!(EXTRA string=UnmountDevice succeeded for volume "my-volume" (UniqueName: "kubernetes.io/csi/smb.csi.k8s.io^my-volume") on node "my-node") --- pkg/volume/util/operationexecutor/operation_generator.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/volume/util/operationexecutor/operation_generator.go b/pkg/volume/util/operationexecutor/operation_generator.go index 74addd92928..9fb7ef7bca5 100644 --- a/pkg/volume/util/operationexecutor/operation_generator.go +++ b/pkg/volume/util/operationexecutor/operation_generator.go @@ -929,7 +929,7 @@ func (og *operationGenerator) GenerateUnmountDeviceFunc( // If the mount path could not be found, don't fail the unmount, but instead log a warning and proceed, // using the value from deviceToDetach.DeviceMountPath, so that the device can be marked as unmounted deviceMountPath = deviceToDetach.DeviceMountPath - klog.Warningf(deviceToDetach.GenerateMsg(fmt.Sprintf( + klog.Warningf(deviceToDetach.GenerateMsgDetailed(fmt.Sprintf( "GetDeviceMountPath failed, but unmount operation will proceed using deviceMountPath=%s: %v", deviceMountPath, err), "")) } refs, err := deviceMountableVolumePlugin.GetDeviceMountRefs(deviceMountPath) @@ -971,7 +971,7 @@ func (og *operationGenerator) GenerateUnmountDeviceFunc( return volumetypes.NewOperationContext(eventErr, detailedErr, migrated) } - klog.Infof(deviceToDetach.GenerateMsg("UnmountDevice succeeded", "")) + klog.Infof(deviceToDetach.GenerateMsgDetailed("UnmountDevice succeeded", "")) // Update actual state of world markDeviceUnmountedErr := actualStateOfWorld.MarkDeviceAsUnmounted(