<div dir="ltr">Hi Yugo<br><div class="gmail_extra"><br></div><div class="gmail_extra">Thanks for your valuable input on the patch. Sorry I was mostly away from office in last week, so couldn&#39;t reply to this any earlier.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Please find my response inline.<br><div class="gmail_quote"><br></div><div class="gmail_quote">On Mon, Dec 21, 2015 at 5:10 PM, Yugo Nagata <span dir="ltr">&lt;<a href="mailto:nagata@sraoss.co.jp" target="_blank">nagata@sraoss.co.jp</a>&gt;</span> wrote:</div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hi Usama,<br>
<span class=""><br>
On Thu, 10 Dec 2015 20:29:50 +0500<br>
Muhammad Usama &lt;<a href="mailto:m.usama@gmail.com">m.usama@gmail.com</a>&gt; wrote:<br>
<br>
</span><span class="">&gt; Hi Ishii San<br>
&gt;<br>
&gt; pcp_watchdog_info only gives the information of a single watchdog<br>
&gt; node which might not be enough in some certain situations. And as we are<br>
&gt; currently working on watchdog enhancements so I thought it would be good to<br>
&gt; also enhance the pcp_watchdog_info utility. I have created a patch to add<br>
&gt; a little more information about the watchdog cluster state and nodes in the<br>
&gt; output of pcp_watchdog_info.<br>
&gt;<br>
&gt; Can you please have a look at the attached patch specially for<br>
&gt;<br>
&gt; 1-) If you are good with all the new information shown by pcp_watchdog_info<br>
&gt; utility or you want to add/remove something?<br>
<br>
</span>What is &quot;In Network Error&quot;?  Looking into codes, this stands for the value of<br>
g_cluster.network_error. However, this is not used in watchdog codes, and<br>
I feel this is meanless. In addition, network_error_time is also not used.<br>
<br>
I think it would be good to add delegate_IP and QuorumStatus to<br>
&quot;Watchdog Cluster Information&quot; section in verbose mode.<br>
<br>
In get_node_list_json(), g_cluster.quorum_status is put into jNode, however<br>
update_quorum_status() isn&#39;t called before that. I guess<br>
update_connected_node_count() is called for updating g_cluster.aliveNodeCount.<br>
I think update_quorum_status() is also required to be call similarly.<br>
<br>
I think users can&#39;t understand what &quot;Local Node Escalated&quot; stands for,<br>
that is, what is the different from COORDINATOR status on local node.<br>
It might be better to use &quot;VIP is up on Local Node&quot;, &quot;Local Node has VIP&quot;<br>
and so on....  Alternatively, each Node Information should have VIP holder<br>
or not. This can let users know whether VIP exists in the whole cluster<br>
instead of the local node, and users can notice the problem if VIP doesn&#39;t<br>
exist at any node or if mutiple VIPs exist.<br>
<br>
In non verbose mode, &quot;Master Node Name&quot; is shown by its host name.<br>
However, the host name is not shown at each Node Information section.<br>
Although, user might know &quot;COORDINATOR is the master&quot;, it whould be<br>
good to add host name to each node information section.<br></blockquote><div><br></div><div>All of the above observations are correct and reasonable. I will take care of these. </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
 $ ~/pgpool/bin/pcp_watchdog_info -p 11001<br>
<br>
 2 NO YES Linux_yugo-n-ubuntu_11000<br>
<br>
 [0] localhost 11000 9000 4 COORDINATOR<br>
 [1] localhost 12000 9001 7 STANDBY<br>
<br>
<br>
If there is no master (coordinator), what should be shown at &quot;Master Node Name&quot;?<br>
Or, this situation must not occur?<br></blockquote><div><br></div><div>Yes the with the current implementation of watchdog the cluster must always have a master node so the situation must not happen.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<span class=""><br>
&gt;<br>
&gt; 2-) inform watchdog info in pcp_worker violates the data serialization<br>
&gt; technique used by PCP server for other functions and adopts the JSON data<br>
&gt; formatted load to transmit the watchdog information to the client side.<br>
&gt; Although I am of the point of view that someday we should shift all the<br>
&gt; other functions to use JSON or some other serialization technique which is<br>
&gt; more adaptable and then the current proprietary format. But for the time<br>
&gt; being the watchdog informing part of PCP is different from all other.<br>
&gt;<br>
&gt; with the new pcp_watchdog_info when node ID is given the utility shows the<br>
&gt; information of that specific node while ID =0 means the local watchdog<br>
&gt; node. And when no node ID is provided by user information of all nodes is<br>
&gt; shown<br>
<br>
</span>To be frank, I&#39;m not sure it is good idea to use ID=0 to stand for local<br>
watchdog, because the ID of Nth remote pgpool (other_pgpool_hostnameN in<br>
pgpool.conf) is now N+1 and I think this is slightly misleading. However,<br>
it is a not bad idea to allow pcp_watchdog_info show all nodes information.<br>
<br></blockquote><div><br></div><div>Well, this is correct the new watchdog node ID system might confuse some users because of ID=0 is now reserved for local watchdog node and the remote watchdog nodes will start from id &gt; 0, But the problem here is that we need some ID for the local watchdog node not only for the pcp_watchdog_info utility, but also for the IPC commands (<span style="color:rgb(0,0,0);font-family:Verdana,Arial,Helvetica,sans-serif;font-size:13.3333px;text-align:center;background-color:rgb(238,238,238)">GET NODES LIST, </span><span style="color:rgb(0,0,0);font-family:Verdana,Arial,Helvetica,sans-serif;font-size:13.3333px;text-align:center;background-color:rgb(238,238,238)">NODE STATUS CHANGE and </span><span style="color:rgb(0,0,0);font-family:Verdana,Arial,Helvetica,sans-serif;font-size:13.3333px;text-align:center;background-color:rgb(238,238,238)">NODES LIST DATA</span><span style="color:rgb(0,0,0);font-family:Verdana,Arial,Helvetica,sans-serif;font-size:13.3333px;text-align:center;background-color:rgb(238,238,238)">)</span> that deals with the watchdog node information (used by the external/3rd party health checking system integrating with the watchdog).  So I tried to use the same node ID scheme across the new watchdog (In both IPC commands and pcp_watchdog_info utility) to keep things consistent in the new watchdog.</div><div>I think we can document this particular change to make sure users should not get confused by it or you have some other idea to get around this which we can also use in watchdog IPC command?</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
BTW, when I try to get infromation of Node 1 (1st remote pgpool),<br>
this shows that Node Number is 0. Is &quot;Node Number&quot; is diffrence<br>
with &quot;Node ID&quot;? I feel this is confusable. Is Node Number needed<br>
to be shown rather than Node ID?<br></blockquote><div><br></div><div>I think Node ID would be more appropriate. I will make the change</div><div><br></div><div>Many thanks</div><div>Best regards</div><div>Muhammad Usama </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
$ pcp_watchdog_info -p 11001 -n 1 -v<br>
<br>
Watchdog Cluster Information<br>
Total Nodes         : 2<br>
Remote Nodes        : 1<br>
Alive Remote Nodes  : 1<br>
In Network Error    : NO<br>
Local Node Escalated: YES<br>
Master Node Name    : Linux_yugo-n-ubuntu_11000<br>
<span class=""><br>
Watchdog Node Information<br>
Node Number    : 0<br>
</span>Node Name      : Linux_yugo-n-ubuntu_12000<br>
Host Name      : localhost<br>
Pgpool port    : 12000<br>
<div class=""><div class="h5">Watchdog port  : 9001<br>
Node priority  : 1<br>
status         : 7<br>
status Name    : STANDBY<br>
<br>
<br>
<br>
<br>
&gt;<br>
&gt; --example--<br>
&gt;<br>
&gt; [usama@localhost pgpool]$ bin/pcp_watchdog_info -h localhost -p 9893 -U<br>
&gt; postgres -v<br>
&gt; Password:<br>
&gt; Watchdog Cluster Information<br>
&gt; Total Nodes         : 3<br>
&gt; Remote Nodes        : 2<br>
&gt; Alive Remote Nodes  : 2<br>
&gt; In Network Error    : NO<br>
&gt; Local Node Escalated: NO<br>
&gt; Master Node Name    : Linux_localhost.localdomain_9992<br>
&gt;<br>
&gt; Watchdog Node Information<br>
&gt; Node Number    : 0<br>
&gt; Node Name      : Linux_localhost.localdomain_9993<br>
&gt; Host Name      : localhost<br>
&gt; Pgpool port    : 9993<br>
&gt; Watchdog port  : 9003<br>
&gt; Node priority  : 1<br>
&gt; status         : 7<br>
&gt; status Name    : STANDBY<br>
&gt;<br>
&gt; Node Number    : 1<br>
&gt; Node Name      : Linux_localhost.localdomain_9992<br>
&gt; Host Name      : localhost<br>
&gt; Pgpool port    : 9992<br>
&gt; Watchdog port  : 9002<br>
&gt; Node priority  : 1<br>
&gt; status         : 4<br>
&gt; status Name    : COORDINATOR<br>
&gt;<br>
&gt; Node Number    : 2<br>
&gt; Node Name      : Linux_localhost.localdomain_9991<br>
&gt; Host Name      : localhost<br>
&gt; Pgpool port    : 9991<br>
&gt; Watchdog port  : 9001<br>
&gt; Node priority  : 1<br>
&gt; status         : 7<br>
&gt; status Name    : STANDBY<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; Thanks<br>
&gt; Best regards<br>
&gt; Muhammad Usama<br>
<br>
<br>
</div></div><span class=""><font color="#888888">--<br>
Yugo Nagata &lt;<a href="mailto:nagata@sraoss.co.jp">nagata@sraoss.co.jp</a>&gt;<br>
</font></span></blockquote></div><br></div></div>