[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-ha-dev
Subject:    Re: [Linux-ha-dev] Re: Bugs in 0.4.9e
From:       Horms <horms () verge ! net ! au>
Date:       2002-11-20 9:21:47
[Download RAW message or body]

On Mon, Nov 18, 2002 at 09:22:18PM -0700, Alan Robertson wrote:
> Horms wrote:
> >On Mon, Nov 18, 2002 at 08:54:33PM -0700, Alan Robertson wrote:
> >
> >>Horms wrote:
> >>
> >>>On Mon, Nov 18, 2002 at 06:58:31PM -0700, Alan Robertson wrote:
> >>
> >>The original piece of code was like this:
> >>
> >>
> >> if
> >>   $IFCONFIG | grep "inet addr:$1 " >/dev/null 2>&1
> >> then
> >>   exit 0      # We already own this IP address
> >> fi
> >>
> >>
> >>After Lorn reworked it, it looked something like this:
> >>
> >> case `ip_status $1` in
> >>    loopback)
> >>      # Remove conflicting hidden loopback IP aliases
> >>      # On Linux before giving up.
> >>      loopback=`find_loopback $1`
> >>      case $loopback in
> >>        lo*)
> >>          ha_log "Removing conflicting hidden loopback alias on 
> >>          $loopback" 
> >>          $IFCONFIG $loopback down
> >>          $ROUTE del -host $1;;
> >>       esac;;
> >>    *unning*)   exit 0;
> >> esac
> >>
> >>The *unning* case replaces the if $IFCONFIG statement in the original 
> >>code. When you reworked Lorn's code, you deleted this check (and didn't 
> >>restore the original one) - leaving only the comment "Do we already 
> >>service this IP address?" without any code to support it.
> >>
> >>Therefore, whenever one tries to add an alias which already exists, it 
> >>tries to go ahead and do it.  This can screw things up.
> >>
> >>Lars states that putting the "if $IFCONFIG" code back inline fixes a 
> >>problem he's having.  It seems to me that he's right to want the check 
> >>back.
> >
> >
> >Ok, I understand. Do you want me to handle this while working on
> >the problem that Lorn has raised (again) or treat it as a separate
> >issue?
> 
> I just want it fixed  - preferably reasonably soon.  If that means 
> separately, then separately.  If you're planning on using a construction 
> like Lorn's original one, and expect to be done sometime in the near 
> future, then it would make sense to combine them.

Hi Alan and others,

It appears that in the course of working with Lorn on the loopback patch
back in August I inadvertantly removed the code that checks to see if
the interface is already up, and quitely exits if it is.

This never came up in my testing because I never considered that case.
In fact I'm not entirely sure how that case can come into being. But it
seems reasonable that it could for a variety of reasons.

I have put the simple check back into ip_start to exit gracefully if an
interface is already configured. This was checked into CVS as version
1.31 of IPaddr.

I am treating the loopback problem that Lorn has raised as a separate,
though related issue.

Sorry for any problems that this error on my part has caused.

-- 
Horms
_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev@lists.community.tummy.com
http://lists.community.tummy.com/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic