mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 17:30:00 +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)
|
masterConfig.ExtraConfig.VersionedInformers = informers.NewSharedInformerFactory(clientset, masterConfig.GenericConfig.LoopbackClientConfig.Timeout)
|
||||||
m, err = masterConfig.Complete().New(genericapiserver.NewEmptyDelegate())
|
m, err = masterConfig.Complete().New(genericapiserver.NewEmptyDelegate())
|
||||||
if err != nil {
|
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()
|
closeFn()
|
||||||
klog.Fatalf("error in bringing up the master: %v", err)
|
klog.Fatalf("error in bringing up the master: %v", err)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user