mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 21:47:07 +00:00
Merge pull request #124430 from AllenXu93/fix-kubelet-restart-notReady
fix node notReady in first sync period after kubelet restart
This commit is contained in:
commit
57d197fb89
@ -1660,7 +1660,13 @@ func (kl *Kubelet) Run(updates <-chan kubetypes.PodUpdate) {
|
|||||||
// Introduce some small jittering to ensure that over time the requests won't start
|
// Introduce some small jittering to ensure that over time the requests won't start
|
||||||
// accumulating at approximately the same time from the set of nodes due to priority and
|
// accumulating at approximately the same time from the set of nodes due to priority and
|
||||||
// fairness effect.
|
// fairness effect.
|
||||||
go wait.JitterUntil(kl.syncNodeStatus, kl.nodeStatusUpdateFrequency, 0.04, true, wait.NeverStop)
|
go func() {
|
||||||
|
// Call updateRuntimeUp once before syncNodeStatus to make sure kubelet had already checked runtime state
|
||||||
|
// otherwise when restart kubelet, syncNodeStatus will report node notReady in first report period
|
||||||
|
kl.updateRuntimeUp()
|
||||||
|
wait.JitterUntil(kl.syncNodeStatus, kl.nodeStatusUpdateFrequency, 0.04, true, wait.NeverStop)
|
||||||
|
}()
|
||||||
|
|
||||||
go kl.fastStatusUpdateOnce()
|
go kl.fastStatusUpdateOnce()
|
||||||
|
|
||||||
// start syncing lease
|
// start syncing lease
|
||||||
|
Loading…
Reference in New Issue
Block a user