On Fri, Mar 26, 2010 at 10:45:01AM +0100, Dejan Muhamedagic wrote:
> Hi,
>
> On Thu, Mar 25, 2010 at 08:26:36PM +0100, Lars Ellenberg wrote:
> >
> > IPaddr2, on stop, if it just removed the last IPv4 address, does
> > ip link set down
>
> The part "if it just removed the last IPv4 address" I can't see
> in the code. But I can see a bug at lines 390-391. And I don't
> exactly understand what's going on there.
this part:
CMD="$IP2UTIL -o -f inet addr show $iface"
ocf_log info "$CMD"
ADDR=`$CMD`
if [ $? -ne 0 -o ! -z "$ADDR" ]; then
return $?
fi
CMD="$IP2UTIL link set $iface down"
ocf_log info "$CMD"
$CMD
is roughly equivalent to
test -n "$(ip -o -f inet a s dev ethX)" || ip link set ethX down
which is
"is there an ipv4 address left on that interface? No -> down it"
> > What is the rational behind that?
>
> Can't say, but I guess that it was there to bring the interface
> back to the state in which it was before the start command. Or
> the assumed state since it's not possible to know with certainty.
>
> > I see a problem with this, if we have IPv6 addresses on that link
> > as well.
>
> OK. Funny thing it's been there ever since.
Probably no one uses ipv6 addresses _and_ "cluster" ipv4 addresses
_without_ at least one non-cluster ipv4 address on the same link (yet).
I did not hit this in the real world either,
it just occurred to me during a review of that agent.
> > I understand full well that IPaddr2 on start does a "ip link set up".
> > The "down" on stop however serves no purpose I can see,
> > but may cause harm.
> >
> > I suggest to just remove it.
> >
> > What am I missing?
> > Opinons?
>
> Looks like we should remove it.
Ok.
--
: 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/