mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-08 03:24:15 +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,8 +879,10 @@ func (c *Container) create() (err error) {
|
|||||||
}
|
}
|
||||||
c.process = *process
|
c.process = *process
|
||||||
|
|
||||||
if err = c.cgroupsCreate(); err != nil {
|
if !c.sandbox.config.SandboxCgroupOnly {
|
||||||
return
|
if err = c.cgroupsCreate(); err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if !c.sandbox.supportNewStore() {
|
if !c.sandbox.supportNewStore() {
|
||||||
@ -908,8 +910,10 @@ func (c *Container) delete() error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := c.cgroupsDelete(); err != nil {
|
if !c.sandbox.config.SandboxCgroupOnly {
|
||||||
return err
|
if err := c.cgroupsDelete(); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return c.store.Delete()
|
return c.store.Delete()
|
||||||
@ -1200,8 +1204,10 @@ func (c *Container) update(resources specs.LinuxResources) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := c.cgroupsUpdate(resources); err != nil {
|
if !c.sandbox.config.SandboxCgroupOnly {
|
||||||
return err
|
if err := c.cgroupsUpdate(resources); err != nil {
|
||||||
|
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