fix(Cubelet): cleanup host-mount dirs after sandbox destroy#333
Conversation
Unmount host-mount bind targets under the sandbox hostdir path during sandbox cleanup Signed-off-by: luzhixing12345 <luzhixing12345@163.com>
|
/cubebot review |
|
Claude finished @fslongjin's task in 1m 8s —— View job Code Review:
|
|
Hi, may I ask when this PR might be merged? |
|
Claude finished @kinwin-ustc's task in 38s —— View job Status Update: PR #333The branch was updated by merging master (most notably pulling in PR #337 — Changes (unchanged)
Current state
Awaiting maintainer review and merge. 👍 |
fix cublet ci compile error introduced by PR #333 storage/local.go:854:31: cannot use result.SandboxID (variable of type string) as *StorageInfo value in argument to l.cleanupHostDirVolumes make: *** [Makefile:80: cubelet] Error 1 make[1]: *** [Makefile:96: builder-run] Error 2 make[1]: Leaving directory '/home/runner/work/CubeSandbox/CubeSandbox' make: *** [Makefile:140: cubelet] Error 2 Signed-off-by: Feng Jin <ronyjin@tencent.com> Co-authored-by: Feng Jin <ronyjin@tencent.com>
Currently, sandbox destruction does not call
cleanupHostDirVolumes, which causes host-mount related resources to remain on the host after the sandbox is removed.As a result:
/data/cubelet/hostdir/are not cleaned uphost-mountremain mountedThe leaked mount points can be observed with:
sudo nsenter -t "$(pgrep -f '/Cubelet/bin/cubelet' | head -n1)" -m -- findmnt -n -o TARGET,SOURCE,FSTYPE,OPTIONSExample leaked mounts after sandbox destruction:
This PR adds host-dir volume cleanup during sandbox destruction.