Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

etcd 3.5 health endpoint not usable when authentication is enabled #13144

Closed
tdolphin opened this issue Jun 24, 2021 · 1 comment · Fixed by #13145
Closed

etcd 3.5 health endpoint not usable when authentication is enabled #13144

tdolphin opened this issue Jun 24, 2021 · 1 comment · Fixed by #13145

Comments

@tdolphin
Copy link

Cannot query 127.0.01:2739/health when auth enabled in version 3.5
Steps to reproduce:

❯ ./etcdctl endpoint health
127.0.0.1:2379 is healthy: successfully committed proposal: took = 6.168636ms
❯ ./etcdctl user add root:passw0rd
User root created
❯ ./etcdctl user grant-role root root
Role root is granted to user root
❯ ./etcdctl auth enable
Authentication Enabled
❯ ./etcdctl endpoint health
{"level":"warn","ts":1624550312.4325728,"logger":"client","caller":"v3/retry_interceptor.go:62","msg":"retrying of unary invoker failed","target":"etcd-endpoints://0xc00014a700/#initially=[127.0.0.1:2379]","attempt":0,"error":"rpc error: code = InvalidArgument desc = etcdserver: user name is empty"}

127.0.0.1:2379 is unhealthy: failed to commit proposal: etcdserver: user name is empty
Error: unhealthy cluster

GET request to gateway doesn't give expected result
image

❯ etcdctl --user root:passw0rd auth disable
Authentication Disabled
❯ ./etcdctl endpoint health
127.0.0.1:2379 is healthy: successfully committed proposal: took = 2.579161ms

Expected: GET 127.0.0.1:2739/health would still work after authentication is enabled without requiring authentication.
Actual: errors giving unhealthy.
This means http GET cannot be used any more as liveness probe.

Note that:

etcdctl --user root:passw0rd endpoint health
127.0.0.1:2379 is healthy: successfully committed proposal: took = 22.706843ms
@tangcong
Copy link
Contributor

thanks @tdolphin. pr #13145 will fix it.

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

Successfully merging a pull request may close this issue.

2 participants