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

Yugo Nagata nagata at sraoss.co.jp
Wed Feb 6 11:02:12 JST 2013


On Tue, 5 Feb 2013 13:00:57 -0800
Lonni J Friedman <netllama at gmail.com> wrote:

> 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:

Could you please apply this patch, after applying the patch attached in
[pgpool-general: 1356] fixing segfaults on Fedora17.

If it doesn't work well, try to use patch command.

 $ patch < patch.file

Or, you can try the snapshot on git repogitory which is available from here.

http://git.postgresql.org/gitweb/?p=pgpool2.git;a=snapshot;h=a19a49dedddddbd0d3f60f1309daeba724ca1a28;sf=tgz


> 
> --- 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
>                 {


-- 
Yugo Nagata <nagata at sraoss.co.jp>


More information about the pgpool-general mailing list