aboutsummaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorViktor Kuzmin <kvaster@gmail.com>2022-09-26 21:24:10 +0300
committerViktor Kuzmin <kvaster@gmail.com>2022-09-26 21:24:10 +0300
commit7387e6b46784771f95b8a6fbc5c2b49fcfe54acf (patch)
tree0b268b9e75f147bfb9b823d039da6d5484d9041a /pkg
parent4cec4e522be8e5453e5789177a04d50fdbfdd8a3 (diff)
downloadseaweedfs-csi-driver-7387e6b46784771f95b8a6fbc5c2b49fcfe54acf.tar.xz
seaweedfs-csi-driver-7387e6b46784771f95b8a6fbc5c2b49fcfe54acf.zip
Make sure we'll have no stale mount after process kill
Diffstat (limited to 'pkg')
-rw-r--r--pkg/driver/mounter.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/pkg/driver/mounter.go b/pkg/driver/mounter.go
index 8a48967..909e6ec 100644
--- a/pkg/driver/mounter.go
+++ b/pkg/driver/mounter.go
@@ -77,6 +77,10 @@ func fuseMount(path string, command string, args []string) (Unmounter, error) {
glog.Infof("weed mount exit, pid: %d, path: %v", cmd.Process.Pid, path)
}
+ // make sure we'll have no stale mounts
+ time.Sleep(time.Millisecond * 100)
+ _ = mount.New("").Unmount(path)
+
close(fu.finished)
}()