Skip to content

Commit eb70c21

Browse files
committed
Update runtime-spec to rc6
Signed-off-by: Michael Crosby <[email protected]>
1 parent a0159fd commit eb70c21

File tree

15 files changed

+20
-1701
lines changed

15 files changed

+20
-1701
lines changed

libcontainer/specconv/example.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ func sPtr(s string) *string { return &s }
1414
func Example() *specs.Spec {
1515
return &specs.Spec{
1616
Version: specs.Version,
17-
Root: specs.Root{
17+
Root: &specs.Root{
1818
Path: "rootfs",
1919
Readonly: true,
2020
},
@@ -57,7 +57,7 @@ func Example() *specs.Spec {
5757
"CAP_NET_BIND_SERVICE",
5858
},
5959
},
60-
Rlimits: []specs.LinuxRlimit{
60+
Rlimits: []specs.POSIXRlimit{
6161
{
6262
Type: "RLIMIT_NOFILE",
6363
Hard: uint64(1024),

libcontainer/specconv/spec_linux.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,9 @@ func CreateLibcontainerConfig(opts *CreateOpts) (*configs.Config, error) {
162162
return nil, err
163163
}
164164
spec := opts.Spec
165+
if spec.Root == nil {
166+
return nil, fmt.Errorf("Root must be specified")
167+
}
165168
rootfsPath := spec.Root.Path
166169
if !filepath.IsAbs(rootfsPath) {
167170
rootfsPath = filepath.Join(cwd, rootfsPath)
@@ -377,6 +380,9 @@ func createCgroupConfig(opts *CreateOpts) (*configs.Cgroup, error) {
377380
if r.Memory.Swappiness != nil {
378381
c.Resources.MemorySwappiness = r.Memory.Swappiness
379382
}
383+
if r.Memory.DisableOOMKiller != nil {
384+
c.Resources.OomKillDisable = *r.Memory.DisableOOMKiller
385+
}
380386
}
381387
if r.CPU != nil {
382388
if r.CPU.Shares != nil {
@@ -459,9 +465,6 @@ func createCgroupConfig(opts *CreateOpts) (*configs.Cgroup, error) {
459465
Limit: l.Limit,
460466
})
461467
}
462-
if r.DisableOOMKiller != nil {
463-
c.Resources.OomKillDisable = *r.DisableOOMKiller
464-
}
465468
if r.Network != nil {
466469
if r.Network.ClassID != nil {
467470
c.Resources.NetClsClassid = *r.Network.ClassID

spec.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ func loadSpec(cPath string) (spec *specs.Spec, err error) {
133133
return spec, validateProcessSpec(spec.Process)
134134
}
135135

136-
func createLibContainerRlimit(rlimit specs.LinuxRlimit) (configs.Rlimit, error) {
136+
func createLibContainerRlimit(rlimit specs.POSIXRlimit) (configs.Rlimit, error) {
137137
rl, err := strToRlimit(rlimit.Type)
138138
if err != nil {
139139
return configs.Rlimit{}, err

vendor.conf

Lines changed: 1 addition & 1 deletion
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 198f23f827eea397d4331d7eb048d9d4c7ff7bee
4+
github.com/opencontainers/runtime-spec 96de01bbb42c7af89bff100e10a9f0fb62e75bfb
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

Lines changed: 0 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/opencontainers/runtime-spec/specs-go/config.go

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/opencontainers/runtime-spec/specs-go/state.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/opencontainers/runtime-spec/specs-go/version.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/golang.org/x/sys/unix/mkpost.go

Lines changed: 0 additions & 88 deletions
This file was deleted.

0 commit comments

Comments
 (0)