<p dir="ltr">Hi list,</p>
<p dir="ltr">I am facing a very strange issue.<br>
I have setup a postgresql cluster (with streaming repl).<br>
The replication works ok when started manually but the RA seems to never promote any host where the resource is started.</p>
<p dir="ltr">I am running pacemaker 1.12 on centos 6.6 (and I added crmsh from an opensuse repo, as I am used to it)</p>
<p dir="ltr">my config is bellow:<br>
node <a href="http://pp-obm-sgbd.upond.fr">pp-obm-sgbd.upond.fr</a><br>
node <a href="http://pp-obm-sgbd2.upond.fr">pp-obm-sgbd2.upond.fr</a> \<br>
attributes pri_pgsql-data-status=DISCONNECT<br>
primitive pri_obm-locator lsb:obm-locator \<br>
params \<br>
op start interval=0s timeout=60s \<br>
op stop interval=0s timeout=60s \<br>
op monitor interval=10s timeout=20s<br>
primitive pri_pgsql pgsql \<br>
params pgctl="/usr/pgsql-9.1/bin/pg_ctl" psql="/usr/pgsql-9.1/bin/psql" pgdata="/var/lib/pgsql/9.1/data/" node_list="<a href="http://pp-obm-sgbd.upond.fr">pp-obm-sgbd.upond.fr</a> <a href="http://pp-obm-sgbd2.upond.fr">pp-obm-sgbd2.upond.fr</a>" repuser=replication rep_mode=sync restart_on_promote=true restore_command="cp /var/lib/pgsql/replication/%f %p" primary_conninfo_opt="keepalives_idle=60 keepalives_interval=5 keepalives_count=5" master_ip=193.50.151.200 \<br>
op start interval=0 on-fail=restart timeout=120s \<br>
op monitor interval=20s on-fail=restart timeout=60s \<br>
op monitor interval=15s on-fail=restart role=Master timeout=60s \<br>
op promote interval=0 on-fail=restart timeout=120s \<br>
op demote interval=0 on-fail=stop timeout=120s \<br>
op notify interval=0s timeout=60s \<br>
op stop interval=0 on-fail=block timeout=120s<br>
primitive pri_vip IPaddr2 \<br>
params ip=193.50.151.200 nic=eth1 cidr_netmask=32 \<br>
op start interval=0s timeout=60s \<br>
op monitor interval=10s timeout=60s \<br>
op stop interval=0s timeout=60s<br>
ms ms_pgsql pri_pgsql \<br>
meta master-max=1 master-node-max=1 clone-max=2 clone-node-max=1<br>
colocation clc_vip-ms_pgsql inf: pri_vip:Started ms_pgsql:Master<br>
order ord_dm_pgsql-vip 0: ms_pgsql:demote pri_vip:stop<br>
order ord_pm_pgsql-vip 0: ms_pgsql:promote pri_vip:start symmetrical=false<br>
property cib-bootstrap-options: \<br>
dc-version=1.1.11-97629de \<br>
cluster-infrastructure=cman \<br>
last-lrm-refresh=1424459378 \<br>
no-quorum-policy=ignore \<br>
stonith-enabled=false \<br>
maintenance-mode=false<br>
rsc_defaults rsc_defaults-options: \<br>
resource-stickiness=1000 \<br>
migration-threshold=5</p>
<p dir="ltr">crm_mon shows both hosts as slaves and none is never promoted ever:</p>
<p dir="ltr">Master/Slave Set: ms_pgsql [pri_pgsql]<br>
Slaves: [ <a href="http://pp-obm-sgbd.upond.fr">pp-obm-sgbd.upond.fr</a> <a href="http://pp-obm-sgbd2.upond.fr">pp-obm-sgbd2.upond.fr</a> ]<br>
Node Attributes:<br>
* Node <a href="http://pp-obm-sgbd.upond.fr">pp-obm-sgbd.upond.fr</a>:<br>
+ master-pri_pgsql : 1000<br>
+ pri_pgsql-status : HS:alone <br>
+ pri_pgsql-xlog-loc : 000000002D000078<br>
* Node <a href="http://pp-obm-sgbd2.upond.fr">pp-obm-sgbd2.upond.fr</a>:<br>
+ master-pri_pgsql : -INFINITY <br>
+ pri_pgsql-data-status : DISCONNECT<br>
+ pri_pgsql-status : HS:alone <br>
+ pri_pgsql-xlog-loc : 000000002D000000</p>
<p dir="ltr">on the host I am expecting promotion I see when doing cleanups:<br>
Feb 20 20:15:07 pp-obm-sgbd pgsql(pri_pgsql)[30994]: INFO: Master does not exist.<br>
Feb 20 20:15:07 pp-obm-sgbd pgsql(pri_pgsql)[30994]: INFO: My data status=.</p>
<p dir="ltr">And on the other node I see the following logs that sounds interrseting:<br>
Feb 20 20:16:10 pp-obm-sgbd2 crmd[19626]: notice: print_synapse: [Action 18]: Pending pseudo op ms_pgsql_promoted_0 on N/A (priority: 1000000, waiting: 11)<br>
Feb 20 20:16:10 pp-obm-sgbd2 crmd[19626]: notice: print_synapse: [Action 17]: Pending pseudo op ms_pgsql_promote_0 on N/A (priority: 0, waiting: 21)</p>
<p dir="ltr">the N/A part seems to tell me the cluster don't know where to promote the resource but I can't understand why.</p>
<p dir="ltr">bellow are my constraint rules:</p>
<p dir="ltr">pcs constraint show <br>
Location Constraints:<br>
Ordering Constraints:<br>
demote ms_pgsql then stop pri_vip (score:0)<br>
promote ms_pgsql then start pri_vip (score:0) (non-symmetrical)<br>
Colocation Constraints:<br>
pri_vip with ms_pgsql (score:INFINITY) (rsc-role:Started) (with-rsc-role:Master)</p>
<p dir="ltr">I am now out of ideas so any help is very much appreciated.</p>
<p dir="ltr">Regards.</p>