-
Notifications
You must be signed in to change notification settings - Fork 40.1k
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
Use a random port for the test etcd server #15586
Conversation
GCE e2e test build/test passed for commit d9838d7f93978dd428625ed8c383354eb800a601. |
Labelling this PR as size/L |
@@ -955,6 +959,7 @@ type testFunc func(*client.Client) | |||
func addFlags(fs *pflag.FlagSet) { | |||
fs.IntVar( | |||
&maxConcurrency, "max-concurrency", -1, "Maximum number of tests to be run simultaneously. Unlimited if set to negative.") | |||
fs.StringVar(&etcdServer, "etcd-server", "", "etcd server URL.") |
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.
this also needs port, right? (maybe ... URL in http://host:port format)?
Also, how about being consistent with other places and use "etcd-servers" instead to handle multiple etcd servers too:
https://github.com/kubernetes/kubernetes/blob/master/cmd/kube-apiserver/app/server.go#L214
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.
Or make it consistent with the other integration tests... weird to use a flag in one place and env vars in the other.
Just one minor comment - other than that LGTM. |
kube::log::info "etcd -data-dir ${ETCD_DIR} --bind-addr ${host}:${port} >/dev/null 2>/dev/null" | ||
etcd -data-dir ${ETCD_DIR} --bind-addr ${host}:${port} >/dev/null 2>/dev/null & | ||
kube::log::info "Starting etcd with data-dir ${ETCD_DIR} and bind-addr ${ETCD_HOST}:${ETCD_PORT}" | ||
etcd -data-dir ${ETCD_DIR} --bind-addr ${ETCD_HOST}:${ETCD_PORT} >/dev/null 2>/dev/null & |
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.
If it fails, retry with different port?
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.
I think you need to change the negotiation port, too? (the 7001 port)
cc @timothysc |
@ixdy this affects the integration tests but do we run the UTs concurrently at all? I'm currently working on a PR which will standup and teardown etcd on a well known port for the UTs. If they are run concurrently upstream then that could be an issue. |
Yes, we run unit tests concurrently (but before the integration tests). The tests in test/integration are also possibly run concurrently with each On Wed, Oct 14, 2015 at 9:53 AM, Timothy St. Clair <notifications@github.com
|
GCE e2e test build/test passed for commit 190e89b1601bf0173ee129caabe6f8539e56fea8. |
GCE e2e test build/test passed for commit d80665e9f3ca939ca964271f4813f754f81b02e0. |
The local etcd is started in a number of tests:
My main focus here was on While the etcd stuff seems to work now in parallel, I've noticed that the integration test (in particular |
Also refactor etcd client utils in integration test to reduce code duplication.
GCE e2e build/test failed for commit 785c0cd. |
imho #15392 should solve this issue, and randomizes the port properly to the clients to run in parallel. The issue will be updating the integration tests to leverage. |
@timothysc will that also work for |
Closing since #16287 makes this unnecessary. |
This allows us to run multiple instances of the verification checks, the integration test, etc. simultaneously on a single host (e.g. the PR Jenkins).
ref #14781
@kubernetes/goog-testing