vitabaks / postgresql_cluster

PostgreSQL High-Availability Cluster (based on Patroni). Automating with Ansible.
https://postgresql-cluster.org
MIT License
1.48k stars 394 forks source link

pgBackRest: Add '--no-online' option to stanza-create #695

Closed vitabaks closed 1 month ago

vitabaks commented 1 month ago

Add '--no-online' option to stanza-create to be able to configure on a Standby cluster.

Fixed:

TASK [pgbackrest/stanza-create : Create stanza "postgres-cluster"] ****************************************************************************************************************************************
fatal: [***.***.**.*** -> ***.***.**.***]: FAILED! => {"changed": false, "cmd": ["pgbackrest", "--stanza=postgres-cluster", "stanza-create"], "delta": "0:00:03.904155", "end": "2024-07-12 15:12:37.167039", "msg": "non-zero return code", "rc": 56, "start": "2024-07-12 15:12:33.262884", "stderr": "WARN: configuration file contains invalid option 'include-path'\nERROR: [056]: unable to find primary cluster - cannot proceed\n       HINT: are all available clusters in recovery?", "stderr_lines": ["WARN: configuration file contains invalid option 'include-path'", "ERROR: [056]: unable to find primary cluster - cannot proceed", "       HINT: are all available clusters in recovery?"], "stdout": "2024-07-12 15:12:33.276 P00   INFO: stanza-create command begin 2.52.1: --exec-id=148878-6af21ca1 --log-level-console=info --log-level-file=detail --log-path=/var/log/pgbackrest --pg1-host=***.***.**.*** --pg2-host=216.223.147.100 --pg3-host=216.223.147.228 --pg1-path=/var/lib/postgresql/14/main --pg2-path=/var/lib/postgresql/14/main --pg3-path=/var/lib/postgresql/14/main --pg1-port=5432 --pg2-port=5432 --pg3-port=5432 --pg1-socket-path=/var/run/postgresql --pg2-socket-path=/var/run/postgresql --pg3-socket-path=/var/run/postgresql --repo1-path=/data/service/pgbackrest --repo1-type=posix --stanza=postgres-cluster\n2024-07-12 15:12:36.858 P00   INFO: stanza-create command end: aborted with exception [056]", "stdout_lines": ["2024-07-12 15:12:33.276 P00   INFO: stanza-create command begin 2.52.1: --exec-id=148878-6af21ca1 --log-level-console=info --log-level-file=detail --log-path=/var/log/pgbackrest --pg1-host=***.***.**.*** --pg2-host=216.223.147.100 --pg3-host=216.223.147.228 --pg1-path=/var/lib/postgresql/14/main --pg2-path=/var/lib/postgresql/14/main --pg3-path=/var/lib/postgresql/14/main --pg1-port=5432 --pg2-port=5432 --pg3-port=5432 --pg1-socket-path=/var/run/postgresql --pg2-socket-path=/var/run/postgresql --pg3-socket-path=/var/run/postgresql --repo1-path=/data/service/pgbackrest --repo1-type=posix --stanza=postgres-cluster", "2024-07-12 15:12:36.858 P00   INFO: stanza-create command end: aborted with exception [056]"]}