Skip to content

Commit

Permalink
fix: pathological event exception logic cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
jeff-roche committed Dec 5, 2024
1 parent 291d45a commit 3528906
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -797,13 +797,13 @@ func IsExcludedContainerBackoffRestart(topology string, event monitorapi.Interva
exceptions := []exceptionVariants{
{
// https://issues.redhat.com/browse/OCPBUGS-45071
containerName: "container/manager", //
containerName: "container/manager",
topologyToExclude: "single",
namespaceToExclude: "openshift-operator-controller",
},
{
// https://issues.redhat.com/browse/OCPBUGS-45071
containerName: "container/manager", //
containerName: "container/manager",
topologyToExclude: "single",
namespaceToExclude: "openshift-catalogd",
},
Expand All @@ -821,14 +821,17 @@ func IsExcludedContainerBackoffRestart(topology string, event monitorapi.Interva

// If both are specified, both must match
if val.topologyToExclude != "" && val.namespaceToExclude != "" {
return topologyExcluded && namespaceExcluded
if topologyExcluded && namespaceExcluded {
return true
} else {
continue
}
}

return topologyExcluded || namespaceExcluded
}
}
return false

}

func getInstallCompletionTime(kubeClientConfig *rest.Config) *metav1.Time {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func testBackoffStartingFailedContainer(clusterData platformidentification.Clust

// Filter out any known pathological events
events = events.Filter(
monitorapi.Or(
monitorapi.And(
monitorapi.Not(pathologicaleventlibrary.IsDuringAPIServerProgressingOnSNO(clusterData.Topology, events)),
monitorapi.Not(func(interval monitorapi.Interval) bool {
return pathologicaleventlibrary.IsExcludedContainerBackoffRestart(clusterData.Topology, interval)
Expand Down

0 comments on commit 3528906

Please sign in to comment.