On Mon, Jan 16, 2012 at 03:10:14PM +0100, Dejan Muhamedagic wrote:
> On Sat, Jan 14, 2012 at 12:32:20PM +0100, Lars Ellenberg wrote:
> > On Mon, Jan 09, 2012 at 05:50:14PM +0100, Dejan Muhamedagic wrote:
> > > Hi Serge,
> > > 
> > > On Mon, Jan 09, 2012 at 09:11:43AM -0700, Serge Dubrouski wrote:
> > > > I did a couple of weeks ago :-)
> > > 
> > > Hmm, me completely missed it. Sorry about that. Will apply the
> > > patch. Many thanks to Junko for the contribution.
> > 
> > Hm. I apparently missed this, too.
> > 
> > -    if [ $? -ne 0 ] || ! echo $output | grep -q '.* has address 
> > '"$OCF_RESKEY_monitor_response"
> > +    if [ $? -ne 0 ] || ! echo $output | egrep -q '.* has |IPv6 address 
> > '"$OCF_RESKEY_monitor_response"
> > 
> > Not good.
> > 
> > Should be
> > +    if [ $? -ne 0 ] || ! echo $output | grep -q '.* \(has\|IPv6\) address 
> > '"$OCF_RESKEY_monitor_response"
> > 
> > Why?
> > Because otherwise, as long as the resonse contains " has ", it
> > would match, and $OCF_RESKEY_monitor_response would be ignored.
> 
> Right.
> 
> > And, using egrep (or grep -E) would also change how
> > $OCF_RESKEY_monitor_response would be interpreted,
> > so could in theory break existing configurations,
> > if they use grep special chars.
> > If you consider this as unlikely, do
> 
> I guess it is.
> 
> > +    if [ $? -ne 0 ] || ! echo $output | grep -q -E '.* (has|IPv6) address 
> > '"$OCF_RESKEY_monitor_response"
> 
> But quoting Junko's example:
> 
> orange.kame.net has address 203.178.141.194
> orange.kame.net has IPv6 address 2001:200:dff:fff1:216:3eff:feb1:44d7
> 
> it should be:
> 
> +    if [ $? -ne 0 ] || ! echo $output | grep -q -E '.* has (IPv6 )? address 
> '"$OCF_RESKEY_monitor_response"
> 
> But I guess that it would be safe to do this as well (and reduce
> probability of regression):
> 
> +    if [ $? -ne 0 ] || ! echo $output | grep -q '.* has .*address 
> '"$OCF_RESKEY_monitor_response"

This is what I applied today. Please speak up if there are any
objections.

Thanks,

Dejan

> Cheers,
> 
> Dejan
> 
> P.S. And many thanks for taking a closer look!
> 
> > > Thanks,
> > > 
> > > Dejan
> > > 
> > > >  On Jan 9, 2012 8:00 AM, "Dejan Muhamedagic" <[email protected]> wrote:
> > > > 
> > > > > Hi Junko-san,
> > > > >
> > > > > On Tue, Dec 13, 2011 at 04:32:07PM +0900, Junko IKEDA wrote:
> > > > > > Hi Serge,
> > > > > >
> > > > > > We are now investigating the support status of ocf RAs,
> > > > > > and this is the issue for named.
> > > > > >
> > > > > > Here is the example output of host command;
> > > > > >
> > > > > > # host www.kame.net
> > > > > > www.kame.net is an alias for orange.kame.net.
> > > > > > orange.kame.net has address 203.178.141.194
> > > > > > orange.kame.net has IPv6 address 
> > > > > > 2001:200:dff:fff1:216:3eff:feb1:44d7
> > > > > >
> > > > > > named_monitor() searches its named server with
> > > > > $OCF_RESKEY_monitor_response.
> > > > > > I'm not familiar with named's behavior,
> > > > > > is it possible to set IPv6 to $OCF_RESKEY_monitor_response?
> > > > > > If $OCF_RESKEY_monitor_response has IPv6 address,
> > > > > > the following syntax can not hit the result, right?
> > > > >
> > > > > The patch looks OK to me. Serge, can you also ack please?
> > > > >
> > > > > Cheers,
> > > > >
> > > > > Dejan
> > > > >
> > > > > > named_monitor()
> > > > > >
> > > > > > output=`$OCF_RESKEY_host $OCF_RESKEY_monitor_request
> > > > > $OCF_RESKEY_monitor_ip`
> > > > > > if [ $? -ne 0 ] || ! echo $output | grep -q '.* has address
> > > > > > '"$OCF_RESKEY_monitor_response"
> > > > > >
> > > > > > Would you please give me some advice?
> > > > > >
> > > > > > Regards,
> > > > > > Junko IKEDA
> > > > > >
> > > > > > NTT DATA INTELLILINK CORPORATION
> > > > >
> > > > >
> > > > > > _______________________________________________________
> > > > > > 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/
> > > > >
> > > 
> > > > _______________________________________________________
> > > > 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® and LINBIT® 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/
> _______________________________________________________
> 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/

Reply via email to