Skip to content

Commit 854b41d

Browse files
committed
Update spec to 239c4e4
This provides updates to runc for the spec changes with *Process and OOMScoreAdj Signed-off-by: Michael Crosby <[email protected]>
1 parent a6906d5 commit 854b41d

File tree

11 files changed

+102
-65
lines changed

11 files changed

+102
-65
lines changed

exec.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -208,5 +208,5 @@ func getProcess(context *cli.Context, bundle string) (*specs.Process, error) {
208208
}
209209
p.User.UID = uint32(uid)
210210
}
211-
return &p, nil
211+
return p, nil
212212
}

libcontainer/specconv/example.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ func Example() *specs.Spec {
2323
Path: "rootfs",
2424
Readonly: true,
2525
},
26-
Process: specs.Process{
26+
Process: &specs.Process{
2727
Terminal: true,
2828
User: specs.User{},
2929
Args: []string{

libcontainer/specconv/spec_linux.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,8 @@ func CreateLibcontainerConfig(opts *CreateOpts) (*configs.Config, error) {
230230
config.ProcessLabel = spec.Process.SelinuxLabel
231231
}
232232
config.Sysctl = spec.Linux.Sysctl
233-
if spec.Linux.Resources != nil && spec.Linux.Resources.OOMScoreAdj != nil {
234-
config.OomScoreAdj = *spec.Linux.Resources.OOMScoreAdj
233+
if spec.Process != nil && spec.Process.OOMScoreAdj != nil {
234+
config.OomScoreAdj = *spec.Process.OOMScoreAdj
235235
}
236236
if spec.Process.Capabilities != nil {
237237
config.Capabilities = &configs.Capabilities{

spec.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ func loadSpec(cPath string) (spec *specs.Spec, err error) {
134134
if err = validatePlatform(&spec.Platform); err != nil {
135135
return nil, err
136136
}
137-
return spec, validateProcessSpec(&spec.Process)
137+
return spec, validateProcessSpec(spec.Process)
138138
}
139139

140140
func createLibContainerRlimit(rlimit specs.LinuxRlimit) (configs.Rlimit, error) {

tests/integration/update.bats

+3-3
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ function setup() {
3131
"cpus": "0"
3232
},
3333
"blockio": {
34-
"blkioWeight": 1000
34+
"weight": 1000
3535
},
3636
"pids": {
3737
"limit": 20
@@ -184,7 +184,7 @@ function check_cgroup_value() {
184184
"cpus": "0"
185185
},
186186
"blockIO": {
187-
"blkioWeight": 1000
187+
"weight": 1000
188188
},
189189
"pids": {
190190
"limit": 20
@@ -235,7 +235,7 @@ EOF
235235
"cpus": "0"
236236
},
237237
"blockIO": {
238-
"blkioWeight": 1000
238+
"weight": 1000
239239
},
240240
"pids": {
241241
"limit": 20

update.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ The accepted format is as follow (unchanged values can be omitted):
4747
"mems": ""
4848
},
4949
"blockIO": {
50-
"blkioWeight": 0
50+
"weight": 0
5151
}
5252
}
5353

utils_linux.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -392,5 +392,5 @@ func startContainer(context *cli.Context, spec *specs.Spec, action CtAct, criuOp
392392
action: action,
393393
criuOpts: criuOpts,
394394
}
395-
return r.run(&spec.Process)
395+
return r.run(spec.Process)
396396
}

vendor.conf

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# OCI runtime-spec. When updating this, make sure you use a version tag rather
22
# than a commit ID so it's much more obvious what version of the spec we are
33
# using.
4-
github.com/opencontainers/runtime-spec v1.0.0-rc5
4+
github.com/opencontainers/runtime-spec 239c4e44f2a612ed85f6db9c66247aa33f437e91
55
# Core libcontainer functionality.
66
github.com/mrunalp/fileutils ed869b029674c0e9ce4c0dfa781405c2d9946d08
77
github.com/opencontainers/selinux v1.0.0-rc1

vendor/github.com/opencontainers/runtime-spec/README.md

+14-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)