aboutsummaryrefslogtreecommitdiff
path: root/pkg/mountmanager/manager.go
diff options
context:
space:
mode:
authorchrislusf <chris.lu@gmail.com>2025-12-06 13:54:02 -0800
committerChris Lu <chrislusf@users.noreply.github.com>2025-12-06 18:53:22 -0800
commitc1d7dcdd889dd063340b61499a956e18d05e0340 (patch)
tree8c7c1a578e65cf5297b614d9bde0902b4e89c84a /pkg/mountmanager/manager.go
parent6ee6933909f77cc05caa1194b211f76bf906943a (diff)
downloadseaweedfs-csi-driver-c1d7dcdd889dd063340b61499a956e18d05e0340.tar.xz
seaweedfs-csi-driver-c1d7dcdd889dd063340b61499a956e18d05e0340.zip
fix: log process.stop() error and document 100ms delay
- Log warning if stopping mount process fails after mount wait timeout to help diagnose potential zombie processes - Add comment explaining the 100ms delay before unmounting is for FUSE cleanup and pending I/O to complete
Diffstat (limited to 'pkg/mountmanager/manager.go')
-rw-r--r--pkg/mountmanager/manager.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/pkg/mountmanager/manager.go b/pkg/mountmanager/manager.go
index 67b29a4..dd15c6b 100644
--- a/pkg/mountmanager/manager.go
+++ b/pkg/mountmanager/manager.go
@@ -261,7 +261,9 @@ func startWeedMountProcess(command string, args []string, target string, volumeI
go process.wait()
if err := waitForMount(target, 10*time.Second); err != nil {
- _ = process.stop()
+ if stopErr := process.stop(); stopErr != nil {
+ glog.Warningf("[%s] failed to stop mount process after mount wait failure: %v", volumeID, stopErr)
+ }
return nil, err
}
@@ -275,6 +277,7 @@ func (p *weedMountProcess) wait() {
glog.Infof("weed mount exit (pid: %d, target: %s)", p.cmd.Process.Pid, p.target)
}
+ // Brief delay to allow FUSE cleanup and pending I/O to complete before unmounting
time.Sleep(100 * time.Millisecond)
_ = kubeMounter.Unmount(p.target)