Skip to content

fix: cgroup leak when delete container from pod#40

Open
zhaodiaoer wants to merge 1 commit intofuweid:unstablefrom
zhaodiaoer:test
Open

fix: cgroup leak when delete container from pod#40
zhaodiaoer wants to merge 1 commit intofuweid:unstablefrom
zhaodiaoer:test

Conversation

@zhaodiaoer
Copy link
Contributor

There are some situations that containerd(CRI) will be asked to delete containers from a pod which not terminated, for example, kubelet will clean initContainers before start pod(pruneInitContainersBeforeStart).

Currently, TaskManager's Delete function only removes the task item from map, the container's resources like bundle and cgroup will leak on the host, this commit fixes this.

There are some situations that containerd(CRI) will be asked to delete
containers from a pod which not terminated, for example,  kubelet will
clean initContainers before start pod(`pruneInitContainersBeforeStart`).

Currently, TaskManager's `Delete` function only removes the task item
from map, the container's resources like bundle and cgroup will leak on
the host, this commit fixes this.

Signed-off-by: Lei Liu <liulei.pt@bytedance.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments