From 79dfd42718335e931f947e97ed6915e0c5489c60 Mon Sep 17 00:00:00 2001 From: Ted Yu Date: Mon, 21 Oct 2019 16:41:54 -0700 Subject: [PATCH] Log the error even if closeFn crashes --- test/integration/framework/master_utils.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/integration/framework/master_utils.go b/test/integration/framework/master_utils.go index e2a8d207d46..a3feb222ec5 100644 --- a/test/integration/framework/master_utils.go +++ b/test/integration/framework/master_utils.go @@ -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) }