<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:宋体;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:等线;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:"\@宋体";
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:"\@等线";
panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:宋体;
color:black;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
pre
{mso-style-priority:99;
mso-style-link:"HTML 预设格式 字符";
margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:宋体;
color:black;}
p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:12.0pt;
font-family:宋体;
color:black;}
span.HTML
{mso-style-name:"HTML 预设格式 字符";
mso-style-priority:99;
mso-style-link:"HTML 预设格式";
font-family:"Courier New";
color:black;}
span.EmailStyle20
{mso-style-type:personal-reply;
font-family:等线;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body bgcolor="white" lang="ZH-CN" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US">Thank you, Klaus. There is no fencing device in our network according to the request. Is there any other way to configure the cluster to make it work?
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:等线;color:windowtext"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:等线;color:windowtext">发件人<span lang="EN-US">:</span></span></b><span lang="EN-US" style="font-size:11.0pt;font-family:等线;color:windowtext"> Klaus Wenninger [mailto:kwenning@redhat.com]
<br>
</span><b><span style="font-size:11.0pt;font-family:等线;color:windowtext">发送时间<span lang="EN-US">:</span></span></b><span lang="EN-US" style="font-size:11.0pt;font-family:等线;color:windowtext"> 2018</span><span style="font-size:11.0pt;font-family:等线;color:windowtext">年<span lang="EN-US">5</span>月<span lang="EN-US">7</span>日<span lang="EN-US">
14:40<br>
</span><b>收件人<span lang="EN-US">:</span></b><span lang="EN-US"> Cluster Labs - All topics related to open-source clustering welcomed <users@clusterlabs.org>;
</span>范国腾<span lang="EN-US"> <fanguoteng@highgo.com><br>
</span><b>主题<span lang="EN-US">:</span></b><span lang="EN-US"> Re: [ClusterLabs] The slave not does not promote to master<o:p></o:p></span></span></p>
</div>
</div>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<div>
<p class="MsoNormal"><span lang="EN-US">On 05/07/2018 07:39 AM, </span>范国腾<span lang="EN-US"> wrote:<o:p></o:p></span></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<pre><span lang="EN-US">Hi,<o:p></o:p></span></pre>
<pre><span lang="EN-US"><o:p> </o:p></span></pre>
<pre><span lang="EN-US">We have two nodes cluster using PAF to manage the postgres. Node2 is master. Master/Slave Set: pgsql-ha [pgsqld]<o:p></o:p></span></pre>
<pre><span lang="EN-US"> Master: [sds2]<o:p></o:p></span></pre>
<pre><span lang="EN-US"> Slaves: [ sds1 ]<o:p></o:p></span></pre>
<pre><span lang="EN-US"><o:p> </o:p></span></pre>
<pre><span lang="EN-US">In the master node(sds2), I remove the data directory of postgres. I expect the master nodes(sds2) stop and the slave node(sds1) is promoted to master. <o:p></o:p></span></pre>
<pre><span lang="EN-US">The sds2 log show that is executes monitor->notify->demote->notify->stop. The sds1 log also show " Promote pgsqld:0#011(Slave -> Master sds1)". But the "pcs status" shows the status like the following. Could you please help check what prevents the promotion happen in sds1? What should I do if I want to recovery the system?<o:p></o:p></span></pre>
</blockquote>
<p class="MsoNormal"><span lang="EN-US"><br>
Didn't check all detail but looks as if stopping the resource would<br>
fail. So that it doesn't know the state on sds2 and thus can't <br>
promote on sds1.<br>
If you had enabled fencing this would lead to sds2 being fenced<br>
so that sds1 can take over.<br>
<br>
As digimer would say: "use fencing!"<br>
<br>
Regards,<br>
Klaus<br>
<br>
<br>
<o:p></o:p></span></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<pre><span lang="EN-US"><o:p> </o:p></span></pre>
<pre><span lang="EN-US"><o:p> </o:p></span></pre>
<pre><span lang="EN-US">2 nodes configured<o:p></o:p></span></pre>
<pre><span lang="EN-US">3 resources configured<o:p></o:p></span></pre>
<pre><span lang="EN-US">Online: [ sds1 sds2 ]<o:p></o:p></span></pre>
<pre><span lang="EN-US">Full list of resources:<o:p></o:p></span></pre>
<pre><span lang="EN-US"> Master/Slave Set: pgsql-ha [pgsqld]<o:p></o:p></span></pre>
<pre><span lang="EN-US"> pgsqld (ocf::heartbeat:pgsqlms): FAILED Master sds2 (blocked)<o:p></o:p></span></pre>
<pre><span lang="EN-US"> Slaves: [ sds1 ]<o:p></o:p></span></pre>
<pre><span lang="EN-US"> Resource Group: mastergroup<o:p></o:p></span></pre>
<pre><span lang="EN-US"> master-vip (ocf::heartbeat:IPaddr2): Started sds2<o:p></o:p></span></pre>
<pre><span lang="EN-US">Failed Actions:<o:p></o:p></span></pre>
<pre><span lang="EN-US">* pgsqld_stop_0 on sds2 'invalid parameter' (2): call=42, status=complete, exitreason='PGDATA "/home/highgo/highgo/database/4.3.1/data" does not exists',<o:p></o:p></span></pre>
<pre><span lang="EN-US"> last-rc-change='Mon May 7 00:39:06 2018', queued=1ms, exec=72ms<o:p></o:p></span></pre>
<pre><span lang="EN-US"><o:p> </o:p></span></pre>
<pre><span lang="EN-US"><o:p> </o:p></span></pre>
<pre><span lang="EN-US"><o:p> </o:p></span></pre>
<pre><span lang="EN-US">Here is the sds2 log:<o:p></o:p></span></pre>
<pre><span lang="EN-US">May 7 00:38:46 node2 pgsqlms(pgsqld)[14000]: INFO: Execute action monitor and the result 8<o:p></o:p></span></pre>
<pre><span lang="EN-US">May 7 00:38:56 node2 pgsqlms(pgsqld)[14077]: INFO: Execute action monitor and the result 8<o:p></o:p></span></pre>
<pre><span lang="EN-US">May 7 00:39:06 node2 pgsqlms(pgsqld)[14152]: ERROR: PGDATA "/home/highgo/highgo/database/4.3.1/data" does not exists<o:p></o:p></span></pre>
<pre><span lang="EN-US">May 7 00:39:06 node2 lrmd[1126]: notice: pgsqld_monitor_10000:14152:stderr [ ocf-exit-reason:PGDATA "/home/highgo/highgo/database/4.3.1/data" does not exists ]<o:p></o:p></span></pre>
<pre><span lang="EN-US">May 7 00:39:06 node2 crmd[1129]: notice: sds2-pgsqld_monitor_10000:36 [ ocf-exit-reason:PGDATA "/home/highgo/highgo/database/4.3.1/data" does not exists\n ]<o:p></o:p></span></pre>
<pre><span lang="EN-US">May 7 00:39:06 node2 pgsqlms(pgsqld)[14162]: ERROR: PGDATA "/home/highgo/highgo/database/4.3.1/data" does not exists<o:p></o:p></span></pre>
<pre><span lang="EN-US">May 7 00:39:06 node2 lrmd[1126]: notice: pgsqld_notify_0:14162:stderr [ ocf-exit-reason:PGDATA "/home/highgo/highgo/database/4.3.1/data" does not exists ]<o:p></o:p></span></pre>
<pre><span lang="EN-US">May 7 00:39:06 node2 crmd[1129]: notice: Result of notify operation for pgsqld on sds2: 0 (ok)<o:p></o:p></span></pre>
<pre><span lang="EN-US">May 7 00:39:06 node2 crmd[1129]: notice: sds2-pgsqld_monitor_10000:36 [ ocf-exit-reason:PGDATA "/home/highgo/highgo/database/4.3.1/data" does not exists\n ]<o:p></o:p></span></pre>
<pre><span lang="EN-US">May 7 00:39:06 node2 pgsqlms(pgsqld)[14172]: ERROR: PGDATA "/home/highgo/highgo/database/4.3.1/data" does not exists<o:p></o:p></span></pre>
<pre><span lang="EN-US">May 7 00:39:06 node2 lrmd[1126]: notice: pgsqld_demote_0:14172:stderr [ ocf-exit-reason:PGDATA "/home/highgo/highgo/database/4.3.1/data" does not exists ]<o:p></o:p></span></pre>
<pre><span lang="EN-US">May 7 00:39:06 node2 crmd[1129]: notice: Result of demote operation for pgsqld on sds2: 2 (invalid parameter)<o:p></o:p></span></pre>
<pre><span lang="EN-US">May 7 00:39:06 node2 crmd[1129]: notice: sds2-pgsqld_demote_0:39 [ ocf-exit-reason:PGDATA "/home/highgo/highgo/database/4.3.1/data" does not exists\n ]<o:p></o:p></span></pre>
<pre><span lang="EN-US">May 7 00:39:06 node2 pgsqlms(pgsqld)[14182]: ERROR: PGDATA "/home/highgo/highgo/database/4.3.1/data" does not exists<o:p></o:p></span></pre>
<pre><span lang="EN-US">May 7 00:39:06 node2 lrmd[1126]: notice: pgsqld_notify_0:14182:stderr [ ocf-exit-reason:PGDATA "/home/highgo/highgo/database/4.3.1/data" does not exists ]<o:p></o:p></span></pre>
<pre><span lang="EN-US">May 7 00:39:06 node2 crmd[1129]: notice: Result of notify operation for pgsqld on sds2: 0 (ok)<o:p></o:p></span></pre>
<pre><span lang="EN-US">May 7 00:39:06 node2 pgsqlms(pgsqld)[14192]: ERROR: PGDATA "/home/highgo/highgo/database/4.3.1/data" does not exists<o:p></o:p></span></pre>
<pre><span lang="EN-US">May 7 00:39:06 node2 lrmd[1126]: notice: pgsqld_notify_0:14192:stderr [ ocf-exit-reason:PGDATA "/home/highgo/highgo/database/4.3.1/data" does not exists ]<o:p></o:p></span></pre>
<pre><span lang="EN-US">May 7 00:39:06 node2 crmd[1129]: notice: Result of notify operation for pgsqld on sds2: 0 (ok)<o:p></o:p></span></pre>
<pre><span lang="EN-US">May 7 00:39:06 node2 pgsqlms(pgsqld)[14202]: ERROR: PGDATA "/home/highgo/highgo/database/4.3.1/data" does not exists<o:p></o:p></span></pre>
<pre><span lang="EN-US">May 7 00:39:06 node2 lrmd[1126]: notice: pgsqld_stop_0:14202:stderr [ ocf-exit-reason:PGDATA "/home/highgo/highgo/database/4.3.1/data" does not exists ]<o:p></o:p></span></pre>
<pre><span lang="EN-US">May 7 00:39:06 node2 crmd[1129]: notice: Result of stop operation for pgsqld on sds2: 2 (invalid parameter)<o:p></o:p></span></pre>
<pre><span lang="EN-US">May 7 00:39:06 node2 crmd[1129]: notice: sds2-pgsqld_stop_0:42 [ ocf-exit-reason:PGDATA "/home/highgo/highgo/database/4.3.1/data" does not exists\n ]<o:p></o:p></span></pre>
<pre><span lang="EN-US">May 7 00:40:01 node2 systemd: Started Session 4 of user root.<o:p></o:p></span></pre>
<pre><span lang="EN-US">May 7 00:40:01 node2 systemd: Starting Session 4 of user root.<o:p></o:p></span></pre>
<pre><span lang="EN-US">May 7 00:47:21 node2 pacemakerd[1063]: notice: Caught 'Terminated' signal<o:p></o:p></span></pre>
<pre><span lang="EN-US">May 7 00:47:21 node2 systemd: Stopping Pacemaker High Availability Cluster Manager...<o:p></o:p></span></pre>
<pre><span lang="EN-US">May 7 00:47:21 node2 pacemakerd[1063]: notice: Shutting down Pacemaker<o:p></o:p></span></pre>
<pre><span lang="EN-US">May 7 00:47:21 node2 pacemakerd[1063]: notice: Stopping crmd<o:p></o:p></span></pre>
<pre><span lang="EN-US">May 7 00:47:21 node2 crmd[1129]: notice: Caught 'Terminated' signal<o:p></o:p></span></pre>
<pre><span lang="EN-US">May 7 00:47:21 node2 crmd[1129]: notice: Shutting down cluster resource manager<o:p></o:p></span></pre>
<pre><span lang="EN-US"><o:p> </o:p></span></pre>
<pre><span lang="EN-US">Here is the sds1 log</span>(<span lang="EN-US">in the attachment</span>)<span lang="EN-US"><o:p></o:p></span></pre>
<pre><span lang="EN-US">May 7 00:38:47 node1 pgsqlms(pgsqld)[4426]: INFO: Execute action monitor and the result 0May 7 00:39:03 node1 pgsqlms(pgsqld)[4442]: INFO: Execute action monitor and the result 0May 7 00:39:06 node1 crmd[1133]: notice: State transition S_IDLE -> S_POLICY_ENGINEMay 7 00:39:06 node1 pengine[1132]: warning: Processing failed op monitor for pgsqld:1 on sds2: invalid parameter (2)May 7 00:39:06 node1 pengine[1132]: error: Preventing pgsql-ha from re-starting on sds2: operation monitor failed 'invalid parameter' (2)May 7 00:39:06 node1 pengine[1132]: notice: Promote pgsqld:0#011(Slave -> Master sds1)May 7 00:39:06 node1 pengine[1132]: notice: Demote pgsqld:1#011(Master -> Stopped sds2)May 7 00:39:06 node1 pengine[1132]: notice: Move master-vip#011(Started sds2 -> sds1)May 7 00:39:06 node1 pengine[1132]: notice: Calculated transition 31, saving inputs in /var/lib/pacemaker/pengine/pe-input-97.bz2May 7 00:39:06 node1 pengine[1132]: warning: Processing failed op monitor for pgsqld:1 on sds2: invalid parameter (2)May 7 00:39:06 node1 pengine[1132]: error: Preventing pgsql-ha from re-starting on sds2: operation monitor failed 'invalid parameter' (2)May 7 00:39:06 node1 pengine[1132]: notice: Promote pgsqld:0#011(Slave -> Master sds1)May 7 00:39:06 node1 pengine[1132]: notice: Demote pgsqld:1#011(Master -> Stopped sds2)May 7 00:39:06 node1 pengine[1132]: notice: Move master-vip#011(Started sds2 -> sds1)May 7 00:39:06 node1 pengine[1132]: notice: Calculated transition 32, saving inputs in /var/lib/pacemaker/pengine/pe-input-98.bz2May 7 00:39:06 node1 crmd[1133]: notice: Initiating cancel operation pgsqld_monitor_16000 locally on sds1May 7 00:39:06 node1 crmd[1133]: notice: Initiating notify operation pgsqld_pre_notify_demote_0 locally on sds1May 7 00:39:06 node1 crmd[1133]: notice: Initiating notify operation pgsqld_pre_notify_demote_0 on sds2<o:p></o:p></span></pre>
<p class="MsoNormal"><span lang="EN-US"><br>
<br>
<br>
<o:p></o:p></span></p>
<pre><span lang="EN-US">_______________________________________________<o:p></o:p></span></pre>
<pre><span lang="EN-US">Users mailing list: <a href="mailto:Users@clusterlabs.org">Users@clusterlabs.org</a><o:p></o:p></span></pre>
<pre><span lang="EN-US"><a href="https://lists.clusterlabs.org/mailman/listinfo/users">https://lists.clusterlabs.org/mailman/listinfo/users</a><o:p></o:p></span></pre>
<pre><span lang="EN-US"><o:p> </o:p></span></pre>
<pre><span lang="EN-US">Project Home: <a href="http://www.clusterlabs.org">http://www.clusterlabs.org</a><o:p></o:p></span></pre>
<pre><span lang="EN-US">Getting started: <a href="http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf">http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf</a><o:p></o:p></span></pre>
<pre><span lang="EN-US">Bugs: <a href="http://bugs.clusterlabs.org">http://bugs.clusterlabs.org</a><o:p></o:p></span></pre>
</blockquote>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
</div>
</body>
</html>