-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PAF with PostgreSQL 12 & no recovery.conf #156
Comments
I got it working with this modification to the resource agent script:
|
It would be great to add change in main branch. I'm setting up psql12 and can test it. |
Hi guys, I am working on this and should publish the release candidate this week. @caseyallenshobe, as I already have a patch with some more cleanup and polishing on it, I'll keep mine. But I do appreciate the time you invested, thank you. As far as I can see, you can keep it this way until the official release. It sounds safe. |
Hello, output of pcs status command:
output of pcs config --all command
can provide more info on the config if needed, but since i'm really new to pacemaker/corosync world, will need your imputs guys. Regards |
Hello @bdonfouet, There's various place where pgsqlms returns $OCF_ERR_ARGS. Among them, most common mistakes are:
But I'm quite surprised there's no explicit You could also share specific logs. If the cluster has never start, errors/warning around pattern |
Hi @ioguix , Thanks |
You are not forced to use the hostname in Corosync/Pacemaker. But it makes things much more easier to setup and removes some traps. From PAF point of view, the |
Hi @ioguix ,
I just comment out above code block, and everything works fine with postgresql v12 on centos7. I am not familiar with perl, just some info for you. |
Hi @zeroone,
Good catch. Thank you!
I haven't been able to reproduce. I tested on clusters using:
After a very quick look at them, they were starting and doing fine. Eg.:
Could you report:
Thank you for your report! |
Thanks to ZeroOne on github for catching and reporting this in issue #156.
@ioguix , thanks for your reply. [ha1]$ hostname
ha1.ftrans.local [ha1]$ sudo crm_node --list
1 ha1.ftrans.local member
2 ha2.ftrans.local member [ha1]$ sudo vi /var/lib/pgsql/12/data/postgresql.auto.conf
listen_addresses = '*'
wal_keep_segments = '32'
hot_standby_feedback = 'on'
primary_conninfo = 'application_name=ha1.ftrans.local host=192.168.1.173 user=replication password=PASS port=5432 sslmode=prefer sslcompression=0 gssencmode=prefer krbsrvname=postgres target_session_attrs=any' When use [ha1]$ sudo -i -u postgres /usr/pgsql-12/bin/postgres -C primary_conninfo
application_name=ha1.ftrans.local host=192.168.1.173 user=replication password=PASS port=5432 sslmode=prefer sslcompression=0 gssencmode=prefer krbsrvname=postgres target_session_attrs=any With these configs, the errors are: $ sudo pcs status
Failed Resource Actions:
* pgsqld_stop_0 on ha1.ftrans.local 'invalid parameter' (2): call=12, status=complete, exitreason='Parameter "primary_conninfo" MUST contain 'application_name=ha1.ftrans.local'. It is currently set to 'application_name=ha1.ftra',
last-rc-change='Tue Dec 31 09:49:31 2019', queued=0ms, exec=145ms $ sudo vi /var/log/cluster/corosync.log
Dec 31 09:57:43 [85185] ha1.ftrans.local crm_resource: error: unpack_rsc_op: Preventing pgsql-ha from re-starting on ha1.ftrans.local: operation monitor failed 'invalid parameter' (2)
pgsqlms(pgsqld)[85177]: Dec 31 09:57:43 ERROR: Parameter "primary_conninfo" MUST contain 'application_name=ha1.ftrans.local'. It is currently set to 'application_name=ha1.ftrans.local host=192.168.1.173 user=replication password=PASS port=5432 sslmode=prefer sslcompression=0 gssencmode=prefer krbsrvname=postgres target_session_attrs=any
'
Dec 31 09:57:43 [85068] ha1.ftrans.local lrmd: notice: operation_finished: pgsqld_stop_0:85177:stderr [ ocf-exit-reason:Parameter "primary_conninfo" MUST contain 'application_name=ha1.ftrans.local'. It is currently set to 'application_name=ha1.ftrans.local host=192.168.1.173 user=replication password=PASS port=5432 sslmode=prefer sslcompression=0 gssencmode=prefer krbsrvname=postgres target_session_attrs=any ]
Dec 31 09:57:43 [85068] ha1.ftrans.local lrmd: notice: operation_finished: pgsqld_stop_0:85177:stderr [ ' ] Thanks a lot. |
The old regex from the recovery.conf era (pre-v12 versions) has been kept while the output format we parse is slightly different in v12. Since, v12, we parse the output of "postgres -C primary_conninfo" were there is no quotes around the whole value. Because of this, the check was reporting a wrong error if application_name was the very first parameter appearing in primary_conninfo. Thanks to @zeroone on github for testing and reporting this bug with details in issue #156.
Hi @zeroone, OK, I've been able to reproduce when setting Please, can you test it on your side and confirm it fixed your issue? Thanks again, |
@ioguix , now everything is working fine, thank you very much for your work! |
Great! And thank you for your test and report! |
PAF v2.3 has been released. I can now close this issue. |
Hi,
I'm looking for information on how to utilize PostgreSQL with PAF/Pacemaker. PostgreSQL has no recovery.conf, making the recovery_template option for PAF seem pointless. How can PAF be configured to work with PostgreSQL 12, or is this yet possible?
The text was updated successfully, but these errors were encountered: