Skip to content

Commit a131eb4

Browse files
Merge pull request #19615 from smarterclayton/flake
Ignore writes on router stress test from other routes
2 parents 865022c + b509b4c commit a131eb4

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

pkg/router/controller/status.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,11 +146,12 @@ func performIngressConditionUpdate(action string, lease writerlease.Lease, track
146146
// with different configurations from endlessly updating the route status.
147147
if !created && tracker.IsContended(key, now, latest) {
148148
glog.V(4).Infof("%s: skipped update due to another process altering the route with a different ingress status value: %s", action, key)
149-
return writerlease.None, false
149+
return writerlease.Release, false
150150
}
151151

152152
switch _, err := oc.Routes(route.Namespace).UpdateStatus(route); {
153153
case err == nil:
154+
glog.V(4).Infof("%s: updated status of %s/%s", action, route.Namespace, route.Name)
154155
tracker.Clear(key, latest)
155156
return writerlease.Extend, false
156157
case errors.IsForbidden(err):
@@ -160,6 +161,7 @@ func performIngressConditionUpdate(action string, lease writerlease.Lease, track
160161
return writerlease.Extend, false
161162
case errors.IsNotFound(err):
162163
// route was deleted
164+
glog.V(4).Infof("%s: route %s/%s was deleted before we could update status", action, route.Namespace, route.Name)
163165
return writerlease.Release, false
164166
case errors.IsConflict(err):
165167
// just follow the normal process, and retry when we receive the update notification due to

test/extended/router/stress.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,9 +281,14 @@ var _ = g.Describe("[Conformance][Area:Networking][Feature:Router]", func() {
281281
Wait:
282282
for i := 0; ; i++ {
283283
select {
284-
case _, ok := <-ch:
285-
writes++
284+
case obj, ok := <-ch:
286285
o.Expect(ok).To(o.BeTrue())
286+
if r, ok := obj.Object.(*routev1.Route); ok {
287+
if r == nil || r.Name != "9" {
288+
continue
289+
}
290+
}
291+
writes++
287292
case <-timer.C:
288293
break Wait
289294
}

0 commit comments

Comments
 (0)