mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-16 06:49:38 +00:00
Automatic merge from submit-queue (batch tested with PRs 64399, 64324, 64404, 64406, 64396). 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>. Should use `hostProcMountinfoPath` constant in nsenter_mount.go. **What this PR does / why we need it**: In nsenter mounter implementation, we should read mountinfo from `/rootfs/proc/1/mountinfo` instead of `/proc/self/mountinfo`. **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*: Fixes # **Special notes for your reviewer**: `/proc/self/mountinfo` will prefix `/rootfs` on mount point path, see ``` $ mkdir /mnt/test $ mount -t tmpfs tmpfs /mnt/test/ $ docker run -it --volume=/:/rootfs:ro,rslave --net=host --pid=host --privileged=true busybox:latest cat /rootfs/proc/1/mountinfo | grep '\/mnt\/test' 442 25 0:80 / /mnt/test rw,relatime shared:70 - tmpfs tmpfs rw $ docker run -it --volume=/:/rootfs:ro,rslave --net=host --pid=host --privileged=true busybox:latest cat /proc/self/mountinfo | grep '\/mnt\/test' 1075 985 0:80 / /rootfs/mnt/test rw,relatime master:70 - tmpfs tmpfs rw ``` **Release note**: ```release-note NONE ```