[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Linux-cluster] Netmask bit set to 32 in service ip



On Wed, 2008-02-13 at 12:33 +0200, Pavlos Parissis wrote:
> Hi,
> 
> I have a question which may sounds stupid.
> why the netmask for the service ip is set to 32 while the IP belongs  
> to a network with different netmask?
> 
> Regards,
> Pavlos
> 
> 
> : bond0: <BROADCAST,MULTICAST,MASTER,UP> mtu 1500 qdisc noqueue
>      link/ether 00:19:bb:3b:6c:b1 brd ff:ff:ff:ff:ff:ff
>      inet 10.10.21.133/26 brd 10.10.21.191 scope global bond0
>      inet 10.10.21.138/32 scope global bond0 <<================= service ip
> 3: bond1: <BROADCAST,MULTICAST,MASTER,UP> mtu 1500 qdisc noqueue
>      link/ether 00:1a:4b:ff:9c:e8 brd ff:ff:ff:ff:ff:ff
>      inet 10.10.21.69/27 brd 10.10.21.95 scope global bond1
>      inet 10.10.21.71/32 scope global bond1 <<================= service ip
> 4: bond2: <BROADCAST,MULTICAST,MASTER,UP> mtu 1500 qdisc noqueue
>      link/ether 00:1a:4b:ff:9c:ea brd ff:ff:ff:ff:ff:ff
>      inet 10.10.21.228/27 brd 10.10.21.255 scope global bond2
> 5: eth0: <BROADCAST,MULTICAST,SLAVE,UP> mtu 1500 qdisc pfifo_fast  
> master bond0 qlen 1000
>      link/ether 00:19:bb:3b:6c:b1 brd ff:ff:ff:ff:ff:ff
> 6: eth1: <BROADCAST,MULTICAST,SLAVE,UP> mtu 1500 qdisc pfifo_fast  
> master bond0 qlen 1000
>      link/ether 00:19:bb:3b:6c:b1 brd ff:ff:ff:ff:ff:ff
> 7: eth2: <BROADCAST,MULTICAST,SLAVE,UP> mtu 1500 qdisc pfifo_fast  
> master bond1 qlen 1000
>      link/ether 00:1a:4b:ff:9c:e8 brd ff:ff:ff:ff:ff:ff
> 8: eth3: <BROADCAST,MULTICAST,SLAVE,UP> mtu 1500 qdisc pfifo_fast  
> master bond1 qlen 1000
>      link/ether 00:1a:4b:ff:9c:e8 brd ff:ff:ff:ff:ff:ff
> 9: eth4: <BROADCAST,MULTICAST,SLAVE,UP> mtu 1500 qdisc pfifo_fast  
> master bond2 qlen 1000
>      link/ether 00:1a:4b:ff:9c:ea brd ff:ff:ff:ff:ff:ff
> 10: eth5: <BROADCAST,MULTICAST,SLAVE,UP> mtu 1500 qdisc pfifo_fast  
> master bond2 qlen 1000
>      link/ether 00:1a:4b:ff:9c:ea brd ff:ff:ff:ff:ff:ff
> 11: eth6: <BROADCAST,MULTICAST> mtu 1500 qdisc noop qlen 1000
>      link/ether 00:19:bb:3b:18:38 brd ff:ff:ff:ff:ff:ff
> 12: eth7: <BROADCAST,MULTICAST> mtu 1500 qdisc noop qlen 1000
>      link/ether 00:19:bb:3b:18:3a brd ff:ff:ff:ff:ff:ff
> ocsi2# grep ' 10.10.21.138' /etc/cluster/cluster.conf
> ocsi2# grep '10.10.21.138' /etc/cluster/cluster.conf
>        <ip monitor_link="1" address="10.10.21.138"/>

Strange that the netmask is wrong.  You can force it to the correct one
by doing:

    <ip monitor_link="1" address="10.10.21.138/26"/>

Or, you could apply the attached patch:

    cd /usr/share/cluster; patch -p0 < /tmp/fs.sh-netmask.patch

... and see if it helps you.  If it doesn't, you can revert the patch:

    cd /usr/share/cluster; patch -Rp0 < /tmp/fs.sh-netmask.patch

-- Lon
Index: ip.sh
===================================================================
RCS file: /cvs/cluster/cluster/rgmanager/src/resources/ip.sh,v
retrieving revision 1.5.2.17
diff -u -r1.5.2.17 ip.sh
--- ip.sh	22 Mar 2007 23:15:59 -0000	1.5.2.17
+++ ip.sh	13 Feb 2008 18:28:12 -0000
@@ -692,6 +692,10 @@
 			if [ $? -ne 0 ]; then
 				continue
 			fi
+
+			if [ "${addr/\/*/}" = "${addr}" ]; then
+				addr="$addr/$maskbits"
+			fi
 			ocf_log info "Adding IPv4 address $addr to $dev"
 		fi
 		if [ "$1" = "del" ]; then

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]