mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-18 16:21:13 +00:00
Log the error even if closeFn crashes
This commit is contained in:
parent
f0e1d394f1
commit
79dfd42718
@ -190,6 +190,8 @@ func startMasterOrDie(masterConfig *master.Config, incomingServer *httptest.Serv
|
||||
masterConfig.ExtraConfig.VersionedInformers = informers.NewSharedInformerFactory(clientset, masterConfig.GenericConfig.LoopbackClientConfig.Timeout)
|
||||
m, err = masterConfig.Complete().New(genericapiserver.NewEmptyDelegate())
|
||||
if err != nil {
|
||||
// We log the error first so that even if closeFn crashes, the error is shown
|
||||
klog.Errorf("error in bringing up the master: %v", err)
|
||||
closeFn()
|
||||
klog.Fatalf("error in bringing up the master: %v", err)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user