From 47b699f70683916662103e61c8fc8d9180f5b2dc Mon Sep 17 00:00:00 2001 From: Jan Safranek Date: Tue, 5 May 2026 13:45:06 +0200 Subject: [PATCH 1/2] Tolerate events during the vSphere CSI driver removal test Test "vSphere CSI Driver Operator Removal" un-installs the CSI driver + installs it back. I.e. a DaemonSet and two Deployment with many events like "Created pod: vmware-vsphere-csi-driver-node-tkl25" --- .../duplicated_event_patterns.go | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/pkg/monitortestlibrary/pathologicaleventlibrary/duplicated_event_patterns.go b/pkg/monitortestlibrary/pathologicaleventlibrary/duplicated_event_patterns.go index 6582828912f7..2999b68f18fd 100644 --- a/pkg/monitortestlibrary/pathologicaleventlibrary/duplicated_event_patterns.go +++ b/pkg/monitortestlibrary/pathologicaleventlibrary/duplicated_event_patterns.go @@ -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) From d1d713705c4d1314e18292fa78e1ccd734e6a2e3 Mon Sep 17 00:00:00 2001 From: Jan Safranek Date: Wed, 6 May 2026 18:21:46 +0200 Subject: [PATCH 2/2] Add exception for Available: false during vSphere CSI driver removal test The test "vSphere CSI Driver Operator Removal should successfully remove and restore storage resources" removes the vSphere CSI driver and re-installs it back. During that test the Storage may become temporarily Available: false. When adding it back, the desired cluster configuration is that is that the driver should be available, but it takes a while to reach that state. --- .../legacycvomonitortests/operators.go | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/pkg/monitortests/clusterversionoperator/legacycvomonitortests/operators.go b/pkg/monitortests/clusterversionoperator/legacycvomonitortests/operators.go index 54a5bb2ae696..c3db26a46721 100644 --- a/pkg/monitortests/clusterversionoperator/legacycvomonitortests/operators.go +++ b/pkg/monitortests/clusterversionoperator/legacycvomonitortests/operators.go @@ -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 { @@ -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) @@ -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"