Bug 2094362 - Duplicate prometheus rules for API SLOs after upgrade
Summary: Duplicate prometheus rules for API SLOs after upgrade
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: kube-apiserver
Version: 4.9
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: 4.12.0
Assignee: Luis Sanchez
QA Contact: Deepak Punia
Depends On:
TreeView+ depends on / blocked
Reported: 2022-06-07 13:28 UTC by Simon Pasquier
Modified: 2023-03-07 15:43 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Last Closed: 2023-01-17 19:49:52 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Github openshift cluster-kube-apiserver-operator pull 1376 0 None open Bug 2094362: Duplicate prometheus rules for API SLOs after upgrade 2022-10-17 17:28:25 UTC
Red Hat Knowledge Base (Solution) 6973865 0 None None None 2022-08-31 12:44:42 UTC
Red Hat Product Errata RHSA-2022:7399 0 None None None 2023-01-17 19:50:00 UTC

Description Simon Pasquier 2022-06-07 13:28:27 UTC
Description of problem:
A change [1] was introduced to split the kube-apiserver SLO rules into 2 groups to reduce the load on Prometheus (see bug 2004585). 

[1] https://github.com/openshift/cluster-kube-apiserver-operator/commit/4a1751ee86cda37f0d9ea520cac09f91ebc3abe9

Version-Release number of selected component (if applicable):
4.9 (because the change was backported to 4.9.z)

How reproducible:

Steps to Reproduce:
1. Install OCP 4.9
2. Retrieve kube-apiserver-slos* 
oc get -n openshift-kube-apiserver prometheusrules kube-apiserver-slos -o yaml
oc get -n openshift-kube-apiserver prometheusrules kube-apiserver-slos-basic -o yaml

Actual results:

The KubeAPIErrorBudgetBurn alert with labels {long="1h",namespace="openshift-kube-apiserver",severity="critical",short="5m"} exists both in kube-apiserver-slos and kube-apiserver-slos-basic.

The alerting rules is evaluated twice. The same is true for recording rules like "apiserver_request:burnrate1h" and in this case, it can trigger warning logs in the Prometheus pods:

> level=warn component="rule manager" group=kube-apiserver.rules msg="Error on ingesting out-of-order result from rule evaluation" numDropped=283

Expected results:

I presume that kube-apiserver-slos shouldn't exist since it's been replaced by kube-apiserver-slos-basic and kube-apiserver-slos-extended.

Additional info:

Discovered while investigating bug 2091902

Comment 15 errata-xmlrpc 2023-01-17 19:49:52 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: OpenShift Container Platform 4.12.0 bug fix and security update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.