check-patroni/check_patroni
benoit 8d6b8502b6 cluster_has_replica: fix the way a healthy replica is detected
For patroni >= version 3.0.4:
* the role is `replica` or `sync_standby`
* the state is `streaming` or `in archive recovery`
* the timeline is the same as the leader
* the lag is lower or equal to `max_lag`

For prio versions of patroni:
* the role is `replica` or `sync_standby`
* the state is `running`
* the timeline is the same as the leader
* the lag is lower or equal to `max_lag`

Additionnally, we now display the timeline in the perfstats. We also try
to display the perf stats of unhealthy replica as much as possible.

Update tests for cluster_has_replica:
* Fix the tests to make them work with the new algotithm
* Add a specific test for tl divergences
2023-11-11 10:50:35 +01:00
..
__init__.py Release 1.0.0 2023-08-28 12:09:16 +02:00
__main__.py Initial commit 2021-07-02 12:37:03 +02:00
cli.py cluster_has_replica: fix the way a healthy replica is detected 2023-11-11 10:50:35 +01:00
cluster.py cluster_has_replica: fix the way a healthy replica is detected 2023-11-11 10:50:35 +01:00
convert.py Use isort to automatically sort imports 2023-03-20 14:56:11 +01:00
node.py Drop superfluous type annotation of 'self' 2023-10-03 09:39:40 +02:00
types.py cluster_has_replica: fix the way a healthy replica is detected 2023-11-11 10:50:35 +01:00