diff --git a/virtcontainers/container.go b/virtcontainers/container.go index 2f5279c866..6b57f2c40e 100644 --- a/virtcontainers/container.go +++ b/virtcontainers/container.go @@ -1275,6 +1275,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) }