From cab04997f06d9a3c4aee031e1874bb063a5dc690 Mon Sep 17 00:00:00 2001 From: Lang Martin Date: Mon, 22 Jul 2019 15:16:13 -0400 Subject: [PATCH] executor_universal_linux raw_exec cgroup failure is not fatal --- drivers/shared/executor/executor_universal_linux.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/shared/executor/executor_universal_linux.go b/drivers/shared/executor/executor_universal_linux.go index f201b4f798b..454c51bba9f 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 { - e.logger.Warn("failed to create cgroup", "error", err) - return err + // Debug 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) + return nil } - e.resConCtx.groups = cfg.Cgroups return cgroups.EnterPid(cfg.Cgroups.Paths, pid) }