Skip to content

Commit

Permalink
bug fix:
Browse files Browse the repository at this point in the history
* fix haproxy check method from GET to OPTIONS to avoid exception msg in
  patroni log
* fix patroni pause mode, will only execute pause once on primary
* fix makefile typo
  • Loading branch information
Vonng committed Apr 1, 2021
1 parent 9768655 commit fdf8863
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ download-pigsty:
curl http://pigsty-1304147732.cos.accelerate.myqcloud.com/latest/pigsty.tar.gz -o /tmp/pigsty.tgz

# download pkg.tgz from github release
downlaod2:
download2:
open https://github.com/Vonng/pigsty/releases/download/v0.8.0/pkg.tgz

# fast provisioning on sandbox
Expand Down
2 changes: 1 addition & 1 deletion roles/postgres/tasks/postgres.yml
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@
- name: Pause patroni
tags: pg_patroni
ignore_errors: true
when: patroni_mode == 'pause'
when: patroni_mode == 'pause' and pg_role == 'primary'
command: /usr/bin/patronictl -c /pg/bin/patroni.yml pause

# this will degrade cluster into a raw cluster
Expand Down
2 changes: 1 addition & 1 deletion roles/service/templates/haproxy.cfg.j2
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ listen {{ pg_cluster }}-{{ service.name }}
{% if 'check_method' not in service or service.check_method == 'http' %}
option httpchk
option http-keep-alive
http-check send meth GET uri {{ service.check_url|default('/') }}
http-check send meth OPTIONS uri {{ service.check_url|default('/') }}
http-check expect status {{ service.check_code|default(200) }}
{% endif %}
default-server {{ service.haproxy.default_server_options|default('inter 3s fastinter 1s downinter 5s rise 3 fall 3 on-marked-down shutdown-sessions slowstart 30s maxconn 3000 maxqueue 128 weight 100') }} {% if service.check_port is number %}{{ service.check_port }}{% endif %}
Expand Down

0 comments on commit fdf8863

Please sign in to comment.