tiny fix, add a null check for specs.Resources.Pids.Limit
Signed-off-by: Shukui Yang <yangshukui@huawei.com>
This commit is contained in:
parent
26ebd6ab63
commit
affc105264
|
@ -373,7 +373,7 @@ func createCgroupConfig(name string, useSystemdCgroup bool, spec *specs.Spec) (*
|
||||||
c.Resources.CpusetMems = *r.CPU.Mems
|
c.Resources.CpusetMems = *r.CPU.Mems
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if r.Pids != nil {
|
if r.Pids != nil && r.Pids.Limit != nil {
|
||||||
c.Resources.PidsLimit = *r.Pids.Limit
|
c.Resources.PidsLimit = *r.Pids.Limit
|
||||||
}
|
}
|
||||||
if r.BlockIO != nil {
|
if r.BlockIO != nil {
|
||||||
|
|
Loading…
Reference in New Issue