mirror of
https://github.com/k3s-io/k3s.git
synced 2024-06-07 19:41:36 +00:00
Skip CGroup v2 evac when agent is disabled
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
This commit is contained in:
parent
effcb15adb
commit
b1e0f4c8fc
@ -55,10 +55,14 @@ func run(app *cli.Context, cfg *cmds.Server, leaderControllers server.CustomCont
|
||||
// database credentials or other secrets.
|
||||
gspt.SetProcTitle(os.Args[0] + " server")
|
||||
|
||||
// Evacuate cgroup v2 before doing anything else that may fork.
|
||||
// If the agent is enabled, evacuate cgroup v2 before doing anything else that may fork.
|
||||
// If the agent is disabled, we don't need to bother doing this as it is only the kubelet
|
||||
// that cares about cgroups.
|
||||
if !cfg.DisableAgent {
|
||||
if err := cmds.EvacuateCgroup2(); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
// Initialize logging, and subprocess reaping if necessary.
|
||||
// Log output redirection and subprocess reaping both require forking.
|
||||
|
Loading…
Reference in New Issue
Block a user