Skip to content

Commit

Permalink
Merge pull request openshift#29311 from RomanBednar/OCPBUGS-42610
Browse files Browse the repository at this point in the history
OCPBUGS-42610: filter out pod events during vsphere snapshot options
  • Loading branch information
openshift-merge-bot[bot] authored Dec 9, 2024
2 parents 34565b0 + 407f4c4 commit 8737ae6
Showing 1 changed file with 29 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -445,19 +445,6 @@ func NewUniversalPathologicalEventMatchers(kubeConfig *rest.Config, finalInterva
neverAllow: true,
})

// Repeating events about pod creation are expected for snapshot options tests in vsphere csi driver.
// The tests change clusterCSIDriver object and have to rollout new pods to load new configuration.
registry.AddPathologicalEventMatcherOrDie(&SimplePathologicalEventMatcher{
name: "VsphereConfigurationTestsRollOutTooOften",
locatorKeyRegexes: map[monitorapi.LocatorKey]*regexp.Regexp{
monitorapi.LocatorNamespaceKey: regexp.MustCompile(`^openshift-cluster-csi-drivers$`),
monitorapi.LocatorE2ETestKey: regexp.MustCompile(`.*snapshot options in clusterCSIDriver.*`),
},
messageReasonRegex: regexp.MustCompile(`(^SuccessfulCreate$|^SuccessfulDelete$)`),
messageHumanRegex: regexp.MustCompile(`(^Created pod.*vmware-vsphere-csi-driver.*|^Deleted pod.*vmware-vsphere-csi-driver.*)`),
jira: "https://issues.redhat.com/browse/OCPBUGS-42610",
})

registry.AddPathologicalEventMatcherOrDie(AllowBackOffRestartingFailedContainer)

registry.AddPathologicalEventMatcherOrDie(AllowOVNReadiness)
Expand Down Expand Up @@ -497,6 +484,9 @@ func NewUniversalPathologicalEventMatchers(kubeConfig *rest.Config, finalInterva
registry.AddPathologicalEventMatcherOrDie(singleNodeConnectionRefusedMatcher)
registry.AddPathologicalEventMatcherOrDie(singleNodeKubeAPIServerProgressingMatcher)

vsphereConfigurationTestsRollOutTooOftenMatcher := newVsphereConfigurationTestsRollOutTooOftenEventMatcher(finalIntervals)
registry.AddPathologicalEventMatcherOrDie(vsphereConfigurationTestsRollOutTooOftenMatcher)

return registry
}

Expand Down Expand Up @@ -948,6 +938,32 @@ func newTopologyAwareHintsDisabledDuringTaintTestsPathologicalEventMatcher(final
return matcher
}

// Repeating events about pod creation are expected for snapshot options tests in vsphere csi driver.
// The tests change clusterCSIDriver object and have to rollout new pods to load new configuration.
func newVsphereConfigurationTestsRollOutTooOftenEventMatcher(finalIntervals monitorapi.Intervals) EventMatcher {
configurationTestIntervals := finalIntervals.Filter(func(eventInterval monitorapi.Interval) bool {
return eventInterval.Source == monitorapi.SourceE2ETest &&
strings.Contains(eventInterval.Locator.Keys[monitorapi.LocatorE2ETestKey], "snapshot options in clusterCSIDriver")
})
for i := range configurationTestIntervals {
configurationTestIntervals[i].To = configurationTestIntervals[i].To.Add(time.Minute * 10)
configurationTestIntervals[i].From = configurationTestIntervals[i].From.Add(time.Minute * -10)
}

return &OverlapOtherIntervalsPathologicalEventMatcher{
delegate: &SimplePathologicalEventMatcher{
name: "VsphereConfigurationTestsRollOutTooOften",
locatorKeyRegexes: map[monitorapi.LocatorKey]*regexp.Regexp{
monitorapi.LocatorNamespaceKey: regexp.MustCompile(`^openshift-cluster-csi-drivers$`),
},
messageReasonRegex: regexp.MustCompile(`(^SuccessfulCreate$|^SuccessfulDelete$)`),
messageHumanRegex: regexp.MustCompile(`(Created pod.*vmware-vsphere-csi-driver.*|Deleted pod.*vmware-vsphere-csi-driver.*)`),
jira: "https://issues.redhat.com/browse/OCPBUGS-42610",
},
allowIfWithinIntervals: configurationTestIntervals,
}
}

// Ignore connection refused events during OCP APIServer or OAuth APIServer being down
func newSingleNodeConnectionRefusedEventMatcher(finalIntervals monitorapi.Intervals) EventMatcher {
const (
Expand Down

0 comments on commit 8737ae6

Please sign in to comment.