diff --git a/client/lib/proclib/wrangler.go b/client/lib/proclib/wrangler.go index 82c110469..b59b3ce84 100644 --- a/client/lib/proclib/wrangler.go +++ b/client/lib/proclib/wrangler.go @@ -43,8 +43,10 @@ func (w *Wranglers) Setup(task Task) error { // create process wrangler for task pw := w.create(task) - // perform any initialization if necessary - pw.Initialize() + // perform any initialization if necessary (e.g. create cgroup) + // if this doesn't work just keep going; it's up to each task driver + // implementation to decide if this is a failure mode + _ = pw.Initialize() w.lock.Lock() defer w.lock.Unlock() diff --git a/drivers/shared/executor/executor.go b/drivers/shared/executor/executor.go index cfc730b2f..f138308c1 100644 --- a/drivers/shared/executor/executor.go +++ b/drivers/shared/executor/executor.go @@ -315,8 +315,8 @@ func (e *UniversalExecutor) Launch(command *ExecCommand) (*ProcessState, error) // setup containment (i.e. cgroups on linux) if cleanup, err := e.configureResourceContainer(command, os.Getpid()); err != nil { - e.logger.Error("failed to configure resource container", "error", err) - return nil, err + // keep going; some folks run nomad as non-root and expect this driver to still work + e.logger.Warn("failed to configure container, process isolation will not work", "error", err) } else { defer cleanup() } diff --git a/e2e/vaultcompat/vaultcompat_test.go b/e2e/vaultcompat/vaultcompat_test.go index 8586168d6..b269ddf78 100644 --- a/e2e/vaultcompat/vaultcompat_test.go +++ b/e2e/vaultcompat/vaultcompat_test.go @@ -18,6 +18,7 @@ import ( "github.com/hashicorp/go-set" "github.com/hashicorp/go-version" nomadapi "github.com/hashicorp/nomad/api" + "github.com/hashicorp/nomad/helper/testlog" "github.com/hashicorp/nomad/testutil" vaultapi "github.com/hashicorp/vault/api" "github.com/shoenig/test/must" @@ -135,7 +136,7 @@ func startNomad(t *testing.T, vc *vaultapi.Client) (func(), *nomadapi.Client) { c.Client = &testutil.ClientConfig{ Enabled: true, } - c.LogLevel = "off" + c.LogLevel = testlog.HCLoggerTestLevel().String() }) nc, err := nomadapi.NewClient(&nomadapi.Config{ Address: "http://" + ts.HTTPAddr,