Skip to content

Commit

Permalink
Merge pull request #5991 from hashicorp/b-cgroup-error-non-fatal
Browse files Browse the repository at this point in the history
executor_universal_linux raw_exec cgroup failure is not fatal
  • Loading branch information
langmartin authored Jul 22, 2019
2 parents b2cfc5e + cab0499 commit e05e290
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions drivers/shared/executor/executor_universal_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit e05e290

Please sign in to comment.