Hi Dejan and Lars,

I send the patch which I revised according to indication of Lars.

>> OK. I guess that this won't introduce a regression. And I guess
>> that sometimes one may need a newline in the test string.
I seemed to surely take such a step in the past.
However, I thought that the tr processing was deleted that load became higher.
Therefore I used the -z option.

Regards,
Tomo

2012年1月14日20:55 Lars Ellenberg <[email protected]>:
> On Fri, Jan 13, 2012 at 06:58:21PM +0100, Dejan Muhamedagic wrote:
>> Hi,
>>
>> On Wed, Dec 14, 2011 at 02:27:56PM +0900, nozawat wrote:
>> > Hi
>> >
>> >  1.apache.patch(Coping of monitor failure)
>> >    When a newline code is included, I fail in a monitor.
>> >    Therefore I coped with a newline code.
>>
>> OK. I guess that this won't introduce a regression. And I guess
>> that sometimes one may need a newline in the test string.
>>
>> >  2.http-mon.sh.patch(IPv6 support)
>> >    When I did wget, I assigned 127.0.0.1 to --bind-address optionally,
>> > but this deleted it now for IPv4.
>> >    Even IPv6 works by doing so it.
>>
>> But this may have adverse effect on existing configurations. For
>> instance, if the configuration specifies a URL which may be
>> accessed from outside, then suddenly a monitor will return
>> success on any node in the cluster. I think that we need a
>> different approach here.
>>
>> Why exactly IPv6 doesn't work?
>
> I think, because:
>
> $ wget -O- -q -L --no-proxy  --bind-address 127.0.0.1 "http://[::1]/";
> does not work.
>
> strace reveals:
> socket(PF_INET6, SOCK_STREAM, IPPROTO_IP) = 3
> bind(3, {sa_family=AF_INET, sin_port=htons(0), 
> sin_addr=inet_addr("127.0.0.1")}, 16) = -1 EINVAL (Invalid argument)
>
> However, this does work:
> $ wget -O- -q -L --no-proxy  --bind-address ::1 "http://[::1]/"; ; echo $?
>
> So maybe bindaddress should become an option as well?
> Or auto-detect:
> if ip -o -f inet6 a s dev lo | grep -q " ::1/"; then
>        # alternatively, to not be linux specific, ifconfig lo | grep ...
>        # in case the output is actually reliably grep-able accross OSes.
>        bind_address="::1"
> else
>        bind_address="127.0.0.1"
> fi
>
> Because, at least as long as net.ipv6.bindv6only = 0,
> binding to ::1 works for http://127.0.0.1 as well.
>
>> Thanks,
>>
>> Dejan
>>
>> > Regards,
>> > Tomo
>>
>>
>>
>> > _______________________________________________________
>> > Linux-HA-Dev: [email protected]
>> > http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
>> > Home Page: http://linux-ha.org/
>>
>> _______________________________________________________
>> Linux-HA-Dev: [email protected]
>> http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
>> Home Page: http://linux-ha.org/
>
> --
> : Lars Ellenberg
> : LINBIT | Your Way to High Availability
> : DRBD/HA support and consulting http://www.linbit.com
>
> DRBD(R) and LINBIT(R) are registered trademarks of LINBIT, Austria.
> _______________________________________________________
> Linux-HA-Dev: [email protected]
> http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
> Home Page: http://linux-ha.org/

Attachment: http-mon.sh.patch
Description: Binary data

_______________________________________________________
Linux-HA-Dev: [email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/

Reply via email to