You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I use consul template for /etc/hosts settings , and I use citus + patroni.
I use citus groups feature in patroni. So my citus groups seem like this in patroni:
I set up /etc/hosts config with consul template:
{{ range service "master.mycluster@datacenter1|passing" }}{{ .Address }} citus1-primary{{ end }}
{{ range service "replica.mycluster@datacenter1" }}{{ .Address }} citus1-replica{{ end }}
But both of 10.10.10.10 and 10.10.10.12 seem like leader and 10.10.10.11 and 10.10.10.13 seem like replica.
So /etc/hosts file seem like that:
I want to seperate this leader and replika by group number but I can't find this feature in consul template document.
Is there any solution for this?
Thanks.
The text was updated successfully, but these errors were encountered:
sdayvz
changed the title
Can't choose specific leader when use consul template for haproxy
Can't choose specific leader when use consul template for hosts settings
Oct 21, 2024
Hi,
I use consul template for /etc/hosts settings , and I use citus + patroni.
I use citus groups feature in patroni. So my citus groups seem like this in patroni:
| Group | Member | Host | Role | State | TL | Lag in MB |
+-------+-----------+------------------+---------+-----------+----+-----------+
| 0 | citus1 | 10.10.10.10| Leader | running | 1 | |
| 1 | citus1-02 | 10.10.10.11| Replica | streaming | 1 | 0 |
| 1 | citus2 | 10.10.10.12| Leader | running | 1 | |
| 1 | citus2-02 | 10.10.10.13| Replica | streaming | 1 | 0 |
+-------+-----------+------------------+---------+-----------+----+-----------+
I set up /etc/hosts config with consul template:
{{ range service "master.mycluster@datacenter1|passing" }}{{ .Address }} citus1-primary{{ end }}
{{ range service "replica.mycluster@datacenter1" }}{{ .Address }} citus1-replica{{ end }}
But both of 10.10.10.10 and 10.10.10.12 seem like leader and 10.10.10.11 and 10.10.10.13 seem like replica.
So /etc/hosts file seem like that:
10.10.10.10 citus1-primary 10.10.10.12 citus1-primary
10.10.10.11 citus1-replica 10.10.10.13 citus1-replica
I want to seperate this leader and replika by group number but I can't find this feature in consul template document.
Is there any solution for this?
Thanks.
The text was updated successfully, but these errors were encountered: