From 7ba2ffb931e11e8b5fd4e725bb0a963eb9a6e1ec Mon Sep 17 00:00:00 2001 From: yuswift Date: Mon, 26 Jul 2021 16:11:44 +0800 Subject: [PATCH] pkg/volume: fix incorrect klog.Infof usage klog.Infof expects a format string as first parameter and then expands format specifies inside it. What gets passed here is the final string that must be logged as-is, therefore klog.Info has to be used. Signed-off-by: yuswift --- pkg/volume/util/operationexecutor/operation_generator.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/volume/util/operationexecutor/operation_generator.go b/pkg/volume/util/operationexecutor/operation_generator.go index 265fc0f6b5a..e1b3fd15cdc 100644 --- a/pkg/volume/util/operationexecutor/operation_generator.go +++ b/pkg/volume/util/operationexecutor/operation_generator.go @@ -975,7 +975,7 @@ func (og *operationGenerator) GenerateUnmountDeviceFunc( return volumetypes.NewOperationContext(eventErr, detailedErr, migrated) } - klog.Infof(deviceToDetach.GenerateMsgDetailed("UnmountDevice succeeded", "")) + klog.Info(deviceToDetach.GenerateMsgDetailed("UnmountDevice succeeded", "")) // Update actual state of world markDeviceUnmountedErr := actualStateOfWorld.MarkDeviceAsUnmounted(