|
|
@ -51,16 +51,15 @@ func setupContainerdConfig(ctx context.Context, cfg *config.Node) error { |
|
|
|
disableCgroup := isRunningInUserNS && (!controllers["cpu"] || !controllers["pids"] || !cgroupfsWritable) |
|
|
|
disableCgroup := isRunningInUserNS && (!controllers["cpu"] || !controllers["pids"] || !cgroupfsWritable) |
|
|
|
if disableCgroup { |
|
|
|
if disableCgroup { |
|
|
|
logrus.Warn("cgroup v2 controllers are not delegated for rootless. Disabling cgroup.") |
|
|
|
logrus.Warn("cgroup v2 controllers are not delegated for rootless. Disabling cgroup.") |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
cfg.AgentConfig.Systemd = controllers["cpuset"] && os.Getenv("NOTIFY_SOCKET") != "" |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
systemdCgroup := controllers["cpuset"] && os.Getenv("NOTIFY_SOCKET") != "" |
|
|
|
|
|
|
|
cfg.AgentConfig.Systemd = systemdCgroup |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var containerdTemplate string |
|
|
|
var containerdTemplate string |
|
|
|
containerdConfig := templates.ContainerdConfig{ |
|
|
|
containerdConfig := templates.ContainerdConfig{ |
|
|
|
NodeConfig: cfg, |
|
|
|
NodeConfig: cfg, |
|
|
|
DisableCgroup: disableCgroup, |
|
|
|
DisableCgroup: disableCgroup, |
|
|
|
SystemdCgroup: systemdCgroup, |
|
|
|
SystemdCgroup: cfg.AgentConfig.Systemd, |
|
|
|
IsRunningInUserNS: isRunningInUserNS, |
|
|
|
IsRunningInUserNS: isRunningInUserNS, |
|
|
|
PrivateRegistryConfig: privRegistries.Registry, |
|
|
|
PrivateRegistryConfig: privRegistries.Registry, |
|
|
|
ExtraRuntimes: findNvidiaContainerRuntimes(os.DirFS(string(os.PathSeparator))), |
|
|
|
ExtraRuntimes: findNvidiaContainerRuntimes(os.DirFS(string(os.PathSeparator))), |
|
|
|