[Linux-ha-dev] IPaddr2 gives a spurious warning on stop

Aníbal Monsalve Salazar anibal at sgi.com
Sun Mar 4 23:25:44 MST 2007


Hello,

The following problem was reported by Russell Coker.

The below message occurs on stderr when the IPaddr2 script which is part of the
heartbeat package is stopped (IE removing a single IP address from an interface).
It seems that on start it adds /32 to the end of the address, so it needs to do
the same on stop.

2007/03/02_15:19:07 INFO: /sbin/ip -f inet addr delete 192.168.0.2 dev eth0
Warning: Executing wildcard deletion to stay compatible with old scripts.
         Explicitly specify the prefix length (192.168.0.2/32) to avoid this warning.
         This special behaviour is likely to disappear in further releases,
         fix your scripts!

I created the following patch to fix this bug.

--- resources/OCF/IPaddr2.in~	2007-01-12 13:57:08.000000000 +1100
+++ resources/OCF/IPaddr2.in	2007-03-05 16:29:41.797530093 +1100
@@ -380,7 +380,7 @@
 	ipaddr="$1"
 	iface="$2"
 
-	CMD="$IP2UTIL -f inet addr delete $ipaddr dev $iface"
+	CMD="$IP2UTIL -f inet addr delete $ipaddr/32 dev $iface"
 
 	ocf_log info "$CMD"
 	$CMD

Aníbal


More information about the Linux-HA-Dev mailing list