Retry replication controller rolling updates on version mismatch.

When kubectl does rolling updates of replication controllers, retry updates that
fail due to version mismatches (caused by concurrent updates by other clients).
These failed rolling updates were causing intermittent e2e test failures
(e.g. issue 5821)
This commit is contained in:
Quinton Hoole
2015-03-25 14:51:58 -07:00
parent dca645d416
commit 40e2eae5b4
6 changed files with 126 additions and 44 deletions

View File

@@ -43,10 +43,10 @@ func TestReplicationControllerStop(t *testing.T) {
if s != expected {
t.Errorf("expected %s, got %s", expected, s)
}
if len(fake.Actions) != 5 {
if len(fake.Actions) != 4 {
t.Errorf("unexpected actions: %v, expected 4 actions (get, update, get, delete)", fake.Actions)
}
for i, action := range []string{"get", "get", "update", "get", "delete"} {
for i, action := range []string{"get", "update", "get", "delete"} {
if fake.Actions[i].Action != action+"-controller" {
t.Errorf("unexpected action: %v, expected %s-controller", fake.Actions[i], action)
}