@@ -19,7 +19,6 @@ import (
19
19
"errors"
20
20
"fmt"
21
21
"os"
22
- "path/filepath"
23
22
"regexp"
24
23
"runtime"
25
24
"strconv"
@@ -468,21 +467,24 @@ func (ns *GCENodeServer) NodeUnstageVolume(ctx context.Context, req *csi.NodeUns
468
467
type ignoreableError struct { error }
469
468
470
469
func (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
+ //
480
472
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
+ // }
486
488
487
489
return nil
488
490
}
0 commit comments