From b9b0b05f77f2a0407e979532fe8ee6f646186b01 Mon Sep 17 00:00:00 2001 From: Pasquale Congiusti Date: Fri, 28 Apr 2023 12:24:31 +0200 Subject: [PATCH] fix(operator): do not panic if cannot set GOMAXPROCS Closes #4299 --- pkg/cmd/operator/operator.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/cmd/operator/operator.go b/pkg/cmd/operator/operator.go index 03a89001d9..ec0ee71ae4 100644 --- a/pkg/cmd/operator/operator.go +++ b/pkg/cmd/operator/operator.go @@ -126,7 +126,9 @@ func Run(healthPort, monitoringPort int32, leaderElection bool, leaderElectionID klog.SetLogger(log.AsLogger()) _, err := maxprocs.Set(maxprocs.Logger(func(f string, a ...interface{}) { log.Info(fmt.Sprintf(f, a)) })) - exitOnError(err, "failed to set GOMAXPROCS from cgroups") + if err != nil { + log.Error(err, "failed to set GOMAXPROCS from cgroups") + } printVersion()