From aec9f1be0f5e09f691ec9f3b6f43e02a21953194 Mon Sep 17 00:00:00 2001 From: scuzhanglei Date: Fri, 27 Dec 2019 12:20:53 +0800 Subject: [PATCH 1/2] Fix error nil pointer bug when driver respond --- cmd/livenessprobe/main.go | 1 - 1 file changed, 1 deletion(-) diff --git a/cmd/livenessprobe/main.go b/cmd/livenessprobe/main.go index 2546d2c0..c601b650 100644 --- a/cmd/livenessprobe/main.go +++ b/cmd/livenessprobe/main.go @@ -61,7 +61,6 @@ func (h *healthProbe) checkProbe(w http.ResponseWriter, req *http.Request) { if !ready { w.WriteHeader(http.StatusInternalServerError) - w.Write([]byte(err.Error())) klog.Error("driver responded but is not ready") return } From a0714f97ba07cc74ba3d9e9b2428ec297e998921 Mon Sep 17 00:00:00 2001 From: scuzhanglei Date: Fri, 27 Dec 2019 13:53:34 +0800 Subject: [PATCH 2/2] Add error message --- cmd/livenessprobe/main.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/livenessprobe/main.go b/cmd/livenessprobe/main.go index c601b650..51dd2972 100644 --- a/cmd/livenessprobe/main.go +++ b/cmd/livenessprobe/main.go @@ -61,6 +61,7 @@ func (h *healthProbe) checkProbe(w http.ResponseWriter, req *http.Request) { if !ready { w.WriteHeader(http.StatusInternalServerError) + w.Write([]byte("driver responded but is not ready")) klog.Error("driver responded but is not ready") return }