mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-07-31 23:36:12 +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
|
||||
|
||||
if err = c.cgroupsCreate(); err != nil {
|
||||
return
|
||||
if !c.sandbox.config.SandboxCgroupOnly {
|
||||
if err = c.cgroupsCreate(); err != nil {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
if !c.sandbox.supportNewStore() {
|
||||
@ -908,8 +910,10 @@ func (c *Container) delete() error {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := c.cgroupsDelete(); err != nil {
|
||||
return err
|
||||
if !c.sandbox.config.SandboxCgroupOnly {
|
||||
if err := c.cgroupsDelete(); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return c.store.Delete()
|
||||
@ -1200,8 +1204,10 @@ func (c *Container) update(resources specs.LinuxResources) error {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := c.cgroupsUpdate(resources); err != nil {
|
||||
return err
|
||||
if !c.sandbox.config.SandboxCgroupOnly {
|
||||
if err := c.cgroupsUpdate(resources); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return c.sandbox.agent.updateContainer(c.sandbox, *c, resources)
|
||||
|
Loading…
Reference in New Issue
Block a user