Bug 1827585

Summary: Report event in case of excessive leader changes that include disk metrics
Product: OpenShift Container Platform Reporter: Michal Fojtik <mfojtik>
Component: Etcd OperatorAssignee: Sam Batschelet <sbatsche>
Status: CLOSED ERRATA QA Contact: ge liu <geliu>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.5CC: ingvarr.zhmakin
Target Milestone: ---   
Target Release: 4.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1840150 (view as bug list) Environment:
Last Closed: 2020-07-13 17:31:14 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:
Bug Depends On:    
Bug Blocks: 1840150    

Description Michal Fojtik 2020-04-24 09:18:37 UTC
Description of problem:

In case of etcd running on nodes with slow disks (IO/fsync), higher count of leader changes were spotted, that potentially disrupt the API server and other components trying to write/read from etcd.

While several tweaks to etcd were made to mitigate this problem, we need better reporting from etcd operator that will provide detailed information about `etcd_disk_wal_fsync_duration_seconds_bucket` in case of leader changes are excessive.


Version-Release number of selected component (if applicable):


How reproducible:

When leader changes are excessive (high count), we don't report any disk metrics in operator.

Steps to Reproduce:

(this is hard)

1. Make etcd perform leader changes (several in 5 minutes)

Actual results:

The alert will be fired for leader changes, but no info is given back to admins about disk usage of node.

Expected results:

When the leader changes occurs, the operator should fire a warning event automatically: 

Warningf("EtcdLeaderChangeMetrics", "Detected %s leader changes in last 5 minutes on %q disk metrics are: %s", leaderChanges, platformType, strings.Join(values, ","))


Additional info:

Comment 5 errata-xmlrpc 2020-07-13 17:31:14 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, 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-2020:2409