Fix: remove hard coded cgroup path in nerdctl info - #5182
Open
chemwolf6922 wants to merge 1 commit into
Open
Conversation
chemwolf6922
force-pushed
the
rootless-systemd-cgroup-discovery
branch
from
September 4, 2026 05:01
d548b9a to
e05eee0
Compare
Author
|
The test failures do not seem related to this change. Please help retrigger the tests. Thanks. |
AkihiroSuda
reviewed
Sep 4, 2026
AkihiroSuda
reviewed
Sep 4, 2026
AkihiroSuda
reviewed
Sep 4, 2026
AkihiroSuda
reviewed
Sep 4, 2026
AkihiroSuda
reviewed
Sep 4, 2026
chemwolf6922
force-pushed
the
rootless-systemd-cgroup-discovery
branch
from
September 4, 2026 08:32
e05eee0 to
7ae6940
Compare
Author
|
Hi @AkihiroSuda . |
AkihiroSuda
reviewed
Sep 4, 2026
AkihiroSuda
reviewed
Sep 4, 2026
AkihiroSuda
reviewed
Sep 4, 2026
Signed-off-by: Feng Wang <wang6922@outlook.com>
chemwolf6922
force-pushed
the
rootless-systemd-cgroup-discovery
branch
from
September 4, 2026 08:50
7ae6940 to
7bc523d
Compare
AkihiroSuda
reviewed
Sep 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Rootless cgroup-v2 capability detection assumed the systemd user hierarchy started directly under /sys/fs/cgroup/user.slice. This fails when systemd places the user manager under a prefixed or nested hierarchy, causing nerdctl info and the rootless setup tool to report incorrect controller availability.
This PR resolves the systemd user manager's actual cgroup over D-Bus instead.
Resolves #5172
Tests
Testcases
Test platforms
The pre-fix nerdctl is built from release 2.3.5.
Test results
Before the fix
After the fix
The actual run results all pass before and after the fix as those are handled by containerd and runc. And those already handle this correctly.
Test script