[gh-24931] Return dummy function for moving processes when running rootless (#24944)

* fix: stop executor launch if nomad doesnt have permissions

* func: return move function if c group is not enabled
This commit is contained in:
Juana De La Cuesta
2025-03-06 10:34:21 +01:00
committed by GitHub
parent 5c4d0e923d
commit 6ffe441983

View File

@@ -156,6 +156,9 @@ func (e *UniversalExecutor) configureResourceContainer(
return moveProcess, deleteCgroup, err
}
moveProcess, deleteCgroup = e.enterCG1(cgroup, command.CpusetCgroup())
case cgroupslib.OFF:
deleteCgroup = func() {}
moveProcess = func() error { return nil }
default:
e.configureCG2(cgroup, command)
// configure child process to spawn in the cgroup