<div dir="ltr">Hi,<div><br></div><div>i am trying to run postgresql cluster with streaming replication using pgsql RA and pacemaker ..</div><div>i succeded once, master was as PRI, slave HS:sync, failover worked as it should (slave become master) .. </div>
<div>but after some tests something went wrong and i don&#39;t know what and why and how to get it back working ... now when i start crm, master is PRI, but slave gets into HS:ASYNC state .. and when master fails, and slave gets into HS:alone state</div>
<div><br></div><div>can somebody please give me hint what should i do or what should i look for?</div><div><br></div><div>Thanks a lot for any help</div><div>Tomas</div><div><br></div><div>my configuration:</div><div><br>
</div><div><div>node jboss-test \</div><div>        attributes pgsql-data-status=&quot;LATEST&quot;</div><div>node jboss-test2 \</div><div>        attributes pgsql-data-status=&quot;STREAMING|ASYNC&quot;</div><div>primitive pgsql ocf:heartbeat:pgsql \</div>
<div>        params pgctl=&quot;/opt/postgres/9.3/bin/pg_ctl&quot; psql=&quot;/opt/postgres/9.3/bin/psql&quot; pgdata=&quot;/opt/postgres/9.3/data/&quot; rep_mode=&quot;sync&quot; node_list=&quot;jboss-test jboss-test2&quot; restore_command=&quot;cp /opt/postgres/9.3/data/pg_archive/%f %p&quot; primary_conninfo_opt=&quot;keepalives_idle=60 keepalives_interval=5 keepalives_count=5&quot; master_ip=&quot;172.16.111.120&quot; stop_escalate=&quot;0&quot; \</div>
<div>        op start interval=&quot;0s&quot; timeout=&quot;60s&quot; on-fail=&quot;restart&quot; \</div><div>        op stop interval=&quot;0s&quot; timeout=&quot;60s&quot; on-fail=&quot;block&quot; \</div><div>        op monitor interval=&quot;11s&quot; timeout=&quot;60s&quot; on-fail=&quot;restart&quot; \</div>
<div>        op monitor interval=&quot;10s&quot; role=&quot;Master&quot; timeout=&quot;60s&quot; on-fail=&quot;restart&quot; \</div><div>        op promote interval=&quot;0s&quot; timeout=&quot;60s&quot; on-fail=&quot;restart&quot; \</div>
<div>        op demote interval=&quot;0s&quot; timeout=&quot;60s&quot; on-fail=&quot;block&quot; \</div><div>        op notify interval=&quot;0s&quot; timeout=&quot;60s&quot;</div><div>primitive pingCheck ocf:pacemaker:ping \</div>
<div>        params name=&quot;default_ping_set&quot; host_list=&quot;172.16.0.1&quot; multiplier=&quot;100&quot; \</div><div>        op start interval=&quot;0s&quot; timeout=&quot;60s&quot; on-fail=&quot;restart&quot; \</div>
<div>        op monitor interval=&quot;2s&quot; timeout=&quot;60s&quot; on-fail=&quot;restart&quot; \</div><div>        op stop interval=&quot;0s&quot; timeout=&quot;60s&quot; on-fail=&quot;ignore&quot;</div><div>primitive vip-master ocf:heartbeat:IPaddr2 \</div>
<div>        params ip=&quot;172.16.111.110&quot; nic=&quot;eth0&quot; cidr_netmask=&quot;24&quot; \</div><div>        op start interval=&quot;0s&quot; timeout=&quot;60s&quot; on-fail=&quot;restart&quot; \</div><div>        op monitor interval=&quot;10s&quot; timeout=&quot;60s&quot; on-fail=&quot;restart&quot; \</div>
<div>        op stop interval=&quot;0s&quot; timeout=&quot;60s&quot; on-fail=&quot;block&quot;</div><div>primitive vip-rep ocf:heartbeat:IPaddr2 \</div><div>        params ip=&quot;172.16.111.120&quot; nic=&quot;eth0&quot; cidr_netmask=&quot;24&quot; \</div>
<div>        meta migration-threshold=&quot;0&quot; \</div><div>        op start interval=&quot;0s&quot; timeout=&quot;60s&quot; on-fail=&quot;stop&quot; \</div><div>        op monitor interval=&quot;10s&quot; timeout=&quot;60s&quot; on-fail=&quot;restart&quot; \</div>
<div>        op stop interval=&quot;0s&quot; timeout=&quot;60s&quot; on-fail=&quot;block&quot;</div><div>primitive vip-slave ocf:heartbeat:IPaddr2 \</div><div>        params ip=&quot;172.16.111.111&quot; nic=&quot;eth0&quot; cidr_netmask=&quot;24&quot; \</div>
<div>        meta resource-stickiness=&quot;1&quot; \</div><div>        op start interval=&quot;0s&quot; timeout=&quot;60s&quot; on-fail=&quot;restart&quot; \</div><div>        op monitor interval=&quot;10s&quot; timeout=&quot;60s&quot; on-fail=&quot;restart&quot; \</div>
<div>        op stop interval=&quot;0s&quot; timeout=&quot;60s&quot; on-fail=&quot;block&quot;</div><div>group master-group vip-master vip-rep \</div><div>        meta ordered=&quot;false&quot;</div><div>ms msPostgresql pgsql \</div>
<div>        meta master-max=&quot;1&quot; master-node-max=&quot;1&quot; clone-max=&quot;2&quot; clone-node-max=&quot;1&quot; notify=&quot;true&quot;</div><div>clone clnPingCheck pingCheck</div><div>location rsc_location-1 vip-slave \</div>
<div>        rule $id=&quot;rsc_location-1-rule&quot; 200: pgsql-status eq HS:sync \</div><div>        rule $id=&quot;rsc_location-1-rule-0&quot; 190: pgsql-status eq HS:async \</div><div>        rule $id=&quot;rsc_location-1-rule-1&quot; 100: pgsql-status eq PRI \</div>
<div>        rule $id=&quot;rsc_location-1-rule-2&quot; -inf: not_defined pgsql-status \</div><div>        rule $id=&quot;rsc_location-1-rule-3&quot; -inf: pgsql-status ne HS:sync and pgsql-status ne PRI and pgsql-status ne HS:async</div>
<div>location rsc_location-2 msPostgresql \</div><div>        rule $id=&quot;rsc_location-3-rule&quot; -inf: not_defined default_ping_set or default_ping_set lt 100</div><div>colocation rsc_colocation-1 inf: msPostgresql clnPingCheck</div>
<div>colocation rsc_colocation-2 inf: master-group msPostgresql:Master</div><div>order rsc_order-1 0: clnPingCheck msPostgresql</div><div>order rsc_order-2 0: msPostgresql:promote master-group:start symmetrical=false</div>
<div>order rsc_order-3 0: msPostgresql:demote master-group:stop symmetrical=false</div><div>property $id=&quot;cib-bootstrap-options&quot; \</div><div>        no-quorum-policy=&quot;ignore&quot; \</div><div>        stonith-enabled=&quot;false&quot; \</div>
<div>        crmd-transition-delay=&quot;0s&quot; \</div><div>        dc-version=&quot;1.1.6-9971ebba4494012a93c03b40a2c58ec0eb60f50c&quot; \</div><div>        cluster-infrastructure=&quot;openais&quot; \</div><div>        expected-quorum-votes=&quot;2&quot; \</div>
<div>        last-lrm-refresh=&quot;1389301940&quot;</div></div><div><div>rsc_defaults $id=&quot;rsc-options&quot; \</div><div>        resource-stickiness=&quot;INFINITY&quot; \</div><div>        migration-threshold=&quot;1&quot;</div>
</div><div><br></div><div>crm_mon -Afr:</div><div><div>============</div><div>Last updated: Fri Jan 10 09:46:29 2014</div><div>Last change: Fri Jan 10 09:46:29 2014 by root via crm_attribute on jboss-test</div><div>Stack: openais</div>
<div>Current DC: jboss-test - partition with quorum</div><div>Version: 1.1.6-9971ebba4494012a93c03b40a2c58ec0eb60f50c</div><div>2 Nodes configured, 2 expected votes</div><div>7 Resources configured.</div><div>============</div>
<div><br></div><div>Online: [ jboss-test jboss-test2 ]</div><div><br></div><div>Full list of resources:</div><div><br></div><div> Clone Set: clnPingCheck [pingCheck]</div><div>     Started: [ jboss-test jboss-test2 ]</div>
<div> Master/Slave Set: msPostgresql [pgsql]</div><div>     Masters: [ jboss-test ]</div><div>     Slaves: [ jboss-test2 ]</div><div>vip-slave       (ocf::heartbeat:IPaddr2):       Started jboss-test2</div><div> Resource Group: master-group</div>
<div>     vip-master (ocf::heartbeat:IPaddr2):       Started jboss-test</div><div>     vip-rep    (ocf::heartbeat:IPaddr2):       Started jboss-test</div><div><br></div><div>Node Attributes:</div><div>* Node jboss-test:</div>
<div>    + default_ping_set                  : 100</div><div>    + master-pgsql:0                    : 1000</div><div>    + pgsql-data-status                 : LATEST</div><div>    + pgsql-master-baseline             : 0000000039004DF0</div>
<div>    + pgsql-status                      : PRI</div><div>* Node jboss-test2:</div><div>    + default_ping_set                  : 100</div><div>    + master-pgsql:1                    : -INFINITY</div><div>    + pgsql-data-status                 : STREAMING|ASYNC</div>
<div>    + pgsql-status                      : HS:async</div></div><div><br></div></div>