Fixed detection of the etcd connection status
[multicloud/k8s.git] / src / k8splugin / api / healthcheckhandler.go
index 896c6df..2b338b9 100644 (file)
@@ -31,5 +31,10 @@ func healthCheckHandler(w http.ResponseWriter, r *http.Request) {
                return
        }
 
+       err = db.Etcd.HealthCheck()
+       if err != nil {
+               http.Error(w, err.Error(), http.StatusInternalServerError)
+               return
+       }
        w.WriteHeader(http.StatusOK)
 }