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

Remove host ports from the update demo and update tests (take 2). #4963

Merged
merged 1 commit into from
Mar 2, 2015

Conversation

roberthbailey
Copy link
Contributor

This is to address #4537.

The previous attempt didn't work because what was being spawned in the BeforeEach function wasn't kubectl (the go binary) but instead kubectl.sh (the shell wrapper). Killing the shell wrapper in the AfterEach function left kubectl running as an orphan process (since we aren't using a process group or running from inside a shell that helps clean up orphans).

Tested on GCE and GKE (10 consecutive runs each). On the first set of runs on GKE, one of the runs failed with 501: All the given peers are not reachable (Tried to connect to each peer twice and failed) and on the second set all 10 passed.

cmd := exec.Command("kubectl", kubectlArgs...)
Logf("Running '%s %s'", cmd.Path, strings.Join(cmd.Args, " "))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move the log line into runKubectl, since this only creates the command.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then I'll need to duplicate it in BeforeEach as well (since that also runs kubectl). I put it here to try and avoid the code duplication.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough. It's also just a Logf, so I don't have strong feelings.

@j3ffml
Copy link
Contributor

j3ffml commented Mar 2, 2015

LGTM, other than nit.

@j3ffml
Copy link
Contributor

j3ffml commented Mar 2, 2015

Shippable is a flake. Merging.

j3ffml added a commit that referenced this pull request Mar 2, 2015
Remove host ports from the update demo and update tests (take 2).
@j3ffml j3ffml merged commit 66dfbe9 into kubernetes:master Mar 2, 2015
@roberthbailey roberthbailey deleted the kubectl-proxy branch March 5, 2015 01:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants