diff --git a/pkg/monitortests/clusterversionoperator/legacycvomonitortests/operators.go b/pkg/monitortests/clusterversionoperator/legacycvomonitortests/operators.go index 36ed81a91453..3af608055c79 100644 --- a/pkg/monitortests/clusterversionoperator/legacycvomonitortests/operators.go +++ b/pkg/monitortests/clusterversionoperator/legacycvomonitortests/operators.go @@ -132,10 +132,14 @@ func getControlPlaneTopology(clientConfig *rest.Config) (configv1.TopologyMode, // isTNFJobClusterOperatorReason matches ClusterOperator condition Reason values emitted while // two-node fencing (TNF) batch Jobs run in openshift-etcd. The cluster-etcd-operator maps -// active Job state into etcd's ClusterOperator with reasons shaped like -// tnf-_JobRunning (including a per-job hash suffix on some Jobs, e.g. tnf-auth-job-master-0-64736551_JobRunning). +// active Job state into etcd's ClusterOperator with reasons shaped like: +// - legacy kebab-case: tnf-_JobRunning (e.g. tnf-auth-job-master-0-64736551_JobRunning) +// - PascalCase (OCPBUGS-84695+): TNFJob_JobRunning (e.g. TNFSetupJob_JobRunning) func isTNFJobClusterOperatorReason(reason string) bool { - return strings.HasPrefix(reason, "tnf-") && strings.HasSuffix(reason, "_JobRunning") + if !strings.HasSuffix(reason, "_JobRunning") { + return false + } + return strings.HasPrefix(reason, "tnf-") || strings.HasPrefix(reason, "TNF") } // isInUpgradeWindow determines if the given eventInterval falls within an upgrade window. diff --git a/pkg/monitortests/clusterversionoperator/legacycvomonitortests/operators_test.go b/pkg/monitortests/clusterversionoperator/legacycvomonitortests/operators_test.go index 9087dd1e645a..ecdb11142232 100644 --- a/pkg/monitortests/clusterversionoperator/legacycvomonitortests/operators_test.go +++ b/pkg/monitortests/clusterversionoperator/legacycvomonitortests/operators_test.go @@ -472,9 +472,15 @@ func TestIsTNFJobClusterOperatorReason(t *testing.T) { {"tnf-auth-job-master-0-64736551_JobRunning", true}, {"tnf-update-setup-job-master-1-abc12345_JobRunning", true}, {"tnf-after-setup-job-master-0-deadbeef_JobRunning", true}, + {"TNFSetupJob_JobRunning", true}, + {"TNFFencingJob_JobRunning", true}, + {"TNFAuthJobMaster064736551_JobRunning", true}, + {"TNFUpdateSetupJob_JobRunning", true}, + {"TNFAfterSetupJobMaster0deadbeef_JobRunning", true}, {"EtcdMembersProgressing", false}, {"NodeInstaller_InstallerPodRunning", false}, {"tnf-setup-job_JobComplete", false}, + {"TNFSetupJob_JobComplete", false}, {"setup-job_JobRunning", false}, {"", false}, }