mirror of https://github.com/k3s-io/k3s
a0aee05376
Automatic merge from submit-queue (batch tested with PRs 54081, 54271, 51783, 54600, 54594). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Remove redundant code of checking path **What this PR does / why we need it**: Remove redundant code of checking path the checking is not necessary here,WrapperUnmounter#TearDownAt always do that func UnmountViaEmptyDir(dir string, host VolumeHost, volName string, volSpec Spec, podUID types.UID) error { glog.V(3).Infof("Tearing down volume %v for pod %v at %v", volName, podUID, dir) if pathExists, pathErr := volutil.PathExists(dir); pathErr != nil { return fmt.Errorf("Error checking if path exists: %v", pathErr) } else if !pathExists { glog.Warningf("Warning: Unmount skipped because path does not exist: %v", dir) return nil } // Wrap EmptyDir, let it do the teardown. wrapped, err := host.NewWrapperUnmounter(volName, volSpec, podUID) if err != nil { return err } return wrapped.TearDownAt(dir) } **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes # NONE **Release note**: NONE |
||
---|---|---|
.. | ||
aws_ebs | ||
azure_dd | ||
azure_file | ||
cephfs | ||
cinder | ||
configmap | ||
downwardapi | ||
empty_dir | ||
fc | ||
flexvolume | ||
flocker | ||
gce_pd | ||
git_repo | ||
glusterfs | ||
host_path | ||
iscsi | ||
local | ||
nfs | ||
photon_pd | ||
portworx | ||
projected | ||
quobyte | ||
rbd | ||
scaleio | ||
secret | ||
storageos | ||
testing | ||
util | ||
validation | ||
vsphere_volume | ||
BUILD | ||
OWNERS | ||
doc.go | ||
metrics_cached.go | ||
metrics_du.go | ||
metrics_du_test.go | ||
metrics_errors.go | ||
metrics_nil.go | ||
metrics_nil_test.go | ||
metrics_statfs.go | ||
metrics_statfs_test.go | ||
plugins.go | ||
plugins_test.go | ||
util.go | ||
util_test.go | ||
volume.go | ||
volume_linux.go | ||
volume_unsupported.go |