Skip to content

Commit 3ff3769

Browse files
authored
Merge pull request kubernetes#83971 from yutedz/err-start-master
Log the error before calling closeFn
2 parents 10490a6 + 79dfd42 commit 3ff3769

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

test/integration/framework/master_utils.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,8 @@ func startMasterOrDie(masterConfig *master.Config, incomingServer *httptest.Serv
190190
masterConfig.ExtraConfig.VersionedInformers = informers.NewSharedInformerFactory(clientset, masterConfig.GenericConfig.LoopbackClientConfig.Timeout)
191191
m, err = masterConfig.Complete().New(genericapiserver.NewEmptyDelegate())
192192
if err != nil {
193+
// We log the error first so that even if closeFn crashes, the error is shown
194+
klog.Errorf("error in bringing up the master: %v", err)
193195
closeFn()
194196
klog.Fatalf("error in bringing up the master: %v", err)
195197
}

0 commit comments

Comments
 (0)