From ad8f91fb0f54f7bdb5c2deeb73ea8a8bb968bae2 Mon Sep 17 00:00:00 2001 From: Humble Devassy Chirammal Date: Thu, 25 Sep 2025 22:29:58 +0530 Subject: [PATCH] Fix error messages in volume path handler Signed-off-by: Humble Devassy Chirammal --- pkg/volume/testing/testing.go | 2 +- pkg/volume/util/operationexecutor/operation_generator.go | 2 +- pkg/volume/util/volumepathhandler/volume_path_handler.go | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/volume/testing/testing.go b/pkg/volume/testing/testing.go index a897bab3a6a..e96df4eb0f9 100644 --- a/pkg/volume/testing/testing.go +++ b/pkg/volume/testing/testing.go @@ -63,7 +63,7 @@ const ( TimeoutOnSetupVolumeName = "timeout-setup-volume" // FailOnSetupVolumeName will cause setup call to fail FailOnSetupVolumeName = "fail-setup-volume" - //TimeoutAndFailOnSetupVolumeName will first timeout and then fail the setup + // TimeoutAndFailOnSetupVolumeName will first timeout and then fail the setup TimeoutAndFailOnSetupVolumeName = "timeout-and-fail-setup-volume" // SuccessAndTimeoutSetupVolumeName will cause first mount operation to succeed but subsequent attempts to timeout SuccessAndTimeoutSetupVolumeName = "success-and-timeout-setup-volume-name" diff --git a/pkg/volume/util/operationexecutor/operation_generator.go b/pkg/volume/util/operationexecutor/operation_generator.go index 4cd9c7cfe69..9d5c937d953 100644 --- a/pkg/volume/util/operationexecutor/operation_generator.go +++ b/pkg/volume/util/operationexecutor/operation_generator.go @@ -2182,7 +2182,7 @@ func isDeviceOpened(deviceToDetach AttachedVolume, hostUtil hostutil.HostUtils) if !isDevicePath && devicePathErr == nil || (devicePathErr != nil && strings.Contains(devicePathErr.Error(), "does not exist")) { // not a device path or path doesn't exist - //TODO: refer to #36092 + // TODO: refer to #36092 klog.V(3).Infof("The path isn't device path or doesn't exist. Skip checking device path: %s", deviceToDetach.DevicePath) deviceOpened = false } else if devicePathErr != nil { diff --git a/pkg/volume/util/volumepathhandler/volume_path_handler.go b/pkg/volume/util/volumepathhandler/volume_path_handler.go index 1f468410bf2..5eea77007cb 100644 --- a/pkg/volume/util/volumepathhandler/volume_path_handler.go +++ b/pkg/volume/util/volumepathhandler/volume_path_handler.go @@ -130,11 +130,11 @@ func mapBindMountDevice(devicePath string, mapPath string, linkName string) erro // Check if device file // TODO: Need to check if this device file is actually the expected bind mount if file.Mode()&os.ModeDevice == os.ModeDevice { - klog.Warningf("Warning: Map skipped because bind mount already exist on the path: %v", linkPath) + klog.Warningf("Warning: Map skipped because bind mount already exists on the path: %v", linkPath) return nil } - klog.Warningf("Warning: file %s is already exist but not mounted, skip creating file", linkPath) + klog.Warningf("Warning: file %s already exists but is not mounted, skip creating file", linkPath) } // Bind mount file