<div dir="ltr">Hi!<div>thanks for help .. anyway - my slave node is still async, event the select you mentioned shows async .. at least i found out, that if i set rep_mode to "async", the slave node gets promoted when master fails ... </div>
<div>so right now it is working, but i would like still know how to make streaming replication synchronous .. i did everything as in mentioned wiki page, but it is still async</div><div>any idea?</div><div>Thanks</div><div>
Tomas</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014/1/14 東一彦 <span dir="ltr"><<a href="mailto:higashi.kazuhiko@lab.ntt.co.jp" target="_blank">higashi.kazuhiko@lab.ntt.co.jp</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<div class="im"><br>
<br>
> but after some tests something went wrong and i don'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<br>
</div>
It is PostgreSQL to select the node whether "sync" or "async".<br>
pgsql RA displays a result of the following SQL.<br>
<br>
select application_name,upper(state),<u></u>upper(sync_state) from pg_stat_replication;<br>
<br>
So, at first, please watch PostgreSQL's log.<br>
<br>
<br>
<br>
Possibly the data may become inconsistent.<br>
You can resolve the inconsistency in the following operation.<br>
<br>
<a href="http://clusterlabs.org/wiki/PgSQL_Replicated_Cluster#after_fail-over" target="_blank">http://clusterlabs.org/wiki/<u></u>PgSQL_Replicated_Cluster#<u></u>after_fail-over</a><br>
<br>
<br>
Regards,<br>
Kazuhiko HIGASHI<div><div class="h5"><br>
<br>
(2014/01/10 17:48), Tomáš Vajrauch wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
Hi,<br>
<br>
i am trying to run postgresql cluster with streaming replication using pgsql RA and pacemaker ..<br>
i succeded once, master was as PRI, slave HS:sync, failover worked as it should (slave become master) ..<br>
but after some tests something went wrong and i don'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<br>
<br>
can somebody please give me hint what should i do or what should i look for?<br>
<br>
Thanks a lot for any help<br>
Tomas<br>
<br>
my configuration:<br>
<br>
node jboss-test \<br>
attributes pgsql-data-status="LATEST"<br>
node jboss-test2 \<br>
attributes pgsql-data-status="STREAMING|<u></u>ASYNC"<br>
primitive pgsql ocf:heartbeat:pgsql \<br>
params pgctl="/opt/postgres/9.3/bin/<u></u>pg_ctl" psql="/opt/postgres/9.3/bin/<u></u>psql" pgdata="/opt/postgres/9.3/<u></u>data/" rep_mode="sync" node_list="jboss-test jboss-test2" restore_command="cp /opt/postgres/9.3/data/pg_<u></u>archive/%f %p" primary_conninfo_opt="<u></u>keepalives_idle=60 keepalives_interval=5 keepalives_count=5" master_ip="172.16.111.120" stop_escalate="0" \<br>
op start interval="0s" timeout="60s" on-fail="restart" \<br>
op stop interval="0s" timeout="60s" on-fail="block" \<br>
op monitor interval="11s" timeout="60s" on-fail="restart" \<br>
op monitor interval="10s" role="Master" timeout="60s" on-fail="restart" \<br>
op promote interval="0s" timeout="60s" on-fail="restart" \<br>
op demote interval="0s" timeout="60s" on-fail="block" \<br>
op notify interval="0s" timeout="60s"<br>
primitive pingCheck ocf:pacemaker:ping \<br>
params name="default_ping_set" host_list="172.16.0.1" multiplier="100" \<br>
op start interval="0s" timeout="60s" on-fail="restart" \<br>
op monitor interval="2s" timeout="60s" on-fail="restart" \<br>
op stop interval="0s" timeout="60s" on-fail="ignore"<br>
primitive vip-master ocf:heartbeat:IPaddr2 \<br>
params ip="172.16.111.110" nic="eth0" cidr_netmask="24" \<br>
op start interval="0s" timeout="60s" on-fail="restart" \<br>
op monitor interval="10s" timeout="60s" on-fail="restart" \<br>
op stop interval="0s" timeout="60s" on-fail="block"<br>
primitive vip-rep ocf:heartbeat:IPaddr2 \<br>
params ip="172.16.111.120" nic="eth0" cidr_netmask="24" \<br>
meta migration-threshold="0" \<br>
op start interval="0s" timeout="60s" on-fail="stop" \<br>
op monitor interval="10s" timeout="60s" on-fail="restart" \<br>
op stop interval="0s" timeout="60s" on-fail="block"<br>
primitive vip-slave ocf:heartbeat:IPaddr2 \<br>
params ip="172.16.111.111" nic="eth0" cidr_netmask="24" \<br>
meta resource-stickiness="1" \<br>
op start interval="0s" timeout="60s" on-fail="restart" \<br>
op monitor interval="10s" timeout="60s" on-fail="restart" \<br>
op stop interval="0s" timeout="60s" on-fail="block"<br>
group master-group vip-master vip-rep \<br>
meta ordered="false"<br>
ms msPostgresql pgsql \<br>
meta master-max="1" master-node-max="1" clone-max="2" clone-node-max="1" notify="true"<br>
clone clnPingCheck pingCheck<br>
location rsc_location-1 vip-slave \<br>
rule $id="rsc_location-1-rule" 200: pgsql-status eq HS:sync \<br>
rule $id="rsc_location-1-rule-0" 190: pgsql-status eq HS:async \<br>
rule $id="rsc_location-1-rule-1" 100: pgsql-status eq PRI \<br>
rule $id="rsc_location-1-rule-2" -inf: not_defined pgsql-status \<br>
rule $id="rsc_location-1-rule-3" -inf: pgsql-status ne HS:sync and pgsql-status ne PRI and pgsql-status ne HS:async<br>
location rsc_location-2 msPostgresql \<br>
rule $id="rsc_location-3-rule" -inf: not_defined default_ping_set or default_ping_set lt 100<br>
colocation rsc_colocation-1 inf: msPostgresql clnPingCheck<br>
colocation rsc_colocation-2 inf: master-group msPostgresql:Master<br>
order rsc_order-1 0: clnPingCheck msPostgresql<br>
order rsc_order-2 0: msPostgresql:promote master-group:start symmetrical=false<br>
order rsc_order-3 0: msPostgresql:demote master-group:stop symmetrical=false<br>
property $id="cib-bootstrap-options" \<br>
no-quorum-policy="ignore" \<br>
stonith-enabled="false" \<br>
crmd-transition-delay="0s" \<br>
dc-version="1.1.6-<u></u>9971ebba4494012a93c03b40a2c58e<u></u>c0eb60f50c" \<br>
cluster-infrastructure="<u></u>openais" \<br>
expected-quorum-votes="2" \<br>
last-lrm-refresh="1389301940"<br>
rsc_defaults $id="rsc-options" \<br>
resource-stickiness="INFINITY" \<br>
migration-threshold="1"<br>
<br>
crm_mon -Afr:<br>
============<br>
Last updated: Fri Jan 10 09:46:29 2014<br>
Last change: Fri Jan 10 09:46:29 2014 by root via crm_attribute on jboss-test<br>
Stack: openais<br>
Current DC: jboss-test - partition with quorum<br>
Version: 1.1.6-<u></u>9971ebba4494012a93c03b40a2c58e<u></u>c0eb60f50c<br>
2 Nodes configured, 2 expected votes<br>
7 Resources configured.<br>
============<br>
<br>
Online: [ jboss-test jboss-test2 ]<br>
<br>
Full list of resources:<br>
<br>
Clone Set: clnPingCheck [pingCheck]<br>
Started: [ jboss-test jboss-test2 ]<br>
Master/Slave Set: msPostgresql [pgsql]<br>
Masters: [ jboss-test ]<br>
Slaves: [ jboss-test2 ]<br>
vip-slave (ocf::heartbeat:IPaddr2): Started jboss-test2<br>
Resource Group: master-group<br>
vip-master (ocf::heartbeat:IPaddr2): Started jboss-test<br>
vip-rep (ocf::heartbeat:IPaddr2): Started jboss-test<br>
<br>
Node Attributes:<br>
* Node jboss-test:<br>
+ default_ping_set : 100<br>
+ master-pgsql:0 : 1000<br>
+ pgsql-data-status : LATEST<br>
+ pgsql-master-baseline : 0000000039004DF0<br>
+ pgsql-status : PRI<br>
* Node jboss-test2:<br>
+ default_ping_set : 100<br>
+ master-pgsql:1 : -INFINITY<br>
+ pgsql-data-status : STREAMING|ASYNC<br>
+ pgsql-status : HS:async<br>
<br>
<br>
<br></div></div>
______________________________<u></u>_________________<br>
Pacemaker mailing list: <a href="mailto:Pacemaker@oss.clusterlabs.org" target="_blank">Pacemaker@oss.clusterlabs.org</a><br>
<a href="http://oss.clusterlabs.org/mailman/listinfo/pacemaker" target="_blank">http://oss.clusterlabs.org/<u></u>mailman/listinfo/pacemaker</a><br>
<br>
Project Home: <a href="http://www.clusterlabs.org" target="_blank">http://www.clusterlabs.org</a><br>
Getting started: <a href="http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf" target="_blank">http://www.clusterlabs.org/<u></u>doc/Cluster_from_Scratch.pdf</a><br>
Bugs: <a href="http://bugs.clusterlabs.org" target="_blank">http://bugs.clusterlabs.org</a><br>
<br>
</blockquote>
<br>
<br>
-- <br>
------------------------------<u></u>----------------------<br>
東 一彦<br>
NTT OSSセンタ 基盤技術ユニット 高信頼担当<br>
(SV総研 ソフトウェアイノベーションセンタ OSS推進PJ)<br>
<a href="mailto:Mail%3Ahigashi.kazuhiko@lab.ntt.co.jp" target="_blank">Mail:higashi.kazuhiko@lab.ntt.<u></u>co.jp</a><br>
Tel :03-5860-5135<br>
〒108-8019 東京都港区港南1-9-1 NTT品川TWINSビル11階<br>
------------------------------<u></u>----------------------<br>
<br>
______________________________<u></u>_________________<br>
Pacemaker mailing list: <a href="mailto:Pacemaker@oss.clusterlabs.org" target="_blank">Pacemaker@oss.clusterlabs.org</a><br>
<a href="http://oss.clusterlabs.org/mailman/listinfo/pacemaker" target="_blank">http://oss.clusterlabs.org/<u></u>mailman/listinfo/pacemaker</a><br>
<br>
Project Home: <a href="http://www.clusterlabs.org" target="_blank">http://www.clusterlabs.org</a><br>
Getting started: <a href="http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf" target="_blank">http://www.clusterlabs.org/<u></u>doc/Cluster_from_Scratch.pdf</a><br>
Bugs: <a href="http://bugs.clusterlabs.org" target="_blank">http://bugs.clusterlabs.org</a><br>
</blockquote></div><br></div>