Hi, On Mon, Feb 10, 2025 at 12:43:54PM +0000, Ben Harris wrote: > On Mon, 10 Feb 2025, Michael Banck wrote > > I tried to reproduce the reinit failure, but it always worked for me. > > Not sure what is different on your side :-/ > > I could send you the recipe my clusters use, but it's thousands of lines of > Ansible and probably not very portable. Do you have a simple test recipe > that I might be able to reproduce? Then I might be able to work out where > the difference is.
I tried the following simple ansible playbook: https://github.com/credativ/ansible-playbook-patroni-debian/ After bootstrapping the cluster, a patronictl reinit worked (but I do see those 'Use of uninitialized value' warnings): |Feb 10 14:01:41 pg1 patroni@14-main[6097]: 2025-02-10 14:01:41,096 INFO: no action. I am (pg1), a secondary, and following a leader (pg2) |Feb 10 14:01:43 pg1 patroni@14-main[6097]: 2025-02-10 14:01:43,679 INFO: Removing data directory: /var/lib/postgresql/14/main |Feb 10 14:01:43 pg1 patroni@14-main[6147]: Use of uninitialized value $data_directory in concatenation (.) or string at /usr/share/perl5/PgCommon.pm line 284. |Feb 10 14:01:43 pg1 patroni@14-main[6147]: Use of uninitialized value $data_directory in concatenation (.) or string at /usr/share/perl5/PgCommon.pm line 284. |Feb 10 14:01:43 pg1 patroni@14-main[6147]: Use of uninitialized value $data_directory in concatenation (.) or string at /usr/share/perl5/PgCommon.pm line 284. |Feb 10 14:01:43 pg1 patroni@14-main[6147]: Warning: corrupted cluster: data directory does not exist |Feb 10 14:01:45 pg1 patroni@14-main[6097]: 2025-02-10 14:01:45,218 INFO: replica has been created using pg_clonecluster |Feb 10 14:01:45 pg1 patroni@14-main[6097]: 2025-02-10 14:01:45,219 INFO: bootstrapped from leader 'pg2' What I don't see is the "INFO: trying to bootstrap from leader 'foo'" message you mentioned, but maybe that is due to me using 4.0.x (but it is still there in the HA loop code). Maybe your work-flow is different? Michael