[pgpool-general: 2497] Re: wd_escalation_command exit code
Sergey Arlashin
sergeyarl.maillist at gmail.com
Wed Jan 29 04:03:20 JST 2014
Hi!
This patch applied successfully. But now a new problem. When I start pgpool service I get a new interface eth0:0 with failover IP address assigned as expected. But when I stop pgpool service eth0:0 won't go down. It remains even after complete shutdown of pgpool.
I tried 3.3.2 without this patch and everything worked well.
On Jan 27, 2014, at 5:18 AM, Yugo Nagata <nagata at sraoss.co.jp> wrote:
> On Sat, 25 Jan 2014 15:31:44 +0400
> Sergey Arlashin <sergeyarl.maillist at gmail.com> wrote:
>
>>
>> On Jan 24, 2014, at 1:25 PM, Yugo Nagata <nagata at sraoss.co.jp> wrote:
>>
>>> 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.
>>
>>
>> Hi!
>>
>> I tried to apply the patch against both 3.3.1 and 3.3.2
>>
>> this is what I got:
>
> Hmm.. Could you try the attached patch to 3.3.2? This includes allthe fix
> for escalation command and ifconfig errors.
>
>>
>> node1:~/pgpool-orig# patch -p1 < /root/op/esc.patch
>>
>> patching file src/watchdog/wd_packet.c
>> Hunk #1 succeeded at 954 (offset 23 lines).
>>
>> node1:~/pgpool-orig# patch -p1 < /root/op/ifup.patch
>>
>> patching file src/watchdog/wd_if.c
>> Hunk #1 succeeded at 42 with fuzz 1 (offset 3 lines).
>> Hunk #2 succeeded at 62 (offset 3 lines).
>> Hunk #3 succeeded at 117 (offset 3 lines).
>> patching file src/watchdog/wd_packet.c
>> Hunk #1 succeeded at 654 (offset 23 lines).
>> Hunk #2 succeeded at 939 (offset 23 lines).
>> Hunk #3 FAILED at 932.
>> Hunk #4 succeeded at 976 (offset 18 lines).
>> 1 out of 4 hunks FAILED -- saving rejects to file src/watchdog/wd_packet.c.rej
>>
>>
>> src/watchdog/wd_packet.c.rej:
>>
>>
>> --- src/watchdog/wd_packet.c
>> +++ src/watchdog/wd_packet.c
>> @@ -932,22 +933,31 @@
>> /* execute escalation command */
>> if (strlen(pool_config->wd_escalation_command))
>> {
>> - int r;
>> r = system(pool_config->wd_escalation_command);
>> if (WIFEXITED(r))
>> {
>> if (WEXITSTATUS(r) == EXIT_SUCCESS)
>> pool_log("wd_escalation: escalation command succeeded");
>> else
>> + {
>> pool_error("wd_escalation: escalation command failed. exit status: %d", WEXITSTATUS(r));
>> + has_error = true;
>> + }
>> }
>> else
>> + {
>> pool_error("wd_escalation: escalation command exit abnormally");
>> + has_error = true;
>> + }
>> }
>>
>> /* interface up as delegate IP */
>> if (strlen(pool_config->delegate_IP) != 0)
>> - wd_IP_up();
>> + {
>> + r = wd_IP_up();
>> + if (r == WD_NG)
>> + has_error = true;
>> + }
>>
>> /* set master status to the wd list */
>> wd_set_wd_list(pool_config->wd_hostname, pool_config->port,
>>
>>
>>>
>>> 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.
>>>
>>>
>>
>> Sounds reasonable.
>>
>>
>>
>>
>
>
> --
> Yugo Nagata <nagata at sraoss.co.jp>
> <escalation_error_all.patch>
More information about the pgpool-general
mailing list