mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
runsc: Only uninstall cgroup for sandbox stop.
PiperOrigin-RevId: 231263114 Change-Id: I57467a34fe94e395fdd3685462c4fe9776d040a3
This commit is contained in:
@@ -721,7 +721,10 @@ func (c *Container) stop() error {
|
||||
if err := c.Sandbox.DestroyContainer(c.ID); err != nil {
|
||||
return fmt.Errorf("destroying container %q: %v", c.ID, err)
|
||||
}
|
||||
cgroup = c.Sandbox.Cgroup
|
||||
// Only uninstall cgroup for sandbox stop.
|
||||
if c.Sandbox.IsRootContainer(c.ID) {
|
||||
cgroup = c.Sandbox.Cgroup
|
||||
}
|
||||
// Only set sandbox to nil after it has been told to destroy the container.
|
||||
c.Sandbox = nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user