cpuset: don't set cpuset.mems in the guest

Kata doesn't map any numa topologies in the guest. Let's make sure we
clear the Cpuset fields before passing container updates to the
guest.

Note, in the future we may want to have a vCPU to guest CPU mapping and
still include the cpuset.Cpus. Until we have this support, clear this as
well.

Fixes: #932

Signed-off-by: Eric Ernst <eric.g.ernst@gmail.com>
This commit is contained in:
Eric Ernst 2020-10-12 21:18:08 -07:00 committed by Eric Ernst
parent 88cd712876
commit d8a8fe47fb

View File

@ -1165,6 +1165,14 @@ func (c *Container) update(resources specs.LinuxResources) error {
} }
} }
// There currently isn't a notion of cpusets.cpus or mems being tracked
// inside of the guest. Make sure we clear these before asking agent to update
// the container's cgroups.
if resources.CPU != nil {
resources.CPU.Mems = ""
resources.CPU.Cpus = ""
}
return c.sandbox.agent.updateContainer(c.sandbox, *c, resources) return c.sandbox.agent.updateContainer(c.sandbox, *c, resources)
} }