controller: work around milliseconds skew in AddAfter

This commit is contained in:
Michail Kargakis
2017-03-18 23:44:43 -04:00
parent 948e3754f8
commit 68b78282d7
4 changed files with 12 additions and 4 deletions

View File

@@ -233,6 +233,8 @@ func (dc *DeploymentController) requeueStuckDeployment(d *extensions.Deployment,
return time.Duration(0)
}
glog.V(4).Infof("Queueing up deployment %q for a progress check after %ds", d.Name, int(after.Seconds()))
dc.enqueueAfter(d, after)
// Add a second to avoid milliseconds skew in AddAfter.
// See https://github.com/kubernetes/kubernetes/issues/39785#issuecomment-279959133 for more info.
dc.enqueueAfter(d, after+time.Second)
return after
}