k3s/pkg/volume
Kubernetes Submit Queue a0aee05376 Merge pull request #54271 from linyouchong/linyouchong-20171020
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
2017-10-26 02:43:44 -07:00
..
aws_ebs Abstract contains func to common place 2017-10-20 19:27:55 +08:00
azure_dd fix#50150: azure disk mount failure on coreos 2017-10-25 05:19:57 +00:00
azure_file Abstract contains func to common place 2017-10-20 19:27:55 +08:00
cephfs update BUILD files 2017-10-15 18:18:13 -07:00
cinder update BUILD files 2017-10-15 18:18:13 -07:00
configmap update BUILD files 2017-10-15 18:18:13 -07:00
downwardapi update BUILD files 2017-10-15 18:18:13 -07:00
empty_dir update BUILD files 2017-10-15 18:18:13 -07:00
fc Abstract contains func to common place 2017-10-20 19:27:55 +08:00
flexvolume Abstract contains func to common place 2017-10-20 19:27:55 +08:00
flocker update BUILD files 2017-10-15 18:18:13 -07:00
gce_pd Abstract contains func to common place 2017-10-20 19:27:55 +08:00
git_repo update BUILD files 2017-10-15 18:18:13 -07:00
glusterfs Merge pull request #53940 from gyliu513/glusterfs 2017-10-25 20:21:02 -07:00
host_path update BUILD files 2017-10-15 18:18:13 -07:00
iscsi Abstract contains func to common place 2017-10-20 19:27:55 +08:00
local Abstract contains func to common place 2017-10-20 19:27:55 +08:00
nfs Merge pull request #54283 from linyouchong/linyouchong-20171020b 2017-10-20 08:06:17 -07:00
photon_pd Abstract contains func to common place 2017-10-20 19:27:55 +08:00
portworx Abstract contains func to common place 2017-10-20 19:27:55 +08:00
projected update BUILD files 2017-10-15 18:18:13 -07:00
quobyte Abstract contains func to common place 2017-10-20 19:27:55 +08:00
rbd Merge pull request #54454 from cofyc/rbd_status 2017-10-24 08:35:14 -07:00
scaleio update BUILD files 2017-10-15 18:18:13 -07:00
secret update BUILD files 2017-10-15 18:18:13 -07:00
storageos Abstract contains func to common place 2017-10-20 19:27:55 +08:00
testing Abstract contains func to common place 2017-10-20 19:27:55 +08:00
util Update bazel 2017-10-18 17:24:04 +02:00
validation update BUILD files 2017-10-15 18:18:13 -07:00
vsphere_volume update BUILD files 2017-10-15 18:18:13 -07:00
BUILD update BUILD files 2017-10-15 18:18:13 -07:00
OWNERS remove deads2k from volume reviewer 2017-07-25 08:52:25 -04:00
doc.go
metrics_cached.go
metrics_du.go
metrics_du_test.go switch from package syscall to x/sys/unix 2017-07-21 12:14:42 +02:00
metrics_errors.go
metrics_nil.go
metrics_nil_test.go
metrics_statfs.go
metrics_statfs_test.go
plugins.go Versioned busybox docker image 2017-10-19 07:17:44 +05:30
plugins_test.go Use const instead of hard code for volume plugin 2017-09-18 20:09:07 +08:00
util.go Remove redundant code of checking path 2017-10-20 20:04:06 +08:00
util_test.go PV recycler: don't reuse old recycler pod. 2017-10-05 15:08:08 +02:00
volume.go WaitForAttach refactoring for iSCSI attacher/detacher 2017-08-26 17:21:34 -04:00
volume_linux.go Fixes cross platform build failure 2017-08-26 09:58:51 -04:00
volume_unsupported.go Fixes cross platform build failure 2017-08-26 09:58:51 -04:00