client: disable cpuset cgroup managment if init fails

This commit is contained in:
Nick Ethier 2021-04-14 14:44:08 -04:00
parent d7ab0b8a86
commit b235091a51
2 changed files with 1 additions and 5 deletions

View File

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

View File

@ -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 {