[pgpool-general: 1369] Re: watchdog enabled delegate_IP on multiple nodes simultaneously

Lonni J Friedman netllama at gmail.com
Wed Feb 6 06:00:57 JST 2013


On Thu, Jan 31, 2013 at 10:18 PM, Yugo Nagata <nagata at sraoss.co.jp> wrote:
> Hello Lonni,
>
> On Fri, 2 Nov 2012 13:17:24 +0900
> Yugo Nagata <nagata at sraoss.co.jp> wrote:
>
>> I guess the situation you said is as follows.
>>
>> 1. Detach all the nodes from each pgpool using pcp_detach_node etc.
>> 2. Attach a node to each pgpool using pcp_attach_node etc.
>>  -> Both pgpools bring up the virtual IP.
>>
>> If so, this is a restriction of watchdog functionality, and is not bug.
>>
>> (see Restictions in
>>  http://www.pgpool.net/docs/latest/pgpool-en.html#watchdog )
>>
>> If all the nodes is detached from pgpool, you have to restart the pgpool.
>>
>> # The situation of raw mode you reported previously is a bug. I'll fix it.
>
> Sorry for delay. I attached a patch resolving the split-brain problem
> (situation that there are multiple pgpool holding delegate IP).
> Could you try it?
>
> In this fix, when once all backend DB nodes are detached from pgpool (by
> pcp_detach_node or DB server down etc.), the pgpool goes to DOWN status
> until this is restarted. The pgpool in DOWN status cannot escalate to
> delegate IP holder, so split-brain situation is avoided. All the pgpool
> in DOWN status should be restarted to recover correct status.

This patch doesn't seem to apply cleanly to wd_lifecheck.c from
pgpool-3.2.1.  I get the following rejected hunk:

--- watchdog/wd_lifecheck.c
+++ watchdog/wd_lifecheck.c
@@ -159,20 +159,6 @@
                        pool_debug("wd_lifecheck: OK, status: %d", p->status);

                        p->life = pool_config->wd_life_point;
-                       if ((i == 0) &&
-                               (WD_List->status == WD_DOWN))
-                       {
-                               wd_set_myself(&tv, WD_NORMAL);
-                               wd_startup();
-                               /* check existence of master pgpool */
-                               if (wd_is_alive_master() == NULL )
-                               {
-
pool_debug("wd_is_alive_master: there isn't any alive master");
-
-                                       /* escalate to delegate_IP holder */
-                                       wd_escalation();
-                               }
-                       }
                }
                else
                {


More information about the pgpool-general mailing list