Skip to content

fixes for pkg/sysinfo/checkCgroupPids#162

Merged
giuseppe merged 2 commits intocontainers:masterfrom
kolyshkin:pids
May 23, 2020
Merged

fixes for pkg/sysinfo/checkCgroupPids#162
giuseppe merged 2 commits intocontainers:masterfrom
kolyshkin:pids

Conversation

@kolyshkin
Copy link
Copy Markdown
Contributor

@kolyshkin kolyshkin commented May 23, 2020

1. pkg/sysinfo.checkCgroupPids: fix error path

In case we failed to find out what version of cgroup we have,
it makes little sense to return that pids cgroup controller
is available, and yet the current code does it.

Fix this.

2. pkg/sysinfo.checkCgroupPids: speedup

For some reason this code chose not to use information already fetched,
and call cgroups.FindCgroupMountpoint() instead. This is not a cheap
call, as it has to parse the whole nine yards of /proc/self/mountinfo,
and the info it tries to get (whether the pids controller is present)
is already available from cgMounts map.

This also prepares the code for the upcoming changes in runc (opencontainers/runc#2411).

kolyshkin added 2 commits May 22, 2020 17:29
In case we failed to find out what version of cgroup we have,
it makes little sense to return that pids cgroup controller
is available, and yet the current code does it.

Fix this.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
For some reason this code chose not to use information already fetched,
and call cgroups.FindCgroupMountpoint() instead. This is not a cheap
call, as it has to parse the whole nine yards of /proc/self/mountinfo,
and the info it tries to get (whether the pids controller is present)
is already available from cgMounts map.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
@rhatdan
Copy link
Copy Markdown
Member

rhatdan commented May 23, 2020

@giuseppe
Copy link
Copy Markdown
Member

LGTM

@giuseppe giuseppe merged commit 4f08a5f into containers:master May 23, 2020
M1cha pushed a commit to M1cha/common that referenced this pull request Dec 20, 2022
dns: Add support for `DNS` with containers via `aardvark`.
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.

3 participants