Default cgroup_parent path no longer respects cgroup version #23896
Labels
stage/accepted
Confirmed, and intend to work on. No timeline committment though.
theme/numa
type/bug
Nomad version
Nomad 1.7.7 (but issue also exists at tip)
Operating system and Environment details
Unix
Issue
The default value for the
cgroup_parent
config used to be based on the cgroup version inferred by nomad. However, in 1.7.7 this seems to have become a hardcoded value. This causes the default value to be incorrect on cgroup v1 systems.The issue seems to be introduced by this commit: a4cc76b#diff-30de430fcaf9ccc69c864d5e78db52b7c2741787c3382839547d60d0c9000267L798-R797
I think reverting this to the original behavior should be straightforward just by using
defaultParent
in place of the hardcoded value:nomad/client/lib/cgroupslib/switch_linux.go
Line 20 in 6700937
Though, we might need to teach
defaultParent
to handle the "off" case better (right now it falls through to the default case, which assumes cgroup v2).I don't quite know how to reason about the broader impact of this change, so I'm just reporting the issue for now.
Reproduction steps
On a cgroup v1 system:
Expected Result
Default value should be
/nomad
Actual Result
Default value is
nomad.slice
The text was updated successfully, but these errors were encountered: