open-nomad/client/lib/cgutil
Seth Hoenig d69556fb35
client: ensure minimal cgroup controllers enabled (#15027)
* client: ensure minimal cgroup controllers enabled

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: https://github.com/hashicorp/nomad/issues/14494

* docs: cleanup doc string

* client: cleanup controller writes, enhance log messages
2022-10-24 16:08:54 -05:00
..
cgutil_linux.go client: refactor cpuset manager initialization 2022-08-25 11:18:43 -05:00
cgutil_linux_test.go client: refactor cpuset manager initialization 2022-08-25 11:18:43 -05:00
cgutil_noop.go client: refactor cpuset manager initialization 2022-08-25 11:18:43 -05:00
cpuset_manager.go CI: make `make check` clean on macOS (#14528) 2022-09-09 12:26:34 -04:00
cpuset_manager_test.go client: enable support for cgroups v2 2022-03-23 11:35:27 -05:00
cpuset_manager_v1.go client: refactor cpuset manager initialization 2022-08-25 11:18:43 -05:00
cpuset_manager_v1_test.go cleanup: rename Equals to Equal for consistency (#14759) 2022-10-10 09:28:46 -05:00
cpuset_manager_v2.go client: ensure minimal cgroup controllers enabled (#15027) 2022-10-24 16:08:54 -05:00
cpuset_manager_v2_test.go client: refactor cpuset manager initialization 2022-08-25 11:18:43 -05:00
editor.go cgroups: refactor v2 kill path to use cgroups.kill interface file 2022-08-29 14:55:13 -05:00
editor_test.go cgroups: refactor v2 kill path to use cgroups.kill interface file 2022-08-29 14:55:13 -05:00
group_killer.go cgroups: refactor v2 kill path to use cgroups.kill interface file 2022-08-29 14:55:13 -05:00