Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1091,8 +1091,23 @@ func newTopologyAwareHintsDisabledDuringTaintTestsPathologicalEventMatcher(final
// 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")
if eventInterval.Source != monitorapi.SourceE2ETest {
return false
}
testNames := []string{
// Snapshot configuration changes result in the DaemonSet + Deployment update + rollout,
// which generates a lot of "Create / Update / Delete" events.
"snapshot options in clusterCSIDriver",
// vSphere CSI driver removal test results in the DaemonSet + Deployment removal + re-creation,
// with a subsequent rollout.
"vSphere CSI Driver Operator Removal",
}
for _, testName := range testNames {
if strings.Contains(eventInterval.Locator.Keys[monitorapi.LocatorE2ETestKey], testName) {
return true
}
}
return false
})
for i := range configurationTestIntervals {
configurationTestIntervals[i].To = configurationTestIntervals[i].To.Add(time.Minute * 10)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,19 @@ type upgradeWindowHolder struct {
endInterval *monitorapi.Interval
}

// intervalOverlapsE2ETest reports whether eventInterval overlaps with an e2e test whose name contains given substring.
func intervalOverlapsE2ETest(e2eIntervals monitorapi.Intervals, eventInterval monitorapi.Interval, testNameSubstring string) bool {
for _, overlap := range utility.FindOverlap(e2eIntervals, eventInterval) {
if overlap.Level == monitorapi.Info {
continue
}
if name, ok := monitorapi.E2ETestFromLocator(overlap.Locator); ok && strings.Contains(name, testNameSubstring) {
return true
}
}
return false
}

func checkAuthenticationAvailableExceptions(condition *configv1.ClusterOperatorStatusCondition) bool {
if condition.Type == configv1.OperatorAvailable && condition.Status == configv1.ConditionFalse {
switch condition.Reason {
Expand All @@ -53,7 +66,8 @@ func testStableSystemOperatorStateTransitions(events monitorapi.Intervals, clien
}
isSingleNode := topology == configv1.SingleReplicaTopologyMode

except := func(operator string, condition *configv1.ClusterOperatorStatusCondition, _ monitorapi.Interval, clientConfig *rest.Config) string {
e2eEventIntervals := operatorstateanalyzer.E2ETestEventIntervals(events)
except := func(operator string, condition *configv1.ClusterOperatorStatusCondition, eventInterval monitorapi.Interval, clientConfig *rest.Config) string {
if condition.Status == configv1.ConditionTrue {
if condition.Type == configv1.OperatorAvailable {
return fmt.Sprintf("%s=%s is the happy case", condition.Type, condition.Status)
Expand Down Expand Up @@ -90,6 +104,12 @@ func testStableSystemOperatorStateTransitions(events monitorapi.Intervals, clien

// For the non-upgrade case, if any operator has Available=False, fail the test.
if condition.Type == configv1.OperatorAvailable && condition.Status == configv1.ConditionFalse {
if operator == "storage" &&
intervalOverlapsE2ETest(e2eEventIntervals, eventInterval, "vSphere CSI Driver Operator Removal") {
// This tests removes the vSphere CSI driver operator and adds it back. As result, the storage operator may report Available=False for a short period of time.
// [sig-storage][platform:vsphere] vSphere CSI Driver Operator Removal should successfully remove and restore storage resources [Suite:openshift/conformance/serial]
return "storage operator may report Available=False while \"vSphere CSI Driver Operator Removal\" e2e test runs"
}
if operator == "authentication" {
if checkAuthenticationAvailableExceptions(condition) {
return "https://issues.redhat.com/browse/OCPBUGS-20056"
Expand Down