-
Notifications
You must be signed in to change notification settings - Fork 38.6k
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
continuously delete pods on nodes that don't exist #22667
Merged
k8s-github-robot
merged 1 commit into
kubernetes:master
from
mikedanese:node-control-pods
Mar 8, 2016
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 will get here if GetByKey returns an error. Also, is it possible for the cache to be stale?
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.
GetByKey, can't return errors stupidly. That should be cleaned up:
https://github.com/kubernetes/kubernetes/blob/master/pkg/client/cache/store.go#L192
I'll do this in a follow up.
These cashes can be stale. There's a race here if a (node get's created -> scheduler get's update of node -> new pod gets assigned to a node -> controller get's update of pod) before (node get's created -> controller get's update of node). It seems less likely and of smaller consequence then the bug this fixes. Any suggestion on how to work around 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.
Also the node has to become ready in the scheduler flow and doesn't have to become ready in the controller manager flow which also makes the race less likely. Still a race though.
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.
My intuition is that this race is pretty minor and less significant than the bug it fixes, but our intuition is often wrong about this stuff, and on an antagonistically loaded machine, you could imagine being in some kind of steady state forever where the controllers fight each other.
But there's a non-controller behavior that's also new. If I manually specify a host in my single pod (no controller), but make a typo, my pod disappears and never runs. That'll seem weird. It's also possible for the user to submit the pod in the same race window (hard to imagine this really happening) and the same thing happens.
Suggestions for fixing the race... I'll think about it. Concurrency + global state + caching lends itself to this.