[pgpool-general: 2484] Re: wd_escalation_command exit code
Yugo Nagata
nagata at sraoss.co.jp
Fri Jan 24 18:25:52 JST 2014
On Tue, 21 Jan 2014 15:24:02 +0400
Sergey Arlashin <sergeyarl.maillist at gmail.com> wrote:
> Great! Now it is working!
>
> pgpool[31903]: wd_escalation: escalation command failed. exit status: 1
>
> Thank you!
>
> Will this patch be included in 3.3.3 ?
>
> Also, what about failed if_up_cmd and further pgpool behaviour (my second message in the thread.) ?
I attached the patch. Could you try this? In this fix, pgpool outputs a error
message for if_up_cmd failure. This patch should be applied after the previous
patch. This fix will be included in 3.3.3.
In addition, I consider that pgpool shoud go to down status when if_up_cmd fails,
since this is worthless as a member of watchdog cluster. I'll make this fix for
either 3.3.3 or 3.4.0.
>
>
>
> On Jan 21, 2014, at 2:15 PM, Yugo Nagata <nagata at sraoss.co.jp> wrote:
>
> > Hi,
> >
> > On Tue, 21 Jan 2014 13:27:08 +0400
> > Sergey Arlashin <sergeyarl.maillist at gmail.com> wrote:
> >
> >> # cat /etc/pgpool2/pgpool.conf|grep -i esc
> >> wd_escalation_command = '/etc/pgpool2/scripts/escmd.sh'
> >>
> >> # /etc/pgpool2/scripts/escmd.sh
> >> # echo $?
> >> 1
> >>
> >> # /etc/init.d/pgpool2 start
> >> * Starting pgpool-II pgpool [ OK ]
> >>
> >> /var/log/postgresql/pgpool.log:
> >> Jan 21 09:28:52 lb-node1 pgpool[4858]: wd_escalation: escalating to master pgpool
> >> Jan 21 09:28:52 lb-node1 pgpool[4858]: wd_escalation: escalation command failed. error code:
> >> Jan 21 09:28:54 lb-node1 pgpool[4858]: wd_escalation: escalated to master pgpool successfully
> >> Jan 21 09:28:54 lb-node1 pgpool[4858]: wd_init: start watchdog
> >>
> >>
> >> Now it seems pgpool fails to show the exit code correctly.
> >
> > Thanks for your quick review. I attached the fixed patch.
> >
> >>
> >>
> >>
> >> On Jan 21, 2014, at 9:43 AM, Yugo Nagata <nagata at sraoss.co.jp> wrote:
> >>
> >>> Hi,
> >>>
> >>> No, it's not bug.
> >>> pgpool just ignore wd_escalation command's exit code.
> >>>
> >>> However, if you would like the feature, could you try the patch attached?
> >>>
> >>>
> >>> On Mon, 20 Jan 2014 23:29:15 +0400
> >>> Sergey Arlashin <sergeyarl.maillist at gmail.com> wrote:
> >>>
> >>>> Hi!
> >>>>
> >>>> When wd_escalation_command fails with exit code '1' pgpool does not log any errors. It logs the following messages instead:
> >>>>
> >>>> pgpool[3384]: wd_escalation: escalating to master pgpool
> >>>> pgpool[3384]: wd_escalation: escalated to master pgpool successfully
> >>>>
> >>>> Is it a bug?
> >>>>
> >>>> --
> >>>> Best regards,
> >>>> Sergey Arlashin
> >>>> _______________________________________________
> >>>> pgpool-general mailing list
> >>>> pgpool-general at pgpool.net
> >>>> http://www.pgpool.net/mailman/listinfo/pgpool-general
> >>>
> >>>
> >>> --
> >>> Yugo Nagata <nagata at sraoss.co.jp>
> >>> <excalation_cmd.patch>
> >>
> >
> >
> > --
> > Yugo Nagata <nagata at sraoss.co.jp>
> > <escalation_command.patch>
>
--
Yugo Nagata <nagata at sraoss.co.jp>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ifup_error.patch
Type: text/x-diff
Size: 3862 bytes
Desc: not available
URL: <http://www.pgpool.net/pipermail/pgpool-general/attachments/20140124/84a32b2d/attachment.bin>
More information about the pgpool-general
mailing list