From 92e781fe74c86469474ce836145f91a8a74c31db Mon Sep 17 00:00:00 2001 From: daniceexi Date: Wed, 12 Dec 2012 07:50:29 +0000 Subject: [PATCH] Fixed the hang issue of reboot/shutdown a nfs-based statelite node git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@14631 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- .../share/xcat/netboot/add-on/statelite/rc.statelite | 4 ++++ xCAT-server/share/xcat/netboot/sles/genimage | 7 ++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/xCAT-server/share/xcat/netboot/add-on/statelite/rc.statelite b/xCAT-server/share/xcat/netboot/add-on/statelite/rc.statelite index 4d39cda22..e9993198e 100755 --- a/xCAT-server/share/xcat/netboot/add-on/statelite/rc.statelite +++ b/xCAT-server/share/xcat/netboot/add-on/statelite/rc.statelite @@ -569,3 +569,7 @@ if grep --quiet --no-messages "Dummy resolv.conf" "$MNTDIR/etc/resolv.conf"; the /bin/cat /etc/resolv.conf > $MNTDIR/etc/resolv.conf fi +# Copy the fake network interface configuration file to /etc/sysconfig/network to handle +# the issue of reboot nfs-based statelite +/bin/cp /tmp/ifcfg-* $MNTDIR/etc/sysconfig/network + diff --git a/xCAT-server/share/xcat/netboot/sles/genimage b/xCAT-server/share/xcat/netboot/sles/genimage index e23820158..3c4e8c237 100755 --- a/xCAT-server/share/xcat/netboot/sles/genimage +++ b/xCAT-server/share/xcat/netboot/sles/genimage @@ -1014,6 +1014,11 @@ while ! ifconfig | grep inet; do sleep 1 netstart \$IFACE done +# Add a fake interface configuration file for the boot interface to skip the +# ifdown of the interface during the reboot/shutdown to skip the fs broken of +# nfs based file system +echo "STARTMODE=nfsroot" > /tmp/ifcfg-\$IFACE + ip addr add dev lo 127.0.0.1/8 ip link set lo up cd / @@ -1288,7 +1293,7 @@ EOMS close($inifile); open($inifile,">"."/tmp/xcatinitrd.$$/bin/netstart"); print $inifile "#!/bin/bash \n"; - print $inifile "dhcpcd \${1}\n"; + print $inifile "dhcpcd \${1} -p\n"; #-- Bring other NICs up in /bin/netstart in initrd for NIC failover foreach (split /,/,$othernics) {