-
Notifications
You must be signed in to change notification settings - Fork 40k
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
Replace go-etcd with etcd/client #11962
Comments
Does it reuse tcp/http connections or do we have to port our patch? https://github.com/GoogleCloudPlatform/kubernetes/tree/master/third_party/forked/coreos/go-etcd |
I can't tell you for sure, but I do see that the client sets a default KeepAlive value on a customer net.Dialer: https://github.com/coreos/etcd/blob/master/client/client.go#L43. Maybe the etcd team can chime in here. |
@bprashanth You still need to set The benefits I could see:
Possible drawbacks:
|
I think that we should wait until etcd-io/etcd#3193 is fixed (it doesn't seem to be a lot of work). Once this is fixed we should be able to migrate to the new library relatively quickly. |
2 questions:
|
What problems would this solve? What performance gain could be expected? What bugs would it fix? Will the existing library be deprecated or deleted at some point? If we need to make the change in the 1.1 timeframe, earlier would be better. If someone could do that and run all the e2e tests that would help us assess the stability risk. cc @lavalamp |
@bgrant0607 The key issue of interest is the thread safety issue outlined in #7566 . |
Someone just needs to try it and run all of our e2e tests and benchmarks. |
@yichengq do you have an ETA? |
@timothysc I plan to finish the left performance issue etcd-io/etcd#3193 in the next week. |
I can try to pick it up then. |
Per our discussion today, the client is available: @wojtek-t is isolating the dependencies which appear to be in a lot of locations, including a forked client in server.go.?.?.? $ grep -r "go-etcd" * | wc -l I'm starting from the helper and updating. /cc @danmcp |
Thanks @timothysc One PR slightly reducing dependencies on go-etcd is already LGTMed: I have another one pretty close - should send it out for review today and will post its number here. |
But I think that we will need to convert few things anyway. These are:
|
No I didn't touch server.go However, once #13584 is merged it will be much better: $ git grep "go-etcd" | wc -l (And changing half of them should be trivial) |
Deps list for those watching: etcd-io/etcd#3471 |
I'd like more context behind the second bullet - that doesn't make a lot of On Wed, Oct 14, 2015 at 12:51 PM, Timothy St. Clair <
|
The SIG agreed that the FakeClient doesn't make much sense going forwards as the semantics change with both the current mod, as well as the upcoming etcd3 mods. We are basically fixing the fake client to match the shift, while it still masks behavioral differences between clients. Thus standing up etcd programmatically is relatively low cost and can be done on an as needed basis. |
Can you explain why FakeClient doesn't make sense? Emulating deep etcd On Wed, Oct 14, 2015 at 1:17 PM, Timothy St. Clair <notifications@github.com
|
The updated client libraries change both the api and behaviour. On those modifications, it forces a shift in the FakeClient to match on both fronts. So shift now + shift later ...
We counted ~15 files, and not all tests within those files. In general, the code has not properly abstracted the storage layer, and that concerns me even more. Removing the FakeClient ensures that we are testing reality as this changes. Ideally we hide behind the storage layer for all of this. |
Ok, thanks for the clarification. On Wed, Oct 14, 2015 at 3:12 PM, Timothy St. Clair <notifications@github.com
|
For update, code needed to replace fakeClient is now I'm in... |
Storage layer is nearly completely isolated only a couple of minor changes needed now. |
There are at least two places where this should be relatively simple to get rid of the dependency:
|
Also - I would like to eliminate tools.EtcdClient interface completely, |
agreed |
any update on this? I'm interested in being able to plumb a quorum read in a couple particular cases, and only the new client exposes that option |
/me registers interest in this since that'll probably allow easier usage of etcd ACLs |
@wojtek-t we can finally close this one now. |
I think there is two more actions to do here
|
There is a separate issue for that. #18791 |
OK - then I guess we can close this one. |
The go-etcd client library (github.com/coreos/go-etcd) is deprecated in favor of the client library that lives directly in the etcd repo (github.com/coreos/etcd/client). This new library is receiving a lot more love from the core etcd development team, and is the current blessed set of golang etcd bindings.
The text was updated successfully, but these errors were encountered: