-
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
Update to use latest etcd client library #18635
Update to use latest etcd client library #18635
Conversation
Labelling this PR as size/L |
GCE e2e test build/test passed for commit 549ae8386443242a2554e0924452ac6c62437a73. |
client, err = etcd.NewClientFromFile(etcdConfigFile) | ||
} else { | ||
client = etcd.NewClient(etcdServerList) | ||
func newEtcd(etcdServerList []string) (etcd.Client, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like etcdConfigFile
should be completely removed as a state var (and flag) from SchedulerServer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
were you going to update newEtcd
in kube-apiserver/app/server.go
? also, what are we going to do about etcdConfigFile
? that's currently the only way to connect to a secured etcd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
re: etcdConfigFile - it's completely removed in the nwo.
/cc @xiang90
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so what's the recommended way to connect securely to etcd right now? we should surface that somewhere if we haven't already, I see a good amount of confusion on slack.
/cc @sttts since I'm OOO after Monday |
@@ -287,7 +287,6 @@ func TestFiltering(t *testing.T) { | |||
if err != nil { | |||
t.Fatalf("Incorrect resourceVersion: %s", fooCreated.ResourceVersion) | |||
} | |||
initialVersion-- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you remove this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RV shift.
} | ||
glog.Infof("Creating etcd client pointing to %v", cfg.Endpoints) | ||
|
||
kAPI := etcd.NewKeysAPI(etcdClient) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit, but I would assume kapi meant "kubernetes api"... maybe a clearer name?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
@timothysc - I think that this PR should fix the remaining issue in Go 1.5 - see #18701 for more details. Can we prioritize it to have this merged ASAP? |
on it. |
@timothysc - thanks a lot! |
@wojtek-t I think I'll need to ping you tomorrow on the cacher tomorrow, there is some subtlety that I'm missing that is causing an issue there. |
@timothysc - sure |
@timothysc - can you please rebase this PR - it will be much simpler for me to patch it and debug the cacher problem |
549ae83
to
5074bb1
Compare
@timothysc - cacher_test.go - line 205 (initialVersion--) should be removed This solves the problem (at least when I'm running it locally). |
unit tests passed, e2e flake @k8s-bot test this please |
infrastructure unit-test failure:
@k8s-bot unit test this please |
GCE e2e test build/test passed for commit c505a5d. |
The same again:
@k8s-bot test this please |
GCE e2e build/test failed for commit c505a5d. |
@k8s-bot e2e test this please |
GCE e2e test build/test passed for commit c505a5d. |
All tests are passing - merging manually, to unblock effort to update to Go 1.5 |
Update to use latest etcd client library
Awesome! |
I think this PR started causing several etcd unit tests to data race or timeout, as linked in the above issues. |
cfg := etcd.Config{ | ||
Endpoints: c.ServerList, | ||
// TODO: Determine if transport needs optimization | ||
Transport: &http.Transport{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not use util.SetTransportDefaults
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are overwriting some things (e.g. MaxIdleConnsPerHost) - it was crucial for performance reasons.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can still do that with SetTransportDefaults… only set MaxIdle… and the defaulting func will set all the other defaults
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The defaults are explicitly specified so others will know the values on inspection, vs. hunt and peck.
xref #18153 |
I am running into this issue: trying to run apiserver with etcd TLS. TLS worked fine with v1.1.2 I am trying to upgrade from. |
same problem with 1.2.1 |
in using TLS for the etcd client before I had to have something like
|
@streamnsight The fix is here #21535, but it changes the default initialization. I believe the release note denotes as well. |
@timothysc Could you please explain what I'm supposed to do or point me to the proper documentation. |
the updates needed for secured etcd were in the v1.2.0 release notes in the "action required" section:
|
@liggitt Thanks for pointing this out. |
FYI the problem I was having was having quotes around the file names in the etcd config. |
The only usage of this was removed via kubernetes#18635
This is the update for the new client library after all the storage refactoring. There is still an error I'm chasing down in the cache, but everything else appears green.
Final implementation for #11962
@wojtek-t & @jdef for review
/cc @liggitt