Merge pull request #81663 from jfbai/update-existing-node-lease-with-retry

Update existing node lease with retry.
This commit is contained in:
Kubernetes Prow Robot 2019-08-22 22:03:30 -07:00 committed by GitHub
commit 10bd85a127
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -98,12 +98,10 @@ func (c *controller) sync() {
// If at some point other agents will also be frequently updating the Lease object, this
// can result in performance degradation, because we will end up with calling additional
// GET/PUT - at this point this whole "if" should be removed.
lease, err := c.leaseClient.Update(c.newLease(c.latestLease))
err := c.retryUpdateLease(c.newLease(c.latestLease))
if err == nil {
c.latestLease = lease
return
}
klog.Infof("failed to update lease using latest lease, fallback to ensure lease, err: %v", err)
}