diff options
| author | Chris Lu <chrislusf@users.noreply.github.com> | 2022-09-26 11:33:16 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-09-26 11:33:16 -0700 |
| commit | e8c336da0cacd326ec7d0eb5e216ee0f6b94aa58 (patch) | |
| tree | 0b268b9e75f147bfb9b823d039da6d5484d9041a | |
| parent | 4cec4e522be8e5453e5789177a04d50fdbfdd8a3 (diff) | |
| parent | 7387e6b46784771f95b8a6fbc5c2b49fcfe54acf (diff) | |
| download | seaweedfs-csi-driver-e8c336da0cacd326ec7d0eb5e216ee0f6b94aa58.tar.xz seaweedfs-csi-driver-e8c336da0cacd326ec7d0eb5e216ee0f6b94aa58.zip | |
Merge pull request #90 from kvaster/kill-stalev1.1.1
Make sure we'll have no stale mount after process kill
| -rw-r--r-- | pkg/driver/mounter.go | 4 |
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) }() |
