Skip to content
This repository has been archived by the owner on Mar 28, 2020. It is now read-only.

etcd pod health/liveliness probe fails if auth is enabled #1957

Closed
hasbro17 opened this issue May 1, 2018 · 3 comments
Closed

etcd pod health/liveliness probe fails if auth is enabled #1957

hasbro17 opened this issue May 1, 2018 · 3 comments

Comments

@hasbro17
Copy link
Contributor

hasbro17 commented May 1, 2018

The current probe used for determining etcd liveliness/health is a linearizable get.

// etcd pod is alive only if a linearizable get succeeds.
cmd := "ETCDCTL_API=3 etcdctl get foo"

This ensures that the etcd pod is ready to participate in consensus and serve requests.

After auth is enabled on a deployed etcd cluster the etcd-pod's probe will fail since the request is not authenticated.

One solution is to replace the linearizable get with endpoints health.
https://github.com/coreos/etcd/tree/master/etcdctl#endpoint-health

For this to work we need to ensure that endpoints health would give the same guarantees as a linearizable get, and that it works on an auth enabled cluster.

@stevanmilic
Copy link

stevanmilic commented Jul 20, 2018

Hey @hasbro17 is there any temporary solution to this problem? i.e. what could I do to make the command use endpoints health in the pod configuration? since manually editing it can't work because of permissions (and besides you don't wanna do that).

@avorima
Copy link
Contributor

avorima commented Dec 7, 2018

@stevanmilic The endpoints health command does a get 'health' so it's not really a fix. At least on my v1.12.2 k8s with v0.9.3 etcd-operator.

@rafi
Copy link

rafi commented Dec 10, 2018

The endpoint health still requires a username. However, endpoint status does not. Why weren't the probes changed to endpoint status ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants