Vendor the latest ocitools generate library
The new generate library provides APIs for setting oom_score_adj. Signed-off-by: Haiyan Meng <haiyanalady@gmail.com>
This commit is contained in:
parent
c5d0f23e5a
commit
47f0c1b4e5
2 changed files with 8 additions and 1 deletions
2
Godeps/Godeps.json
generated
2
Godeps/Godeps.json
generated
|
@ -277,7 +277,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/opencontainers/ocitools/generate",
|
"ImportPath": "github.com/opencontainers/ocitools/generate",
|
||||||
"Rev": "7233310b6ba4390b50cc509a04bc1d852558e8d3"
|
"Rev": "03e8b89f9eccc62d36f742a0af737adbfdcea635"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/opencontainers/runc/libcontainer/user",
|
"ImportPath": "github.com/opencontainers/runc/libcontainer/user",
|
||||||
|
|
7
vendor/github.com/opencontainers/ocitools/generate/generate.go
generated
vendored
7
vendor/github.com/opencontainers/ocitools/generate/generate.go
generated
vendored
|
@ -362,6 +362,12 @@ func (g *Generator) SetLinuxMountLabel(label string) {
|
||||||
g.spec.Linux.MountLabel = label
|
g.spec.Linux.MountLabel = label
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SetLinuxResourcesOOMScoreAdj sets g.spec.Linux.Resources.OOMScoreAdj.
|
||||||
|
func (g *Generator) SetLinuxResourcesOOMScoreAdj(adj int) {
|
||||||
|
g.initSpecLinuxResources()
|
||||||
|
g.spec.Linux.Resources.OOMScoreAdj = &adj
|
||||||
|
}
|
||||||
|
|
||||||
// SetLinuxResourcesCPUShares sets g.spec.Linux.Resources.CPU.Shares.
|
// SetLinuxResourcesCPUShares sets g.spec.Linux.Resources.CPU.Shares.
|
||||||
func (g *Generator) SetLinuxResourcesCPUShares(shares uint64) {
|
func (g *Generator) SetLinuxResourcesCPUShares(shares uint64) {
|
||||||
g.initSpecLinuxResourcesCPU()
|
g.initSpecLinuxResourcesCPU()
|
||||||
|
@ -855,6 +861,7 @@ func (g *Generator) AddCgroupsMount(mountCgroupOption string) error {
|
||||||
switch mountCgroupOption {
|
switch mountCgroupOption {
|
||||||
case "ro":
|
case "ro":
|
||||||
case "rw":
|
case "rw":
|
||||||
|
break
|
||||||
case "no":
|
case "no":
|
||||||
return nil
|
return nil
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue