Bug 1932165

Summary: variables in DeprecatedAPIInUse alert's annotations.message are not parsed to existing values
Product: OpenShift Container Platform Reporter: Junqi Zhao <juzhao>
Component: kube-apiserverAssignee: David Eads <deads>
Status: CLOSED WONTFIX QA Contact: Ke Wang <kewang>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.8CC: aos-bugs, hongyli, mfojtik, sjenning, sttts, vrutkovs, xxia
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-01-16 11:29:46 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
DeprecatedAPIInUse alert detail none

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.