mirror of
https://github.com/kemko/nomad.git
synced 2026-01-01 16:05:42 +03:00
[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:
committed by
GitHub
parent
5c4d0e923d
commit
6ffe441983
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user