mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 15:37:24 +00:00
Add a event to PV when mount fails because of fs mismatch
Filesystem mismatch is a special event. This could indicate either user has asked for incorrect filesystem or there is a error from which mount operation can not recover on retry. Co-Authored-By: Jordan Liggitt <jordan@liggitt.net>
This commit is contained in:
@@ -342,7 +342,7 @@ func (dm *deviceMounter) mountLocalBlockDevice(spec *volume.Spec, devicePath str
|
||||
if rmErr := os.Remove(deviceMountPath); rmErr != nil {
|
||||
klog.Warningf("local: failed to remove %s: %v", deviceMountPath, rmErr)
|
||||
}
|
||||
return fmt.Errorf("local: failed to mount device %s at %s (fstype: %s), error %v", devicePath, deviceMountPath, fstype, err)
|
||||
return fmt.Errorf("local: failed to mount device %s at %s (fstype: %s), error %w", devicePath, deviceMountPath, fstype, err)
|
||||
}
|
||||
klog.V(3).Infof("local: successfully mount device %s at %s (fstype: %s)", devicePath, deviceMountPath, fstype)
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user