[Pacemaker] Issues with ocf_run on CentOS7 with pgsql resource agent

Brendan Reekie breekie at sandvine.com
Thu Nov 20 16:36:22 EST 2014


I'm running into an issues with the pgsql resource agent running on CentOS7.  The issue is when the pgsql resource agent attempts a call to runasowner it uses a su as user postgres in a call to ocf_run, this is causing what appears to be a new session on CentOS7.

We've narrowed it down to the ocf_run method in ocf-shellfuncs in executing the command:
       output=`"$@" 2>&1`

Snippet of /var/log/messages:
Nov 20 21:29:05 ip-10-0-0-4 pengine[2041]: notice: LogActions: Stop    pgsql:0  (pcmk-1)
Nov 20 21:29:05 ip-10-0-0-4 pengine[2041]: notice: process_pe_message: Calculated Transition 1: /var/lib/pacemaker/pengine/pe-input-205.bz2
Nov 20 21:29:05 ip-10-0-0-4 crmd[2042]: notice: te_rsc_command: Initiating action 47: notify pgsql_pre_notify_stop_0 on pcmk-1 (local)
Nov 20 21:29:05 ip-10-0-0-4 crmd[2042]: notice: te_rsc_command: Initiating action 48: notify pgsql_pre_notify_stop_0 on pcmk-2
Nov 20 21:29:05 ip-10-0-0-4 pacemakerd[2412]: notice: crm_add_logfile: Additional logging available in /var/log/pacemaker.log
Nov 20 21:29:05 ip-10-0-0-4 su: (to postgres) root on none
Nov 20 21:29:05 ip-10-0-0-4 systemd: Created slice user-26.slice.
Nov 20 21:29:05 ip-10-0-0-4 systemd: Starting Session c4 of user postgres.
Nov 20 21:29:05 ip-10-0-0-4 systemd: Started Session c4 of user postgres.
Nov 20 21:29:30 ip-10-0-0-4 crmd[2042]: notice: process_lrm_event: LRM operation pgsql_notify_0 (call=17, rc=0, cib-update=0, confirmed=true) ok
Nov 20 21:29:30 ip-10-0-0-4 crmd[2042]: notice: te_rsc_command: Initiating action 1: stop pgsql_stop_0 on pcmk-1 (local)
Nov 20 21:29:30 ip-10-0-0-4 pacemakerd[2464]: notice: crm_add_logfile: Additional logging available in /var/log/pacemaker.log
Nov 20 21:29:30 ip-10-0-0-4 su: (to postgres) root on none
Nov 20 21:29:30 ip-10-0-0-4 systemd: Created slice user-26.slice.
Nov 20 21:29:30 ip-10-0-0-4 systemd: Starting Session c5 of user postgres.
Nov 20 21:29:30 ip-10-0-0-4 systemd: Started Session c5 of user postgres.

Software versions:
                pacemaker 1.1.10
                resource-agents 3.9.5
                corosync 2.3.3-2

Has anyone else experienced this issue or know of what might be going wrong to cause new sessions to be created?

Thanks,
Brendan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.clusterlabs.org/pipermail/pacemaker/attachments/20141120/93af1d7e/attachment-0002.html>


More information about the Pacemaker mailing list