Commit f1cf1f9c authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #46615 from gmarek/log-monitor

Automatic merge from submit-queue (batch tested with PRs 45488, 45335, 45909, 46074, 46615) Make log-monitor give up on trying to ssh to a dead node after some time Fix #38263
parents 4979ae4b 0cc1999e
......@@ -249,9 +249,13 @@ func (g *LogSizeGatherer) Work() bool {
)
if err != nil {
Logf("Error while trying to SSH to %v, skipping probe. Error: %v", workItem.ip, err)
if workItem.backoffMultiplier < 128 {
workItem.backoffMultiplier *= 2
// In case of repeated error give up.
if workItem.backoffMultiplier >= 128 {
Logf("Failed to ssh to a node %v multiple times in a row. Giving up.", workItem.ip)
g.wg.Done()
return false
}
workItem.backoffMultiplier *= 2
go g.pushWorkItem(workItem)
return true
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment