Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OCPBUGS-45071: fix: adding an exclude list for pathological events occurring on SNO #29347

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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 @@ -479,10 +479,7 @@ func NewUniversalPathologicalEventMatchers(kubeConfig *rest.Config, finalInterva
topologyAwareMatcher := newTopologyAwareHintsDisabledDuringTaintTestsPathologicalEventMatcher(finalIntervals)
registry.AddPathologicalEventMatcherOrDie(topologyAwareMatcher)

singleNodeConnectionRefusedMatcher := newSingleNodeConnectionRefusedEventMatcher(finalIntervals)
singleNodeKubeAPIServerProgressingMatcher := newSingleNodeKubeAPIProgressingEventMatcher(finalIntervals)
registry.AddPathologicalEventMatcherOrDie(singleNodeConnectionRefusedMatcher)
registry.AddPathologicalEventMatcherOrDie(singleNodeKubeAPIServerProgressingMatcher)
addAllowedSingleNodeMatchers(registry, finalIntervals)

vsphereConfigurationTestsRollOutTooOftenMatcher := newVsphereConfigurationTestsRollOutTooOftenEventMatcher(finalIntervals)
registry.AddPathologicalEventMatcherOrDie(vsphereConfigurationTestsRollOutTooOftenMatcher)
Expand Down Expand Up @@ -774,6 +771,42 @@ func IsDuringAPIServerProgressingOnSNO(topology string, events monitorapi.Interv
}
}

func addAllowedSingleNodeMatchers(registry *AllowedPathologicalEventRegistry, finalIntervals monitorapi.Intervals) {
snoTopology := v1.SingleReplicaTopologyMode

// This is a list of known and allowed single node events
allowedEvents := []EventMatcher{
&SimplePathologicalEventMatcher{
name: "AllowSingleNodeOperatorControllerBackOffRestartingFailedContainer",
messageReasonRegex: AllowBackOffRestartingFailedContainer.messageReasonRegex,
messageHumanRegex: AllowBackOffRestartingFailedContainer.messageHumanRegex,
topology: &snoTopology,
locatorKeyRegexes: map[monitorapi.LocatorKey]*regexp.Regexp{
monitorapi.LocatorNamespaceKey: regexp.MustCompile("openshift-operator-controller"),
monitorapi.LocatorPodKey: regexp.MustCompile("operator-controller-controller-manager"),
},
jira: "https://issues.redhat.com/browse/OCPBUGS-45071",
},
&SimplePathologicalEventMatcher{
name: "AllowSingleNodeCatalogdControllerBackOffRestartingFailedContainer",
messageReasonRegex: AllowBackOffRestartingFailedContainer.messageReasonRegex,
messageHumanRegex: AllowBackOffRestartingFailedContainer.messageHumanRegex,
topology: &snoTopology,
locatorKeyRegexes: map[monitorapi.LocatorKey]*regexp.Regexp{
monitorapi.LocatorNamespaceKey: regexp.MustCompile("openshift-catalogd"),
monitorapi.LocatorPodKey: regexp.MustCompile("catalogd-controller-manager"),
},
jira: "https://issues.redhat.com/browse/OCPBUGS-45071",
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you may have over corrected 😄 . Originally you were filtering events for [sig-cluster-lifecycle] pathological event should not see excessive Back-off restarting failed containers. I don't think this does that anymore.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The path to testBackoffStartingFailedContainer is part of monitortests/node/legacynodemonitortests chain that starts with monitor Stop

But I believe you just moved the matchers under testframework/legacytestframeworkmonitortests. I don't think the filter gets applied to the code above (could be wrong)

newSingleNodeConnectionRefusedEventMatcher(finalIntervals),
newSingleNodeKubeAPIProgressingEventMatcher(finalIntervals),
}

for _, event := range allowedEvents {
registry.AddPathologicalEventMatcherOrDie(event)
}
}

func getInstallCompletionTime(kubeClientConfig *rest.Config) *metav1.Time {
configClient, err := configclient.NewForConfig(kubeClientConfig)
if err != nil {
Expand Down