You've already forked runc
mirror of
https://github.com/opencontainers/runc.git
synced 2025-08-01 05:06:52 +03:00
Move the cgroups setting into a Resources struct
This allows us to distinguish cases where a container needs to just join the paths or also additionally set cgroups settings. This will help in implementing cgroupsPath support in the spec. Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
This commit is contained in:
@ -517,7 +517,7 @@ func testCpuShares(t *testing.T, systemd bool) {
|
||||
if systemd {
|
||||
config.Cgroups.Parent = "system.slice"
|
||||
}
|
||||
config.Cgroups.CpuShares = 1
|
||||
config.Cgroups.Resources.CpuShares = 1
|
||||
|
||||
_, _, err = runContainer(config, "", "ps")
|
||||
if err == nil {
|
||||
@ -548,7 +548,7 @@ func testRunWithKernelMemory(t *testing.T, systemd bool) {
|
||||
if systemd {
|
||||
config.Cgroups.Parent = "system.slice"
|
||||
}
|
||||
config.Cgroups.KernelMemory = 52428800
|
||||
config.Cgroups.Resources.KernelMemory = 52428800
|
||||
|
||||
_, _, err = runContainer(config, "", "ps")
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user