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

Negative TTL problem on macOS [etcd v2.3.7] #7132

Closed
bwplotka opened this issue Jan 10, 2017 · 6 comments
Closed

Negative TTL problem on macOS [etcd v2.3.7] #7132

bwplotka opened this issue Jan 10, 2017 · 6 comments
Assignees

Comments

@bwplotka
Copy link

bwplotka commented Jan 10, 2017

Simple TTL usage with single local etcd does not work on the newest macOS version. Works for every Linux distro I tested, though. Only valid for etcd v2.3.7. Older v2.3.6 seems to work. Darwin build for 2.3.7 is somehow malformed?

System:

System Version:    macOS 10.12.2 (16C67)
Kernel Version:    Darwin 16.3.0

Steps to reproduce:
On macOS machine:

  1. Install etcd using steps stated here: https://github.com/coreos/etcd/releases/tag/v2.3.7
curl -L  https://github.com/coreos/etcd/releases/download/v2.3.7/etcd-v2.3.7-darwin-amd64.zip -o etcd-v2.3.7-darwin-amd64.zip
unzip etcd-v2.3.7-darwin-amd64.zip
cd etcd-v2.3.7-darwin-amd64
./etcd
  1. On another terminal set value with TTL and try to get it periodically. After TTL expiration, we can see negative values and key is not deleted. (exactly follow: https://coreos.com/etcd/docs/latest/v2/api.html#using-key-ttl). Added date cmd to show that the clocks are synced.
:~ $ date && curl http://127.0.0.1:2379/v2/keys/foo -XPUT -d value=bar -d ttl=5
Tue 10 Jan 2017 16:19:09 GMT
{"action":"set","node":{"key":"/foo","value":"bar","expiration":"2017-01-10T16:19:14.01513555Z","ttl":5,"modifiedIndex":4,"createdIndex":4}}
:~ $ date && curl http://127.0.0.1:2379/v2/keys/foo
Tue 10 Jan 2017 16:19:14 GMT
{"action":"get","node":{"key":"/foo","value":"bar","expiration":"2017-01-10T16:19:14.01513555Z","modifiedIndex":4,"createdIndex":4}}
:~ $ date && curl http://127.0.0.1:2379/v2/keys/foo
Tue 10 Jan 2017 16:19:14 GMT
{"action":"get","node":{"key":"/foo","value":"bar","expiration":"2017-01-10T16:19:14.01513555Z","modifiedIndex":4,"createdIndex":4}}
:~ $ date && curl http://127.0.0.1:2379/v2/keys/foo
Tue 10 Jan 2017 16:19:16 GMT
{"action":"get","node":{"key":"/foo","value":"bar","expiration":"2017-01-10T16:19:14.01513555Z","ttl":-2,"modifiedIndex":4,"createdIndex":4}}
:~ $ date && curl http://127.0.0.1:2379/v2/keys/foo
Tue 10 Jan 2017 16:19:17 GMT
{"action":"get","node":{"key":"/foo","value":"bar","expiration":"2017-01-10T16:19:14.01513555Z","ttl":-3,"modifiedIndex":4,"createdIndex":4}}
:~ $ date && curl http://127.0.0.1:2379/v2/keys/foo
Tue 10 Jan 2017 16:19:19 GMT
{"action":"get","node":{"key":"/foo","value":"bar","expiration":"2017-01-10T16:19:14.01513555Z","ttl":-5,"modifiedIndex":4,"createdIndex":4}}

Any ideas?

@xiang90
Copy link
Contributor

xiang90 commented Jan 10, 2017

@Bplotka Can you build from source with go 1.7.2 on Darwin 16.3.0? See if it solves the problem?

@xiang90
Copy link
Contributor

xiang90 commented Jan 10, 2017

@Bplotka I think you might meet this issue golang/go#16570

@xiang90
Copy link
Contributor

xiang90 commented Jan 24, 2017

@Bplotka Kindly ping.

@bwplotka
Copy link
Author

bwplotka commented Jan 24, 2017

Sorry for delayed response.. I am using Linux & Windows, so had to find volunteer with this version of macOS who could help me to test it (thanks @joshpmcghee).

When built from source with the both go 1.7.1 or 1.7.2 it works fine, but it does not solve our problem: We have the use case that we want to download the newest etcd v2 binary and just use it for dev/testing on any MacOS.

Is there any way to rebuild it on your side and provide working binary out-of-the-box?

@xiang90
Copy link
Contributor

xiang90 commented Jan 24, 2017

Is there any way to rebuild it on your side and provide working binary out-of-the-box?

I do not think we are going to re-build ALL previous released versions of etcd with go 1.7. But we might release a new etcd 2.3.x version sometime next week that built with go 1.7. Closing this issue since we confirmed this is a go runtime problem.

@xiang90 xiang90 closed this as completed Jan 24, 2017
@bwplotka
Copy link
Author

Thanks, waiting for next 2.3.x version then (:

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

2 participants