Skip to content

Commit

Permalink
Update to use cgroups v2
Browse files Browse the repository at this point in the history
  • Loading branch information
rjosephwright committed Aug 5, 2024
1 parent ead58b7 commit 4c5b454
Showing 1 changed file with 4 additions and 106 deletions.
110 changes: 4 additions & 106 deletions pkg/initial/initial/initial.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,115 +115,13 @@ func mounts() error {
target: constants.DirETRun,
},
{
source: "tmpfs",
flags: syscall.MS_NODEV | syscall.MS_NOEXEC | syscall.MS_NOSUID,
fsType: "tmpfs",
options: []string{
"mode=0755",
},
target: "/sys/fs/cgroup",
},
{
source: "cgroup",
source: "cgroup2",
flags: syscall.MS_NODEV | syscall.MS_NOEXEC | syscall.MS_NOSUID | syscall.MS_RELATIME,
fsType: "cgroup",
mode: 0555,
options: []string{
"net_cls",
"net_prio",
},
target: "/sys/fs/cgroup/net_cls,net_prio",
},
{
source: "cgroup",
flags: syscall.MS_NODEV | syscall.MS_NOEXEC | syscall.MS_NOSUID | syscall.MS_RELATIME,
fsType: "cgroup",
mode: 0555,
fsType: "cgroup2",
options: []string{
"hugetlb",
"nsdelegate",
},
target: "/sys/fs/cgroup/hugetlb",
},
{
source: "cgroup",
flags: syscall.MS_NODEV | syscall.MS_NOEXEC | syscall.MS_NOSUID | syscall.MS_RELATIME,
fsType: "cgroup",
mode: 0555,
options: []string{
"pids",
},
target: "/sys/fs/cgroup/pids",
},
{
source: "cgroup",
flags: syscall.MS_NODEV | syscall.MS_NOEXEC | syscall.MS_NOSUID | syscall.MS_RELATIME,
fsType: "cgroup",
mode: 0555,
options: []string{
"freezer",
},
target: "/sys/fs/cgroup/freezer",
},
{
source: "cgroup",
flags: syscall.MS_NODEV | syscall.MS_NOEXEC | syscall.MS_NOSUID | syscall.MS_RELATIME,
fsType: "cgroup",
mode: 0555,
options: []string{
"cpu",
"cpuacct",
},
target: "/sys/fs/cgroup/cpu,cpuacct",
},
{
source: "cgroup",
flags: syscall.MS_NODEV | syscall.MS_NOEXEC | syscall.MS_NOSUID | syscall.MS_RELATIME,
fsType: "cgroup",
mode: 0555,
options: []string{
"devices",
},
target: "/sys/fs/cgroup/devices",
},
{
source: "cgroup",
flags: syscall.MS_NODEV | syscall.MS_NOEXEC | syscall.MS_NOSUID | syscall.MS_RELATIME,
fsType: "cgroup",
mode: 0555,
options: []string{
"blkio",
},
target: "/sys/fs/cgroup/blkio",
},
{
source: "cgroup",
flags: syscall.MS_NODEV | syscall.MS_NOEXEC | syscall.MS_NOSUID | syscall.MS_RELATIME,
fsType: "cgroup",
mode: 0555,
options: []string{
"memory",
},
target: "/sys/fs/cgroup/memory",
},
{
source: "cgroup",
flags: syscall.MS_NODEV | syscall.MS_NOEXEC | syscall.MS_NOSUID | syscall.MS_RELATIME,
fsType: "cgroup",
mode: 0555,
options: []string{
"perf_event",
},
target: "/sys/fs/cgroup/perf_event",
},
{
source: "cgroup",
flags: syscall.MS_NODEV | syscall.MS_NOEXEC | syscall.MS_NOSUID | syscall.MS_RELATIME,
fsType: "cgroup",
mode: 0555,
options: []string{
"cpuset",
},
target: "/sys/fs/cgroup/cpuset",
target: "/sys/fs/cgroup",
},
{
source: "nodev",
Expand Down

0 comments on commit 4c5b454

Please sign in to comment.