Grab a new spec.Cpu while updating masks if cpu root didn't exist.
Docker-DCO-1.1-Signed-off-by: Rohit Jnagal <jnagal@google.com> (github: rjnagal)
This commit is contained in:
parent
b120cee75c
commit
f5fde119f8
@ -116,6 +116,9 @@ func (self *rawContainerHandler) GetSpec() (*info.ContainerSpec, error) {
|
||||
// This will fail for non-unified hierarchies. We'll return the whole machine mask in that case.
|
||||
cpusetRoot, ok := self.cgroupSubsystems.mountPoints["cpuset"]
|
||||
if ok {
|
||||
if spec.Cpu == nil {
|
||||
spec.Cpu = new(info.CpuSpec)
|
||||
}
|
||||
cpusetRoot = filepath.Join(cpusetRoot, self.name)
|
||||
if utils.FileExists(cpusetRoot) {
|
||||
spec.Cpu.Mask = readString(cpusetRoot, "cpuset.cpus")
|
||||
|
Loading…
Reference in New Issue
Block a user