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 v3.4 makes ETCDCTL_API=3 by default #9600

Closed
gyuho opened this issue Apr 20, 2018 · 2 comments · Fixed by #9784
Closed

etcd v3.4 makes ETCDCTL_API=3 by default #9600

gyuho opened this issue Apr 20, 2018 · 2 comments · Fixed by #9784
Milestone

Comments

@gyuho
Copy link
Contributor

gyuho commented Apr 20, 2018

v3.0.0 was out 2 years ago https://github.com/coreos/etcd/releases/tag/v3.0.0. v2 is officially deprecated in Container Linux https://coreos.com/blog/toward-etcd-v3-in-container-linux.html. While we still do keep all v2 features plus v2 API wrapper backed by v3 storage, default API should now be v3.

Before (< v3.4.0)

# "ETCDCTL_API=2" is set by default
$ ETCDCTL_API=2 ./bin/etcdctl set foo bar
bar

$ ./bin/etcdctl set foo bar
bar

$ ETCDCTL_API=3 ./bin/etcdctl set foo bar
Error: unknown command "set" for "etcdctl"
$ ETCDCTL_API=2 ./bin/etcdctl put foo bar
No help topic for 'put'

$ ./bin/etcdctl put foo bar
No help topic for 'put'

# for v3, "ETCDCTL_API=3" needs be set explicitly
$ ETCDCTL_API=3 ./bin/etcdctl put foo bar
OK

After (>= v3.4.0), we want to set "ETCDCTL_API=3" by default

$ ETCDCTL_API=2 ./bin/etcdctl set foo bar
bar

# "ETCDCTL_API=3" is set by default
$ ./bin/etcdctl set foo bar
Error: unknown command "set" for "etcdctl"

$ ETCDCTL_API=3 ./bin/etcdctl set foo bar
Error: unknown command "set" for "etcdctl"
# for v2, "ETCDCTL_API=2" needs be set explicitly
$ ETCDCTL_API=2 ./bin/etcdctl put foo bar
No help topic for 'put'

$ ./bin/etcdctl put foo bar
OK

$ ETCDCTL_API=3 ./bin/etcdctl put foo bar
OK

In general, community feedback is positive:

Please let us know if anybody has other concerns.

@gyuho gyuho added this to the etcd-v3.4 milestone Apr 20, 2018
@vimalk78
Copy link
Contributor

@joelegasse , if you are not working on this i would like to take it up.

@joelegasse joelegasse removed their assignment May 28, 2018
@joelegasse
Copy link
Contributor

@vimalk78 All yours. :-) Thank you

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.

3 participants