Skip to content

Commit ec0d7f4

Browse files
committed
OCPBUGS-63307: Add ConfigDriftMonitorStoppedTooOften matcher
Add ConfigDriftMonitorStoppedTooOften matcher for image signature validation tests. Fix the run failure ``` 8 events happened too frequently event happened 24 times, something is wrong: node/ci-op-7b9qs4mj-863c8-hkhwh-worker-a-bm2wt hmsg/8a96eaa4fd - reason/ConfigDriftMonitorStopped Config Drift Monitor stopped (19:47:32Z) result=reject ``` Signed-off-by: Qi Wang <qiwan@redhat.com>
1 parent 3885a6b commit ec0d7f4

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

pkg/monitortestlibrary/pathologicaleventlibrary/duplicated_event_patterns.go

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -502,6 +502,9 @@ func NewUniversalPathologicalEventMatchers(kubeConfig *rest.Config, finalInterva
502502
twoNodeEtcdEndpointsMatcher := newTwoNodeEtcdEndpointsConfigMissingEventMatcher(finalIntervals)
503503
registry.AddPathologicalEventMatcherOrDie(twoNodeEtcdEndpointsMatcher)
504504

505+
newConfigDriftMonitorStoppedTooOftenEventMatcher := newConfigDriftMonitorStoppedTooOftenEventMatcher(finalIntervals)
506+
registry.AddPathologicalEventMatcherOrDie(newConfigDriftMonitorStoppedTooOftenEventMatcher)
507+
505508
return registry
506509
}
507510

@@ -1207,3 +1210,23 @@ func newCrioReloadedTooOftenEventMatcher(finalInternals monitorapi.Intervals) Ev
12071210
allowIfWithinIntervals: crioReloadedIntervals,
12081211
}
12091212
}
1213+
1214+
func newConfigDriftMonitorStoppedTooOftenEventMatcher(finalIntervals monitorapi.Intervals) EventMatcher {
1215+
configDriftMonitorStoppedIntervals := finalIntervals.Filter(func(eventInterval monitorapi.Interval) bool {
1216+
return eventInterval.Source == monitorapi.SourceE2ETest &&
1217+
strings.Contains(eventInterval.Locator.Keys[monitorapi.LocatorE2ETestKey], "SigstoreImageVerification")
1218+
})
1219+
for i := range configDriftMonitorStoppedIntervals {
1220+
configDriftMonitorStoppedIntervals[i].To = configDriftMonitorStoppedIntervals[i].To.Add(time.Second * -30)
1221+
configDriftMonitorStoppedIntervals[i].From = configDriftMonitorStoppedIntervals[i].From.Add(time.Second * -30)
1222+
}
1223+
1224+
return &OverlapOtherIntervalsPathologicalEventMatcher{
1225+
delegate: &SimplePathologicalEventMatcher{
1226+
name: "ConfigDriftMonitorStoppedTooOften",
1227+
messageReasonRegex: regexp.MustCompile(`^ConfigDriftMonitorStopped$`),
1228+
jira: "https://issues.redhat.com/browse/OCPBUGS-58376",
1229+
},
1230+
allowIfWithinIntervals: configDriftMonitorStoppedIntervals,
1231+
}
1232+
}

0 commit comments

Comments
 (0)