Add all patroni roles to cluster logs endpoint
Currently the cluster logs endpoint only returns following roles:
-
master
->pr
-
replica
->re
We have to allow return following roles (with respective mappings):
-
master
->pr
-
replica
->re
-
promoted
->pm
-
demoted
->dm
-
uninitialized
->un
-
standby_leader
->sl
This will also correct a bug that when on of the roles promoted
, demoted
, uninitialized
or standby_leader
is stored in the database it is returned as null and filtered out when searching for an empty role ?role=
.
Edited by Matteo Melli