Commit 37418afe authored by Alex Mohr's avatar Alex Mohr

Fix kubectl updateWithRetries to have 1 minute timeout instead of 500 ms

Fixes #12258
parent 9610b8fe
...@@ -312,10 +312,9 @@ type updateFunc func(controller *api.ReplicationController) ...@@ -312,10 +312,9 @@ type updateFunc func(controller *api.ReplicationController)
// updateWithRetries updates applies the given rc as an update. // updateWithRetries updates applies the given rc as an update.
func updateWithRetries(rcClient client.ReplicationControllerInterface, rc *api.ReplicationController, applyUpdate updateFunc) (*api.ReplicationController, error) { func updateWithRetries(rcClient client.ReplicationControllerInterface, rc *api.ReplicationController, applyUpdate updateFunc) (*api.ReplicationController, error) {
// Each update could take ~100ms, so give it 0.5 second
var err error var err error
oldRc := rc oldRc := rc
err = wait.Poll(10*time.Millisecond, 500*time.Millisecond, func() (bool, error) { err = wait.Poll(10*time.Millisecond, 1*time.Minute, func() (bool, error) {
// Apply the update, then attempt to push it to the apiserver. // Apply the update, then attempt to push it to the apiserver.
applyUpdate(rc) applyUpdate(rc)
if rc, err = rcClient.Update(rc); err == nil { if rc, err = rcClient.Update(rc); err == nil {
......
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