@@ -19,7 +19,6 @@ import (
1919 "errors"
2020 "fmt"
2121 "os"
22- "path/filepath"
2322 "regexp"
2423 "runtime"
2524 "strconv"
@@ -468,21 +467,24 @@ func (ns *GCENodeServer) NodeUnstageVolume(ctx context.Context, req *csi.NodeUns
468467type ignoreableError struct { error }
469468
470469func (ns * GCENodeServer ) confirmDeviceUnused (volumeID string ) error {
471- devicePath , err := getDevicePath (ns , volumeID , "" /* partition, which is unused */ )
472- if err != nil {
473- return & ignoreableError {fmt .Errorf ("failed to find device path for volume %s: %v" , volumeID , err .Error ())}
474- }
475-
476- devFsPath , err := filepath .EvalSymlinks (devicePath )
477- if err != nil {
478- return & ignoreableError {fmt .Errorf ("filepath.EvalSymlinks(%q) failed: %v" , devicePath , err )}
479- }
470+ // 1.14-exp release. DO NOT INCLUDE in regular release.
471+ //
480472
481- if inUse , err := ns .DeviceUtils .IsDeviceFilesystemInUse (ns .Mounter , devicePath , devFsPath ); err != nil {
482- return & ignoreableError {fmt .Errorf ("failed to check if device %s (aka %s) is in use: %v" , devicePath , devFsPath , err )}
483- } else if inUse {
484- return fmt .Errorf ("device %s (aka %s) is still in use" , devicePath , devFsPath )
485- }
473+ // devicePath, err := getDevicePath(ns, volumeID, "" /* partition, which is unused */)
474+ // if err != nil {
475+ // return &ignoreableError{fmt.Errorf("failed to find device path for volume %s: %v", volumeID, err.Error())}
476+ // }
477+
478+ // devFsPath, err := filepath.EvalSymlinks(devicePath)
479+ // if err != nil {
480+ // return &ignoreableError{fmt.Errorf("filepath.EvalSymlinks(%q) failed: %v", devicePath, err)}
481+ // }
482+
483+ // if inUse, err := ns.DeviceUtils.IsDeviceFilesystemInUse(ns.Mounter, devicePath, devFsPath); err != nil {
484+ // return &ignoreableError{fmt.Errorf("failed to check if device %s (aka %s) is in use: %v", devicePath, devFsPath, err)}
485+ // } else if inUse {
486+ // return fmt.Errorf("device %s (aka %s) is still in use", devicePath, devFsPath)
487+ // }
486488
487489 return nil
488490}
0 commit comments