Skip to content

Commit 0e7a44f

Browse files
authored
Merge pull request #1145 from saikat-royc/test-udevadm
minor fixes on top of logging improvement
2 parents e0557fe + 4224d7b commit 0e7a44f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/deviceutils/device-utils.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ func (m *deviceUtils) VerifyDevicePath(devicePaths []string, deviceName string)
223223
var innerErr error
224224
devicePath, innerErr = existingDevicePath(devicePaths)
225225
if innerErr != nil {
226-
e := fmt.Errorf("For disk %s failed to check for existing device path: %w", deviceName, innerErr)
226+
e := fmt.Errorf("for disk %s failed to check for existing device path: %w", deviceName, innerErr)
227227
klog.Errorf(e.Error())
228228
return false, e
229229
}
@@ -256,7 +256,7 @@ func (m *deviceUtils) VerifyDevicePath(devicePaths []string, deviceName string)
256256

257257
devFsSerial, innerErr := getDevFsSerial(devFsPath)
258258
if innerErr != nil {
259-
e := fmt.Errorf("Couldn't get serial number for disk %s at device path %s: %w", deviceName, devFsPath, innerErr)
259+
e := fmt.Errorf("couldn't get serial number for disk %s at device path %s: %w", deviceName, devFsPath, innerErr)
260260
klog.Errorf(e.Error())
261261
return false, e
262262
}
@@ -270,7 +270,7 @@ func (m *deviceUtils) VerifyDevicePath(devicePaths []string, deviceName string)
270270
// A /dev/* path exists, but is either not a recognized /dev prefix type
271271
// (/dev/nvme* or /dev/sd*) or devicePath is not mapped to the correct disk.
272272
// Attempt a repair
273-
klog.V(4).Infof("For disk %s and device path %s with mismatched serial number %q calling udevadmTriggerForDiskIfExists", deviceName, devFsPath, devFsSerial)
273+
klog.Warningf("For disk %s and device path %s with mismatched serial number %q calling udevadmTriggerForDiskIfExists", deviceName, devFsPath, devFsSerial)
274274
innerErr = udevadmTriggerForDiskIfExists(deviceName)
275275
if innerErr != nil {
276276
e := fmt.Errorf("failed to trigger udevadm fix of misconfigured disk for %q: %w", deviceName, innerErr)

0 commit comments

Comments
 (0)