I was able to execute the playbook smoothly . Two days ago , I got the latest repo download and after executing I am getting :
TASK [patroni : Prepare PostgreSQL | make sure the data directory "/var/lib/pgsql/16/data" is empty] *********************************
changed: [206.189.182.142] => (item=absent)
changed: [206.189.182.4] => (item=absent)
changed: [206.189.182.4] => (item=directory)
changed: [206.189.182.142] => (item=directory)
TASK [patroni : Start patroni service on the Master server] **************************************************************************
changed: [206.189.182.4]
TASK [patroni : Wait for port 8008 to become open on the host] ***********************************************************************
ok: [206.189.182.4]
FAILED - RETRYING: [206.189.182.4]: Check PostgreSQL is started and accepting connections on Master (1000 retries left).
FAILED - RETRYING: [206.189.182.4]: Check PostgreSQL is started and accepting connections on Master (999 retries left).
FAILED - RETRYING: [206.189.182.4]: Check PostgreSQL is started and accepting connections on Master (998 retries left).
FAILED - RETRYING: [206.189.182.4]: Check PostgreSQL is started and accepting connections on Master (997 retries left).
FAILED - RETRYING: [206.189.182.4]: Check PostgreSQL is started and accepting connections on Master (996 retries left).
FAILED - RETRYING: [206.189.182.4]: Check PostgreSQL is started and accepting connections on Master (995 retries left).
FAILED - RETRYING: [206.189.182.4]: Check PostgreSQL is started and accepting connections on Master (994 retries left).
FAILED - RETRYING: [206.189.182.4]: Check PostgreSQL is started and accepting connections on Master (993 retries left).
FAILED - RETRYING: [206.189.182.4]: Check PostgreSQL is started and accepting connections on Master (992 retries left).
FAILED - RETRYING: [206.189.182.4]: Check PostgreSQL is started and accepting connections on Master (991 retries left).
FAILED - RETRYING: [206.189.182.4]: Check PostgreSQL is started and accepting connections on Master
I can see the data folder is not getting created and It is created as data.failed .
I am using centos 9 OS.
the status of patroni is :
patroni.service - Runners to orchestrate a high-availability PostgreSQL - Patroni
Loaded: loaded (/etc/systemd/system/patroni.service; enabled; preset: disabled)
Active: active (running) since Thu 2024-06-27 17:27:35 UTC; 3s ago
Process: 123251 ExecStartPre=/usr/bin/sudo /sbin/modprobe softdog (code=exited, status=0/SUCCESS)
Process: 123252 ExecStartPre=/usr/bin/sudo /bin/chown postgres /dev/watchdog (code=exited, status=0/SUCCESS)
Main PID: 123254 (patroni)
Tasks: 4 (limit: 22848)
Memory: 65.2M
CPU: 2.820s
CGroup: /system.slice/patroni.service
└─123254 /usr/bin/python3.11 /usr/local/bin/patroni /etc/patroni/patroni.yml
Jun 27 17:27:39 ashish1 patroni[123254]: info = self._run_cycle()
Jun 27 17:27:39 ashish1 patroni[123254]: ^^^^^^^^^^^^^^^^^
Jun 27 17:27:39 ashish1 patroni[123254]: File "/usr/local/lib/python3.11/site-packages/patroni/ha.py", line 1797, in _run_cycle
Jun 27 17:27:39 ashish1 patroni[123254]: return self.post_bootstrap()
Jun 27 17:27:39 ashish1 patroni[123254]: ^^^^^^^^^^^^^^^^^^^^^
Jun 27 17:27:39 ashish1 patroni[123254]: File "/usr/local/lib/python3.11/site-packages/patroni/ha.py", line 1681, in post_bootstrap
Jun 27 17:27:39 ashish1 patroni[123254]: self.cancel_initialization()
Jun 27 17:27:39 ashish1 patroni[123254]: File "/usr/local/lib/python3.11/site-packages/patroni/ha.py", line 1674, in cancel_initial>
Jun 27 17:27:39 ashish1 patroni[123254]: raise PatroniFatalException('Failed to bootstrap cluster')
Jun 27 17:27:39 ashish1 patroni[123254]: patroni.exceptions.PatroniFatalException: Failed to bootstrap cluster
I was able to execute the playbook smoothly . Two days ago , I got the latest repo download and after executing I am getting :
I can see the data folder is not getting created and It is created as data.failed .
I am using centos 9 OS.
the status of patroni is :