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. > 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. > 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. Cheers, Dejan > Lars > > > How to reproduce... > > # ( ip -o a s dev eth3 ; > OCF_ROOT=/usr/lib/ocf \ > OCF_RESKEY_ip=192.168.145.2 \ > OCF_RESKEY_nic=eth3 \ > OCF_RESKEY_cidr_netmask=255.255.255.0 \ > bash -vx /usr/lib/ocf/resource.d/heartbeat/IPaddr2 stop ; > ip -o a s dev eth3 ; > OCF_ROOT=/usr/lib/ocf \ > OCF_RESKEY_ip=192.168.145.2 \ > OCF_RESKEY_nic=eth3 \ > OCF_RESKEY_cidr_netmask=255.255.255.0 \ > bash -vx /usr/lib/ocf/resource.d/heartbeat/IPaddr2 start ; > ip -o a s dev eth3 > ) 2>&1 | tee -a IPaddr2.debug.log > > # grep -e "^[0-9]\+:" -e "^. ip link set" IPaddr2.debug.log > 4: eth3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP > qlen 1000\ link/ether 00:1b:21:23:95:5e brd ff:ff:ff:ff:ff:ff > 4: eth3 inet 192.168.145.2/24 brd 192.168.145.255 scope global eth3 > 4: eth3 inet6 fe80::21b:21ff:fe23:955e/64 scope link \ valid_lft > forever preferred_lft forever > > both ipv4 and ipv6 address running fine. > > + ip link set eth3 down > 4: eth3: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast state DOWN qlen > 1000\ link/ether 00:1b:21:23:95:5e brd ff:ff:ff:ff:ff:ff > > Doh. Link down. > > + ip link set eth3 up > 4: eth3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP > qlen 1000\ link/ether 00:1b:21:23:95:5e brd ff:ff:ff:ff:ff:ff > 4: eth3 inet 192.168.145.2/24 brd 192.168.145.255 scope global eth3 > 4: eth3 inet6 fe80::21b:21ff:fe23:955e/64 scope link tentative \ > valid_lft forever preferred_lft forever > > There, link is back, > and the ipv6 link scope address will soon leave the tentative state. > > This was just an example. > _______________________________________________________ > 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/
