mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 23:37:01 +00:00
Merge pull request #83971 from yutedz/err-start-master
Log the error before calling closeFn
This commit is contained in:
commit
3ff376923d
@ -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