mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-08 11:27:29 +00:00
container: SandboxCgroupOnly: no host cgroups.
No call cgroup operations for containers in host if SandboxCgroupOnly is enabled. Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
This commit is contained in:
parent
b65063248f
commit
2fcb8bb4d8
@ -879,9 +879,11 @@ func (c *Container) create() (err error) {
|
|||||||
}
|
}
|
||||||
c.process = *process
|
c.process = *process
|
||||||
|
|
||||||
|
if !c.sandbox.config.SandboxCgroupOnly {
|
||||||
if err = c.cgroupsCreate(); err != nil {
|
if err = c.cgroupsCreate(); err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if !c.sandbox.supportNewStore() {
|
if !c.sandbox.supportNewStore() {
|
||||||
// Store the container process returned by the agent.
|
// Store the container process returned by the agent.
|
||||||
@ -908,9 +910,11 @@ func (c *Container) delete() error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if !c.sandbox.config.SandboxCgroupOnly {
|
||||||
if err := c.cgroupsDelete(); err != nil {
|
if err := c.cgroupsDelete(); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return c.store.Delete()
|
return c.store.Delete()
|
||||||
}
|
}
|
||||||
@ -1200,9 +1204,11 @@ func (c *Container) update(resources specs.LinuxResources) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if !c.sandbox.config.SandboxCgroupOnly {
|
||||||
if err := c.cgroupsUpdate(resources); err != nil {
|
if err := c.cgroupsUpdate(resources); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return c.sandbox.agent.updateContainer(c.sandbox, *c, resources)
|
return c.sandbox.agent.updateContainer(c.sandbox, *c, resources)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user