-
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
Track the sources that the kubelet has seen #2994
Conversation
Can you add a one-sentence explanation of how this addresses #1954 for people who don't want to read the whole PR? (Including what a "source" means in this context.) Thanks! |
Sure: The kubelet receives configuration information from a variety of sources:
There are three types of updates:
These are all mixed together into a single update stream. The kubelet itself does the following loop: for {
select {
// normal watch/update case
case update := <- updates:
handleUpdate(update)
// periodic resync, in case updates are missed
case <- time.Timeout(syncTimeout)
handleResync()
} The trouble occurs when the resync timeout occurs before complete information from all sources have been obtained. The set of active pods on the kubelet is incomplete, and the resync uses this incomplete information, and thus kills pods that are correctly scheduled on the host, but the kubelet is not currently aware of. This PR fixes this, by refusing to delete pods until all sources have sent at least one Hope that helps! |
d531eb6
to
b8df6a1
Compare
when every source has been seen at least once.
Ok, unit test added. Empirically verified also. Thanks! |
config is just one of sources through which kubelet receives information. We shouldn't have this SeenAllSources() implemented in config.go to decided if all sources are received for kubelet. This is part of kubelet control loop, why not implement it in Kubelet itself? I understand that you want to have the dependency injection here, but we still can have that at kubelet.go since it already have the factory-like methods for prod and test anyway. |
Actually, the trouble is that the config object abstracts across all of the Also, the config object is actually the only source of bound pod We could break the config abstraction and pull the sources all the way up --brendan On Wed, Dec 17, 2014 at 3:25 PM, Dawn Chen notifications@github.com wrote:
|
ACK and LGTM. |
Track the sources that the kubelet has seen
And only delete pods when every source has been seen at least once.
Addresses #1954
Needs more unit test coverage, but here for an initial review of the design.