Add sync_standby as an acceptable state for a replica
This commit is contained in:
parent
021b572e53
commit
a01a535680
|
@ -166,7 +166,7 @@ Usage: check_patroni cluster_has_replica [OPTIONS]
|
|||
|
||||
A healthy replica:
|
||||
* is in running or streaming state (V3.0.4)
|
||||
* has a replica role
|
||||
* has a replica or sync_standby role
|
||||
* has a lag lower or equal to max_lag
|
||||
|
||||
Check:
|
||||
|
|
|
@ -324,7 +324,7 @@ def cluster_has_replica(
|
|||
\b
|
||||
A healthy replica:
|
||||
* is in running or streaming state (V3.0.4)
|
||||
* has a replica role
|
||||
* has a replica or sync_standby role
|
||||
* has a lag lower or equal to max_lag
|
||||
|
||||
\b
|
||||
|
|
|
@ -91,7 +91,7 @@ class ClusterHasReplica(PatroniResource):
|
|||
unhealthy_replica = 0
|
||||
for member in item_dict["members"]:
|
||||
# FIXME are there other acceptable states
|
||||
if member["role"] == "replica":
|
||||
if member["role"] in ["replica", "sync_standby"]:
|
||||
# patroni 3.0.4 changed the standby state from running to streaming
|
||||
if (
|
||||
member["state"] in ["running", "streaming"]
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
},
|
||||
{
|
||||
"name": "srv3",
|
||||
"role": "replica",
|
||||
"role": "sync_standby",
|
||||
"state": "running",
|
||||
"api_url": "https://10.20.199.5:8008/patroni",
|
||||
"host": "10.20.199.5",
|
||||
|
|
Loading…
Reference in a new issue