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
Make it easy to use the e2e tests to test upgrading a running master #2829
Conversation
remoteSaltTar := fmt.Sprintf("https://storage.googleapis.com/kubernetes-release/release/v%s/kubernetes-salt.tar.gz", version) | ||
localServerTar := path.Join(*root, downloadDirName, version, serverTarName) | ||
localSaltTar := path.Join(*root, downloadDirName, version, saltTarName) | ||
runBash("makeDownloadsDir", fmt.Sprintf("mkdir -p %s", path.Join(*root, downloadDirName, version))) |
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.
Please use os.MkdirAll
Also need to think about the kubecfg client & build of cmd/e2e/e2e.go that will be used. Will want to be able to specify that they come from the old version or new version... Maybe we have to make a simple config file with a table of desired test configuration. Might be too complex for reasonable command line flags. |
Please take another look, I've fixed things such that we can use the correct client tool version and we don't need to awkwardly move directories around anymore. It still uses the most recent version of cmd/e2e/e2e.go, but as far as I know that doesn't get packaged up with the releases. |
@@ -152,7 +175,45 @@ func IsUp() bool { | |||
} | |||
|
|||
func tryUp() bool { | |||
return runBash("up", path.Join(*root, "/cluster/kube-up.sh; test-setup;")) | |||
return runBash("up", path.Join(*clientToolsRoot, "/cluster/kube-up.sh; test-setup;")) |
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.
kube-up, kube-push, and kube-down should correspond to the cluster version, not the client version.
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.
Sorry, I may not have named the variable well. I've changed clientToolsRoot to be versionRoot to make it more clear.
Ping? |
versionRoot = newVersionRoot | ||
} | ||
} | ||
log.Fatal("stopping") |
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.
debugging statement?
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.
Hm, that's not in my local copy. I hope the next push will remove that.
Sorry to be such a pain about this! I like everything here except for the bash script that drives it. What do you think about putting that in a separate PR so that we can argue about if there's a way we could possibly put that functionality into the go code? I think if we commit this bash script, it will quickly grow very hairy and complicated-- I'd like that to at least happen in a real language. :) |
Thanks Daniel! I've responded to your comments, updated the code, removed upgrade-e2e-test.sh from this PR, and rebased it down to one commit. |
Seems like the rebase didn't take. Missing fetch? push? |
|
||
source "` + *root + `/cluster/kube-env.sh" | ||
source "` + *root + `/cluster/${KUBERNETES_PROVIDER}/util.sh" | ||
source "` + versionRoot + `/cluster/${KUBERNETES_PROVIDER}/util.sh" |
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.
kube-env & provider/util.sh should probably be sourced from the same directory.
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.
Discussed offline, leaving as is because user may have changed kube-env locally.
My rebase was totally borked. Should be good now. |
by adding support for testing official release versions and writing a simple script to first bring up and test the old version before upgrading it and testing it again. Related to supporting in-place upgrades of masters (kubernetes#2524).
I kicked travis. |
LGTM |
Make it easy to use the e2e tests to test upgrading a running master
by adding support for testing official release versions and writing a simple script to first bring up and test the old version before upgrading it and testing it again. Related to supporting in-place upgrades of masters (#2524).
The downsides of this are that by default it uses the e2e tests from HEAD, which may not be expected to pass on an old cluster, and that it uses the client binaries from head. I can send a follow-up to fix the client binaries issue, but don't have anything planned for supporting old e2e tests.
I'm not sure how our Jenkins setup is configured, but it'd be nice to get something along these lines added to it in the future.