From f4941e265e1a41a1b8846eae61a4049785cabb7e Mon Sep 17 00:00:00 2001 From: Ted Yu Date: Mon, 21 Oct 2019 17:03:24 -0700 Subject: [PATCH] etcd health check key should have proper prefix --- .../apiserver/pkg/storage/storagebackend/factory/etcd3.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/staging/src/k8s.io/apiserver/pkg/storage/storagebackend/factory/etcd3.go b/staging/src/k8s.io/apiserver/pkg/storage/storagebackend/factory/etcd3.go index 1d01626291a..1bf69861e04 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/storagebackend/factory/etcd3.go +++ b/staging/src/k8s.io/apiserver/pkg/storage/storagebackend/factory/etcd3.go @@ -86,8 +86,8 @@ func newETCD3HealthCheck(c storagebackend.Config) (func() error, error) { client := clientValue.Load().(*clientv3.Client) ctx, cancel := context.WithTimeout(context.Background(), 2*time.Second) defer cancel() - // See https://github.com/etcd-io/etcd/blob/master/etcdctl/ctlv3/command/ep_command.go#L118 - _, err := client.Get(ctx, path.Join(c.Prefix, "health")) + // See https://github.com/etcd-io/etcd/blob/c57f8b3af865d1b531b979889c602ba14377420e/etcdctl/ctlv3/command/ep_command.go#L118 + _, err := client.Get(ctx, path.Join("/", c.Prefix, "health")) if err == nil { return nil }