Skip to content

[4.5] cgroup, systemd: cleanup cgroups#34

Merged
kolyshkin merged 2 commits into
projectatomic:rhaos-4.5from
haircommander:cgroup-fix-4.5
Sep 22, 2020
Merged

[4.5] cgroup, systemd: cleanup cgroups#34
kolyshkin merged 2 commits into
projectatomic:rhaos-4.5from
haircommander:cgroup-fix-4.5

Conversation

@haircommander
Copy link
Copy Markdown
Collaborator

@haircommander haircommander commented Sep 21, 2020

some hierarchies were created directly by .Apply() on top of systemd
managed cgroups. systemd doesn't manage these and as a result we leak
these cgroups.

Cherry-picked-by: Peter Hunt pehunt@redhat.com
Signed-off-by: Giuseppe Scrivano gscrivan@redhat.com

[This is a backport of opencontainers/runc#2503, fixing a regression introduced by commit bfa1b2a]

some hierarchies were created directly by .Apply() on top of systemd
managed cgroups.  systemd doesn't manage these and as a result we leak
these cgroups.

Cherry-picked-by: Peter Hunt <pehunt@redhat.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
@haircommander
Copy link
Copy Markdown
Collaborator Author

@haircommander
Copy link
Copy Markdown
Collaborator Author

ptal @mrunalp @kolyshkin

RemovePaths() deletes elements from the paths map for paths that has
been successfully removed.

Although, it does not empty the map itself (which is needed that AFAIK
Go garbage collector does not shrink the map), but all its callers do.

Move this operation from callers to RemovePaths.

No functional change, except the old map should be garbage collected now.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
@haircommander
Copy link
Copy Markdown
Collaborator Author

also added opencontainers/runc@254d23b

@mrunalp
Copy link
Copy Markdown
Collaborator

mrunalp commented Sep 22, 2020

Looks fine. I will wait for @kolyshkin to do final review and merge.

@kolyshkin
Copy link
Copy Markdown
Collaborator

This is a backport of opencontainers/runc#2503, fixing a regression introduced by commit bfa1b2a

Copy link
Copy Markdown
Collaborator

@kolyshkin kolyshkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kolyshkin kolyshkin merged commit 5101761 into projectatomic:rhaos-4.5 Sep 22, 2020
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.

4 participants