-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
client: ensure minimal cgroup controllers enabled #15027
Conversation
This PR fixes a bug where Nomad could not operate properly on operating systems that set the root cgroup.subtree_control to a set of controllers that do not include the minimal set of controllers needed by Nomad. Nomad needs these controllers enabled to operate: - cpuset - cpu - io - memory - pids Now, Nomad will ensure these controllers are enabled during Client initialization, adding them to cgroup.subtree_control as necessary. This should be particularly helpful on the RHEL/CentOS/Fedora family of system. Ubuntu systems should be unaffected as they enable all controllers by default. Fixes: #14494
709460e
to
fb67296
Compare
parentAbs := filepath.Join(CgroupRoot, parent) | ||
if err := os.MkdirAll(parentAbs, 0o755); err != nil { | ||
logger.Warn("failed to ensure nomad parent cgroup exists; disable cpuset management", "error", err) | ||
logger.Error("failed to ensure nomad parent cgroup exists; disable cpuset management", "error", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we change these log entries to say "disabling cpuset management"? "disable" sounds like we're telling the cluster administrator to do it.
spot check on CentOS 9 AMI
|
I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions. |
This PR fixes a bug where Nomad could not operate properly on operating
systems that set the root
cgroup.subtree_control
to a set of controllers thatdo not include the minimal set of controllers needed by Nomad.
Nomad needs these controllers enabled to operate:
Now, Nomad will ensure these controllers are enabled during Client initialization,
adding them to
cgroup.subtree_control
as necessary. This should be particularlyhelpful on the RHEL/CentOS/Fedora family of system. Ubuntu systems should be
unaffected as they enable all controllers by default.
Fixes: #14494
Backports to 1.4.x and 1.3.x (1.2.x predates cgroups v2 support)