diff --git a/client/client.go b/client/client.go index c16d62fd9..c68b58b3f 100644 --- a/client/client.go +++ b/client/client.go @@ -636,8 +636,9 @@ func (c *Client) init() error { // Ensure cgroups are created on linux platform if err := cgutil.InitCpusetParent(c.config.CgroupParent); err != nil { - // 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 + // 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 } diff --git a/client/config/config.go b/client/config/config.go index 2ea8f627a..b3c05d601 100644 --- a/client/config/config.go +++ b/client/config/config.go @@ -269,10 +269,10 @@ type Config struct { BindWildcardDefaultHostNetwork bool // CgroupParent is the parent cgroup Nomad should use when managing any cgroup subsystems. - // Currently this only includes the 'cpuset' cgroup subsystem + // Currently this only includes the 'cpuset' cgroup subsystem. CgroupParent string - // ReservableCores if set overrides the set of reservable cores reported in fingerprinting + // 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 diff --git a/client/lib/cgutil/cgutil_linux.go b/client/lib/cgutil/cgutil_linux.go index d4b5e88fa..9a3332ba4 100644 --- a/client/lib/cgutil/cgutil_linux.go +++ b/client/lib/cgutil/cgutil_linux.go @@ -17,10 +17,10 @@ const ( SharedCpusetCgroupName = "shared" ) -// InitCpusetParent checks that the cgroup parent and expected child cgroups have been created +// InitCpusetParent checks that the cgroup parent and expected child cgroups have been created. // If the cgroup parent is set to /nomad then this will ensure that the /nomad/shared // cgroup is initialized. The /nomad/reserved cgroup will be lazily created when a workload -// with reserved cores is created +// with reserved cores is created. func InitCpusetParent(cgroupParent string) error { if cgroupParent == "" { cgroupParent = DefaultCgroupParent