{"action":"closed","issue":{"url":"https://api.github.com/repos/zalando/patroni/issues/865","repository_url":"https://api.github.com/repos/zalando/patroni","labels_url":"https://api.github.com/repos/zalando/patroni/issues/865/labels{/name}","comments_url":"https://api.github.com/repos/zalando/patroni/issues/865/comments","events_url":"https://api.github.com/repos/zalando/patroni/issues/865/events","html_url":"https://github.com/zalando/patroni/issues/865","id":381034597,"node_id":"MDU6SXNzdWUzODEwMzQ1OTc=","number":865,"title":"Patroni not register service to consul ?","user":{"login":"binooetomo","id":28727621,"node_id":"MDQ6VXNlcjI4NzI3NjIx","avatar_url":"https://avatars1.githubusercontent.com/u/28727621?v=4","gravatar_id":"","url":"https://api.github.com/users/binooetomo","html_url":"https://github.com/binooetomo","followers_url":"https://api.github.com/users/binooetomo/followers","following_url":"https://api.github.com/users/binooetomo/following{/other_user}","gists_url":"https://api.github.com/users/binooetomo/gists{/gist_id}","starred_url":"https://api.github.com/users/binooetomo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/binooetomo/subscriptions","organizations_url":"https://api.github.com/users/binooetomo/orgs","repos_url":"https://api.github.com/users/binooetomo/repos","events_url":"https://api.github.com/users/binooetomo/events{/privacy}","received_events_url":"https://api.github.com/users/binooetomo/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-11-15T07:34:07Z","updated_at":"2018-11-17T11:36:18Z","closed_at":"2018-11-17T11:36:18Z","author_association":"NONE","body":"Dear All.\r\n\r\nI'm trying to setup patroni with consul.\r\n\r\nFirst I write a very simple flask script to 'register' to consul, and do a dig just to make sure my consul is work.\r\n\r\ndig @127.0.0.1 -p 8600 master.webapp.service.bino.inc. any +multiline +answer \r\n\r\n; <<>> DiG 9.9.4-RedHat-9.9.4-61.el7_5.1 <<>> @127.0.0.1 -p 8600 master.webapp.service.bino.inc. any +multiline +answer\r\n; (1 server found)\r\n;; global options: +cmd\r\n;; Got answer:\r\n;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 62221\r\n;; flags: qr aa rd; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1\r\n;; WARNING: recursion requested but not available\r\n\r\n;; OPT PSEUDOSECTION:\r\n; EDNS: version: 0, flags:; udp: 4096\r\n;; QUESTION SECTION:\r\n;master.webapp.service.bino.inc.\tIN ANY\r\n\r\n;; ANSWER SECTION:\r\nmaster.webapp.service.bino.inc.\t0 IN A 127.0.0.1\r\nmaster.webapp.service.bino.inc.\t0 IN TXT \"consul-network-segment=\"\r\n\r\n;; Query time: 2 msec\r\n;; SERVER: 127.0.0.1#8600(127.0.0.1)\r\n;; WHEN: Kam Nov 15 14:04:43 WIB 2018\r\n;; MSG SIZE  rcvd: 111\r\n\r\n\r\nhere is my consul configuration.\r\n\r\n# more /etc/consul.d/consul.json \r\n{\r\n  \"data_dir\": \"/opt/consul/data\",\r\n  \"server\": true,\r\n  \"bind_addr\": \"127.0.0.1\",\r\n  \"bootstrap_expect\": 1,\r\n  \"ui\": true,\r\n  \"domain\": \"bino.inc\",\r\n  \"client_addr\": \"127.0.0.1\",\r\n  \"node_name\": \"node01\"\r\n}\r\n\r\nBelow is my patroni config\r\n\r\n$ more ./pg-1-consul.yml \r\nscope: pgcluster\r\nname: pg-1\r\n\r\nrestapi:\r\n  listen: 0.0.0.0:8008\r\n  connect_address: 127.0.0.1:8008\r\n\r\nconsul:\r\n  host: 127.0.0.1\r\n  port: 8500\r\n\r\nbootstrap:\r\n  dcs:\r\n    ttl: 30\r\n    loop_wait: 10\r\n    retry_timeout: 10\r\n    maximum_lag_on_failover: 1048576\r\n    postgresql:\r\n      use_pg_rewind: true\r\n      use_slots: true\r\n      parameters:\r\n        wal_level: replica\r\n        hot_standby: \"on\"\r\n        wal_keep_segments: 8\r\n        max_wal_senders: 5\r\n        max_replication_slots: 5\r\n        checkpoint_timeout: 30\r\n\r\n  initdb:\r\n  - encoding: UTF8\r\n\r\n  pg_hba:\r\n  - host all dba all md5\r\n  - host replication repl all md5\r\n\r\n  users:\r\n    dba:\r\n      password: secret\r\n      options:\r\n        - createrole\r\n        - createdb\r\n    repl:\r\n      password: secret\r\n      options:\r\n        - replication\r\n\r\npostgresql:\r\n  listen: 0.0.0.0:5432\r\n  connect_address: 127.0.0.1:5432\r\n  data_dir: /home/patroni/patroni/psqldata/pg-1\r\n  config_dir: /home/patroni/patroni/psqldata/pg-1\r\n  bin_dir: /usr/pgsql-9.6/bin\r\n  authentication:\r\n    replication:\r\n      username: repl\r\n      password: secret\r\n    superuser:\r\n      username: dba\r\n      password: secret\r\n  parameters:\r\n    unix_socket_directories: '/tmp'\r\n\r\n\r\n\r\nI tried to dig it\r\n# dig @127.0.0.1 -p 8600 pgcluster.service.bino.inc. any +multiline +answer \r\n\r\n; <<>> DiG 9.9.4-RedHat-9.9.4-61.el7_5.1 <<>> @127.0.0.1 -p 8600 pgcluster.service.bino.inc. any +multiline +answer\r\n; (1 server found)\r\n;; global options: +cmd\r\n;; Got answer:\r\n;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 30822\r\n;; flags: qr aa rd; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1\r\n;; WARNING: recursion requested but not available\r\n\r\n;; OPT PSEUDOSECTION:\r\n; EDNS: version: 0, flags:; udp: 4096\r\n;; QUESTION SECTION:\r\n;pgcluster.service.bino.inc. IN ANY\r\n\r\n;; AUTHORITY SECTION:\r\nbino.inc.\t\t0 IN SOA ns.bino.inc. hostmaster.bino.inc. (\r\n\t\t\t\t1542266799 ; serial\r\n\t\t\t\t3600       ; refresh (1 hour)\r\n\t\t\t\t600        ; retry (10 minutes)\r\n\t\t\t\t86400      ; expire (1 day)\r\n\t\t\t\t0          ; minimum (0 seconds)\r\n\t\t\t\t)\r\n\r\n;; Query time: 2 msec\r\n;; SERVER: 127.0.0.1#8600(127.0.0.1)\r\n;; WHEN: Kam Nov 15 14:26:39 WIB 2018\r\n;; MSG SIZE  rcvd: 105\r\n\r\n\r\nIs that right that patroni did not register it's service to consul, but just use consul for key/value store only ?\r\n\r\nSincerely\r\n-bino-\r\n"}}
{"actor":{"display_login":"CyberDem0n"}}