Bug 2102793

Summary: etcdHighNumberOfLeaderChanges returns incorrect number of leadership changes
Product: OpenShift Container Platform Reporter: OpenShift BugZilla Robot <openshift-bugzilla-robot>
Component: EtcdAssignee: Thomas Jungblut <tjungblu>
Status: CLOSED ERRATA QA Contact: ge liu <geliu>
Severity: high Docs Contact:
Priority: high    
Version: 4.11CC: wking
Target Milestone: ---   
Target Release: 4.10.z   
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: 2022-07-11 15:27:55 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2092880    
Bug Blocks:    

Comment 2 ge liu 2022-07-04 07:49:42 UTC
erified with 4.10.0-0.nightly-2022-07-01-210424
Using port-forward prometheus-k8s pod to check metrics without login UI:

# oc -n openshift-monitoring port-forward pod/prometheus-k8s-0 9090

Browser navigates to:
http://localhost:9090/graph

input: increase((max without (instance) (etcd_server_leader_changes_seen_total{job=~".*etcd.*"}) or 0*absent(etcd_server_leader_changes_seen_total{job=~".*etcd.*"}))[15m:1m])
got result is: 6.x

and input: etcd_server_is_leader to count the leadership changes, it's 6 times

the graph screenshot listed in attachment.

Comment 7 errata-xmlrpc 2022-07-11 15:27:55 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 (OpenShift Container Platform 4.10.22 bug fix 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.

https://access.redhat.com/errata/RHBA-2022:5513