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

grpc-gateway /kv/range hangs with auth enabled #6667

Closed
hexfusion opened this issue Oct 18, 2016 · 5 comments
Closed

grpc-gateway /kv/range hangs with auth enabled #6667

hexfusion opened this issue Oct 18, 2016 · 5 comments

Comments

@hexfusion
Copy link
Contributor

etcdctl version: 3.1.0-rc.0
API version: 3.1

curl -H "Content-Type: application/json" -X POST -d '{"key": "Zm9v"}' https://127.0.0.1:2379/v3alpha/kv/range

If auth is disabled this works as expected but otherwise the request will hang. This response differs from a put.

curl -H "Content-Type: application/json" -X POST -d '{"key": "Zm9v", "value": "YmFy"}' https://127.0.0.1:2379/v3alpha/kv/put

which although does not work correctly because of #6643 does respond with {"Error":"auth: revision in header is old","Code":2}.

This appears to be regression from a distance.

@gyuho
Copy link
Contributor

gyuho commented Oct 26, 2016

It works for me? Can you share the full commands to reproduce this?

@xiang90
Copy link
Contributor

xiang90 commented Nov 3, 2016

@gyuho I can reproduce it.

@mitake Can you take a look? This will bring etcd into busy loop. etcd starts to eat all CPUs.

@mitake
Copy link
Contributor

mitake commented Nov 4, 2016

@xiang90 @sbatschelet I also could reproduce the problem. Although the gateway does not support auth currently, it seems to be problematic. I'll work on it.

@xiang90
Copy link
Contributor

xiang90 commented Jan 13, 2017

@heyitsanthony I think this is due to the empty user thing you just fixed. Can you help to confirm? Thanks!

@heyitsanthony
Copy link
Contributor

With patch:

$ curl -H "Content-Type: application/json" -X POST -d '{"key": "Zm9v"}' http://127.0.0.1:2379/v3alpha/kv/range
{"error":"etcdserver: user name is empty","code":3}

Without patch: hangs.

Looks like it's fixed. Closing.

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

No branches or pull requests

5 participants