vitabaks / postgresql_cluster

PostgreSQL High-Availability Cluster (based on "Patroni" and DCS "etcd" or "consul"). Automating with Ansible.
MIT License
1.29k stars 352 forks source link

haproxy.cfg creation issue #616

Closed mathgonzlez closed 1 month ago

mathgonzlez commented 1 month ago

Hi.

Im trying to deployin in rhel9.3 but when the procedure need to create the haproxy.cfg is created with an error

listen replicas bind 192.168.60.118:5001 maxconn 10000 option tcplog option httpchk OPTIONS /replica?lag=100MB balance roundrobin http-check expect status 200 default-server inter 3s fastinter 1s fall 3 rise 2 on-marked-down shutdown-sessions server postgres-1 192.168.60.18:6432 check port 8008 server postgres-2 192.168.60.45:6432 check port 8008 server postgres-3 192.168.60.83:6432 check port 8008 listen replicas_sync bind 192.168.60.118:5002 maxconn 10000 option tcplog option httpchk OPTIONS /sync balance roundrobin http-check expect status 200 default-server inter 3s fastinter 1s fall 3 rise 2 on-marked-down shutdown-sessions server postgres-1 192.168.60.18:6432 check port 8008 server postgres-2 192.168.60.45:6432 check port 8008 server postgres-3 192.168.60.83:6432 check port 8008 listen replicas_async bind 192.168.60.118:5003 maxconn 10000 option tcplog option httpchk OPTIONS /async?lag=100MB balance roundrobin http-check expect status 200 default-server inter 3s fastinter 1s fall 3 rise 2 on-marked-down shutdown-sessions server postgres-1 192.168.60.18:6432 check port 8008 server postgres-2 192.168.60.45:6432 check port 8008 server postgres-3 192.168.60.83:6432 check port 8008

The right format is: option httpchk OPTIONS /async?lag=100MB balance roundrobin\

I see the j2 but seems to be ok.

Thanks!

vitabaks commented 1 month ago

Thanks, I'll fix it.

It looks like this MR broke the formatting if no tags are specified https://github.com/vitabaks/postgresql_cluster/pull/613

mathgonzlez commented 1 month ago

Thanks, I'll fix it.

It looks like this MR broke the formatting if no tags are specified #613

ok, you re right, ill add the tag for haproxy and now works great.

Thanks!

vitabaks commented 1 month ago

@mathgonzlez Fixed https://github.com/vitabaks/postgresql_cluster/pull/618