1
0
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:
Mrunal Patel
2015-12-14 19:26:29 -05:00
parent 11f8fdca33
commit 55a49f2110
26 changed files with 168 additions and 159 deletions

View File

@ -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 {