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")
This commit is contained in:
Rodrigo Queiro 2021-03-12 14:59:27 +01:00
parent 4470fc0ad9
commit 363c0e3eb2

View File

@ -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(