-
Notifications
You must be signed in to change notification settings - Fork 25k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle existence of cgroup version 2 hierarchy
When parsing the control groups to which the Elasticsearch process belongs, we extract a map from subsystems to paths by parsing /proc/self/cgroup. This file contains colon-delimited entries of the form hierarchy-ID:subsystem-list:cgroup-path. For control group version 1 hierarchies, the subsystem-list is a comma-delimited list of the subsystems for that hierarchy. For control group version 2 hierarchies (which can only exist on Linux kernels since version 4.5), the subsystem-list is an empty string. The previous parsing of /proc/self/cgroup incorrectly accounted for this possibility (a + instead of a * in a regular expression). This commit addresses this issue, adds a test case that covers this possibility, and simplifies the code that parses /proc/self/cgroup. Relates #23493
- Loading branch information
1 parent
47ae063
commit 25595a0
Showing
2 changed files
with
25 additions
and
21 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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