Commit Graph

5 Commits (3c0c5ed4e019f2c1aef520a7d1f78763368bede7)

Author SHA1 Message Date
Random-Liu 4cca5b2290 Use fake clock in TestGetPodsToSync to fix flake. 2016-05-02 16:05:36 -07:00
laushinka 7ef585be22 Spelling fixes inspired by github.com/client9/misspell 2016-02-18 06:58:05 +07:00
Daniel Smith 4a7d70aef1 extend fake clock 2016-02-01 15:36:15 -08:00
Yu-Ju Hong 4ab505606b Always overwrite items in kubelet's work queue
This allows kubelet to change the next sync time based on the last result.
2016-01-12 16:25:19 -08:00
Yu-Ju Hong 2eb17df46b kubelet: independent pod syncs and backoff on error
Currently kubelet syncs all pods every 10s. This is not preferred because
 * Some pods may have been sync'd recently.
 * This may cause all the pods to be sync'd at once, causing undesirable
   CPU spikes.

This PR replaces the global syncs with independent, periodic pod syncs. At the
end of syncing, each pod worker will enqueue itslef with a future timestamp (
current time + sync interval), when it will be due for another sync.
 * If the pod worker encoutners an sync error, it may requeue with a different
   timestamp to retry sooner.
 * If a sync is triggered by the update channel (events or spec changes), the
   pod worker would enqueue a new sync time.

This change is necessary for moving to long or no periodic sync period once pod
lifecycle event generator is completed. We will still rely on the mechanism to
requeue the pod on sync error.

This change also makes sure that if a sync does not succeed (either due to
real error or the per-container backoff mechanism), an error would be propagated
back to the pod worker, which is responsible for requeuing.
2015-11-03 13:29:08 -08:00