diff --git a/drivers/shared/executor/executor_universal_linux.go b/drivers/shared/executor/executor_universal_linux.go index 454c51bba..1ba79618e 100644 --- a/drivers/shared/executor/executor_universal_linux.go +++ b/drivers/shared/executor/executor_universal_linux.go @@ -77,10 +77,12 @@ func (e *UniversalExecutor) configureResourceContainer(pid int) error { err := configureBasicCgroups(cfg) if err != nil { - // Debug this error to help diagnose cases where nomad is run with too few + // Log this error to help diagnose cases where nomad is run with too few // permissions, but don't return an error. There is no separate check for // cgroup creation permissions, so this may be the happy path. - e.logger.Debug("failed to create cgroup", "error", err) + e.logger.Warn("failed to create cgroup", + "docs", "https://www.nomadproject.io/docs/drivers/raw_exec.html#no_cgroups", + "error", err) return nil } e.resConCtx.groups = cfg.Cgroups diff --git a/website/source/docs/drivers/raw_exec.html.md b/website/source/docs/drivers/raw_exec.html.md index 580223a58..b6eac1ef0 100644 --- a/website/source/docs/drivers/raw_exec.html.md +++ b/website/source/docs/drivers/raw_exec.html.md @@ -107,8 +107,10 @@ client { * `no_cgroups` - Specifies whether the driver should not use cgroups to manage the process group launched by the driver. By default, cgroups are used to manage the process tree to ensure full cleanup of all - processes started by the task. The driver only uses cgroups when Nomad is - launched as root, on Linux and when cgroups are detected. + processes started by the task. The driver uses cgroups by default on + Linux and when `/sys/fs/cgroup/freezer/nomad` is writable for the + Nomad process. Using a cgroup significantly reduces Nomad's CPU + usage when collecting process metrics. ## Client Options