Hi Dejan

2012/1/31 Dejan Muhamedagic <de...@suse.de>:
> Hi Keisuke-san,
(...)
> On Tue, Jan 31, 2012 at 08:46:35PM +0900, Keisuke MORI wrote:
>> The current RA will try to check the top page (http://localhost:80)
>> as the default behavior if you have not enabled server-status in httpd.conf
>> and it would fail to start even for the apache's default test page:)
>
> Hmm, the current RA would produce an error for that URL:
>
> 488     case $STATUSURL in
> 489         http://*/*) ;;
> 490         *)
> 491         ocf_log err "Invalid STATUSURL $STATUSURL"
> 492         exit $OCF_ERR_ARGS ;;
> 493     esac

Strange. That URL is generated by the RA itself.

apache-conf.sh:
   119  buildlocalurl() {
   120    [ "x$Listen" != "x" ] &&
   121          echo "http://${Listen}"; ||
   122          echo "${LOCALHOST}:${PORT}"


Probably we should relax the validation pattern, as just 'http://*' ?





>
>> I agree that an user should change the testregex accordingly when
>> they specify the page to be monitored, but I just wanted to make it work
>> with a default configuration.
>
> Of course.
>
>> >> As for the regular expression like ^ or $, it looks like working as
>> >> expected with -z option in my quick tests.
>> >> Do you have any examples that it may break the configuration?
>> >
>> > For instance, what I see here in the status page is also a PID at
>> > the beginning of line:
>> >
>> > xen-d:~ # wget -q -O- -L --no-proxy  --bind-address ::1 
>> > http://[::1]/server-status | grep ^PID
>> > PID Key: <br />
>> > xen-d:~ # wget -q -O- -L --no-proxy  --bind-address ::1 
>> > http://[::1]/server-status | grep -z ^PID
>> > xen-d:~ # echo $?
>> > 1
>>
>> Hmm, OK you are right. My test was not enough.
>> (Thanks to Lars for the comprehensive tests in the other mail!)
>>
>> Now I understand that we should not support multiple lines matching
>> so that we can support ^ or $ as testregex in various platforms.
>> It is reasonable.
>>
>>
>> >
>> >> If we should not really support multiple lines matching, then that is
>> >> fine for us too,
>> >> but in that case it would be preferable that the default value of
>> >> testregex is something better
>> >> for a single line matching, like just '</ *html *>'.
>> >> (and also we should mention about it in the meta-data document)
>> >
>> > Hmm, I'd really expect that in case a different page is checked,
>> > then also another test string is specified. After all, shouldn't
>> > that be part of the content, rather than an HTML code which can
>> > occur in any HTTP reply.
>> >
>> > But we could just as well reduce to the default regular
>> > expression to '</ *html *>'. If nobody objects :)
>>
>> Yes.
>
> So, with this the RA will always match any HTML. That should be
> fine for the default.
>
> Cheers,
>
> Dejan
>
>>
>> Regards,
>>
>> --
>> Keisuke MORI
>> _______________________________________________________
>> Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
>> http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
>> Home Page: http://linux-ha.org/
> _______________________________________________________
> Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
> http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
> Home Page: http://linux-ha.org/


Regards,
-- 
Keisuke MORI
_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/

Reply via email to