Code Review
/
multicloud
/
k8s.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
| inline |
side by side
Fixed detection of the etcd connection status
[multicloud/k8s.git]
/
src
/
k8splugin
/
api
/
healthcheckhandler.go
diff --git
a/src/k8splugin/api/healthcheckhandler.go
b/src/k8splugin/api/healthcheckhandler.go
index
896c6df
..
2b338b9
100644
(file)
--- a/
src/k8splugin/api/healthcheckhandler.go
+++ b/
src/k8splugin/api/healthcheckhandler.go
@@
-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)
}