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

eliminate wait with no nodes #5257

Merged

Conversation

deads2k
Copy link
Contributor

@deads2k deads2k commented Mar 10, 2015

If you start a node controller without any static nodes and the cloud provider doesn't give you any right away, the node controller hangs in a retry loop.

@googlebot
Copy link

Thanks for your pull request.

It looks like this may be your first contribution to a Google open source project, in which case you'll need to sign a Contributor License Agreement (CLA) at https://cla.developers.google.com/.

If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check the information on your CLA or see this help article on setting the email on your git commits.

Once you've done that, please reply here to let us know. If you signed the CLA as a corporation, please let us know the company's name.

@ddysher
Copy link
Contributor

ddysher commented Mar 13, 2015

I don't understand why it hangs: if item is 0, then RegisterNodes is basically no-op. The pr lgtm, we don't have to wait.

@deads2k
Copy link
Contributor Author

deads2k commented Mar 13, 2015

I don't understand why it hangs: if item is 0, then RegisterNodes is basically no-op. The pr lgtm, we don't have to wait.

I made the change because it was stopping master start for two minutes. Without the short circuit for len(node.Items) == 0, it entered the outer for loop that would sleep until the retryCount was exceeded. In effect, having no nodes defined would cause a wait of about two minutes before the NodeController.Run would return. It caused long delays in master startup

@ddysher
Copy link
Contributor

ddysher commented Mar 13, 2015

ok, I see. I was thinking by "hangs", you mean k8s stop operating. I've tried my best to not delay cluster startup, but didn't recognize this case, good catch.

ddysher added a commit that referenced this pull request Mar 13, 2015
@ddysher ddysher merged commit 97e1295 into kubernetes:master Mar 13, 2015
@deads2k deads2k deleted the deads-eliminate-wait-for-no-nodes branch March 16, 2015 17:48
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.

4 participants