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

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



Quoting Lon Hohberger <lhh redhat com>:

On Thu, 2008-02-14 at 02:59 +0200, Pavlos Parissis wrote:

ocsi2# patch -p0 <  /tmp/ip.sh-netmask.patch
patching file ip.sh

That's strange - it worked great for me.  Could you run:

   rg_test rules &> /tmp/foo.out

Look at /tmp/foo.out for a line that says:

   "Error storing ip: Duplicate"

If you see that, try cleaning up /usr/share/cluster.  Look for files
like:

   /usr/share/cluster/ip.sh~
   /usr/share/cluster/ip.rpm*
ocsi1# cd /usr/share/cluster/
ocsi1# ls -sl ip.*
20 -rwxr-xr-x  1 root root 18248 Aug  2  2006 ip.sh
ocsi1# cp -p ip.sh /root/ip.sh-ORIGINAL
ocsi1# grep -A 1 -B 4 '10.10.21.138' /etc/cluster/cluster.conf
<service domain="FirstDomain" name="ppr1" autostart="1" recovery="relocate">
      <script name="ppr1" file="/usr/local/wsb/scripts/rhc_ppr1"/>
      <ip monitor_link="1" address="10.10.21.71"/>
<fs device="/dev/sdd1" mountpoint="/usr/omg_ppr" force_unmount="1" name="/usr/omg_ppr" fstype="ext3"/>
      <ip monitor_link="1" address="10.10.21.138"/>
    </service>
ocsi1#  ip add sh|grep  -B 3 '10.10.21.138'
    link/ether 00:19:bb:3b:ac:89 brd ff:ff:ff:ff:ff:ff
    inet 10.10.21.132/26 brd 10.10.21.191 scope global bond0
    inet 10.10.21.142/32 scope global bond0
    inet 10.10.21.138/32 scope global bond0

ocsi1# cat /tmp/ip.sh-netmask.patch
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
ocsi1# patch -p0 <  /tmp/ip.sh-netmask.patch
patching file ip.sh
ocsi1# clusvcadm -R ppr1
Member ocsi1-cluster trying to restart ppr1...success
ocsi1#  ip add sh|grep  -B 3 '10.10.21.138'
    link/ether 00:19:bb:3b:ac:89 brd ff:ff:ff:ff:ff:ff
    inet 10.10.21.132/26 brd 10.10.21.191 scope global bond0
    inet 10.10.21.142/32 scope global bond0
    inet 10.10.21.138/26 scope global secondary bond0

It works now and I know why it didn't work before.
The last time I saved a copy of the ip.sh under /usr/share/cluster, reading you comment bellow I can guess that the backup file was used and not the patched file, even the backup file had a name ip.sh-bak.

I am sorry but I did expect from the cluster to pick up the backup file.
I should haven't saved the backup file under the same directory.

Thanks for your help.





If there are any of these, you need to chmod -x them or remove them.  In
later versions, we will ignore some obvious ones (.rpm*, for example).

-- Lon

--
Linux-cluster mailing list
Linux-cluster redhat com
https://www.redhat.com/mailman/listinfo/linux-cluster






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