Bug 1932165 - variables in DeprecatedAPIInUse alert's annotations.message are not parsed to existing values
Summary: variables in DeprecatedAPIInUse alert's annotations.message are not parsed to...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: kube-apiserver
Version: 4.8
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: David Eads
QA Contact: Ke Wang
URL:
Whiteboard:
: 1949988 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-02-24 06:05 UTC by Junqi Zhao
Modified: 2023-01-16 11:29 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-01-16 11:29:46 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
DeprecatedAPIInUse alert detail (103.79 KB, image/png)
2021-02-24 06:05 UTC, Junqi Zhao
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github openshift cluster-kube-apiserver-operator pull 1055 0 None closed Bug 1932165: variables in DeprecatedAPIInUse alert's annotations.message are not parsed to existing values 2021-05-27 14:48:36 UTC

Description Junqi Zhao 2021-02-24 06:05:33 UTC
Created attachment 1758999 [details]
DeprecatedAPIInUse alert detail

Created attachment 1758999 [details]
DeprecatedAPIInUse alert detail

Description of problem:
in a fresh 4.8 cluster which has been running for 1 hour at least, DeprecatedAPIInUse alert is fired
# oc -n openshift-kube-apiserver get prometheusrules kube-apiserver -oyaml
...
  - name: pre-release-lifecycle
    rules:
    - alert: DeprecatedAPIInUse
      annotations:
        message: Deprecated API that will be removed in the next version is being used. Removing the workload that is using the {{"{{$labels.group}}"}}.{{"{{$labels.version}}"}}/{{"{{$labels.resource}}"}} API might be necessary for a successful upgrade to the next cluster version. Refer to the audit logs to identify the workload.
      expr: |
        group(apiserver_requested_deprecated_apis{removed_release="1.21"}) by (group,version,resource) and (sum by(group,version,resource) (rate(apiserver_request_total[10m]))) > 0
      for: 1h
      labels:
        severity: info


see from the attachment, Message section in Alert details page
******************
Deprecated API that will be removed in the next version is being used. Removing the workload that is using the {{$labels.group}}.{{$labels.version}}/{{$labels.resource}} API might be necessary for a successful upgrade to the next cluster version. Refer to the audit logs to identify the workload.
******************
{{$labels.group}}.{{$labels.version}}/{{$labels.resource}} is not replaced to existing values
it should be
"{{$labels.group}}.{{$labels.version}}/{{$labels.resource}}" for annotations.message in DeprecatedAPIInUse alert

Version-Release number of selected component (if applicable):
4.8.0-0.nightly-2021-02-23-160229

How reproducible:
always

Steps to Reproduce:
1. see from the description
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 hongyan li 2021-04-09 03:37:14 UTC
*** Bug 1947719 has been marked as a duplicate of this bug. ***

Comment 2 Vadim Rutkovsky 2021-04-15 14:41:41 UTC
*** Bug 1949988 has been marked as a duplicate of this bug. ***

Comment 4 Junqi Zhao 2021-05-25 09:16:21 UTC
no DeprecatedAPIInUse alert now

Comment 6 Michal Fojtik 2023-01-16 11:29:46 UTC
Dear reporter, we greatly appreciate the bug you have reported here. Unfortunately, due to migration to a new issue-tracking system (https://issues.redhat.com/), we cannot continue triaging bugs reported in Bugzilla. Since this bug has been stale for multiple days, we, therefore, decided to close this bug.

If you think this is a mistake or this bug has a higher priority or severity as set today, please feel free to reopen this bug and tell us why. We are going to move every re-opened bug to https://issues.redhat.com. 

Thank you for your patience and understanding.


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