Commit df3033a2 authored by Lorenz Brun's avatar Lorenz Brun

Consider prefix in health check

parent 19b27589
...@@ -19,6 +19,7 @@ package factory ...@@ -19,6 +19,7 @@ package factory
import ( import (
"context" "context"
"fmt" "fmt"
"path"
"sync" "sync"
"sync/atomic" "sync/atomic"
"time" "time"
...@@ -73,7 +74,7 @@ func newETCD3HealthCheck(c storagebackend.Config) (func() error, error) { ...@@ -73,7 +74,7 @@ func newETCD3HealthCheck(c storagebackend.Config) (func() error, error) {
ctx, cancel := context.WithTimeout(context.Background(), 2*time.Second) ctx, cancel := context.WithTimeout(context.Background(), 2*time.Second)
defer cancel() defer cancel()
// See https://github.com/etcd-io/etcd/blob/master/etcdctl/ctlv3/command/ep_command.go#L118 // See https://github.com/etcd-io/etcd/blob/master/etcdctl/ctlv3/command/ep_command.go#L118
_, err := client.Get(ctx, "health") _, err := client.Get(ctx, path.Join(c.Prefix, "health"))
if err == nil { if err == nil {
return nil return nil
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment