Merge pull request #5991 from hashicorp/b-cgroup-error-non-fatal

executor_universal_linux raw_exec cgroup failure is not fatal
This commit is contained in:
Lang Martin 2019-07-22 16:52:34 -04:00 committed by GitHub
commit d1932f1e11
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 3 deletions

View File

@ -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)
}