From b235091a513e23c9ac91b4a6efe309506c501127 Mon Sep 17 00:00:00 2001 From: Nick Ethier Date: Wed, 14 Apr 2021 14:44:08 -0400 Subject: [PATCH] client: disable cpuset cgroup managment if init fails --- client/client.go | 2 +- client/config/config.go | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/client/client.go b/client/client.go index c2fb094c8..8208331d9 100644 --- a/client/client.go +++ b/client/client.go @@ -646,7 +646,7 @@ func (c *Client) init() error { // if the client cannot initialize the cgroup then reserved cores will not be reported and the cpuset manager // will be disabled. this is common when running in dev mode under a non-root user for example c.logger.Warn("could not initialize cpuset cgroup subsystem, cpuset management disabled", "error", err) - c.config.DisableCgroupManagement = true + c.cpusetManager = cgutil.NoopCpusetManager() } } return nil diff --git a/client/config/config.go b/client/config/config.go index b3c05d601..cb90561a0 100644 --- a/client/config/config.go +++ b/client/config/config.go @@ -274,10 +274,6 @@ type Config struct { // ReservableCores if set overrides the set of reservable cores reported in fingerprinting. ReservableCores []uint16 - - // DisableCgroupManagement if true disables all management of cgroup subsystems by the Nomad client. It does - // not prevent individual drivers from manging their own cgroups. - DisableCgroupManagement bool } type ClientTemplateConfig struct {