hashicorp / hashicorp/nomad

Make use of systemd delegate cgroup when possible.

Open
#18,211 2 comments 2 reactions 0 assignees View on GitHub
hcc/jira stage/accepted theme/cgroups theme/client type/enhancement
Dominant language
Go
Stars
17k
Forks
2.1k
Avg merge
1d 9h
Merged PRs (30d)
105

Description

Per https://systemd.io/CGROUP_DELEGATION/ (at the bottom)

> 🚫 Never create your own cgroups below arbitrary cgroups systemd manages, i.e cgroups you haven’t set Delegate= in. Specifically: 🔥 don’t create your own cgroups below the root cgroup 🔥.

Currently Nomad does exactly this - it creates the `nomad.slice` cgroup under the root cgroup regardless if systemd is in use or not. We should modify our linux packaging to set the Delegate in the systemd unit file so that we are in line with the expected usage of systemd.

However we'll need to continue supporting the mode of operation we have today - not all Linux operating systems use systemd (and thus have no delegate mechanism), and not all users use our Linux packaging. We'll also want to update our production documentation to make recommendations for such users.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading the linked systemd cgroup delegation guidance and inspecting Nomad's Linux packaging and systemd unit definition. Verify how the current nomad.slice setup behaves with and without systemd. Done means the packaged unit requests delegation when supported, while non-systemd and non-packaged installations remain supported and production documentation explains the required setup.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, linux
Domain
devops, documentation, infrastructure
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.