Skip to content

Commit 9316c1b

Browse files
committed
Use rbind to mount cgroups in case of nested trees
1 parent 35728b6 commit 9316c1b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

conf/hooks/10-cgroups.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ while IFS=':' read -r x ctrl path; do
2525
fi < /proc/self/mountinfo | { IFS=' ' read -r x x x root mount x || :; }
2626

2727
if [ -n "${root}" ] && [ -n "${mount}" ]; then
28-
printf "%s %s none x-create=dir,bind,nosuid,noexec,nodev,ro\n" "${mount}/${path#${root}}" "${mount}" >> "${ENROOT_MOUNTS}"
28+
printf "%s %s none x-create=dir,rbind,nosuid,noexec,nodev,ro\n" "${mount}/${path#${root}}" "${mount}" >> "${ENROOT_MOUNTS}"
2929
fi
3030
done < /proc/self/cgroup
3131

32-
printf "none /sys/fs/cgroup none bind,remount,nosuid,noexec,nodev,ro,rslave,nofail,silent\n" >> "${ENROOT_MOUNTS}"
32+
printf "none /sys/fs/cgroup none rbind,remount,nosuid,noexec,nodev,ro,rslave,nofail,silent\n" >> "${ENROOT_MOUNTS}"

0 commit comments

Comments
 (0)