kdump on sles supports mutiple nodes crash at the same time

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@13112 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
xq2005 2012-06-16 01:41:46 +00:00
parent 64716ca324
commit 45d573dc72

View File

@ -100,10 +100,22 @@ if [ ! -z "$DUMP" ]; then
if [ "$KDPROTO" = "nfs" ]; then
if (pmatch $OSVER "sles*") || (pmatch $OSVER "suse*") || [ -f /etc/SuSE-release ]; then
KDPATH=${KDPATH//\//\\\/}
KDPATH="nfs:\/\/${KDIP}${KDPATH}"
sed -i "s/^KDUMP_SAVEDIR=.*$/KDUMP_SAVEDIR=\"${KDPATH}\"/" /etc/sysconfig/kdump
sed -i "s/^KDUMP_COPY_KERNEL=.*$/KDUMP_COPY_KERNEL=no/" /etc/sysconfig/kdump
KDTEMPPATH=${KDPATH//\//\\\/}
KDTEMPPATH="nfs:\/\/${KDIP}${KDTEMPPATH}\/${NODE}"
sed -i "s/^KDUMP_SAVEDIR=.*$/KDUMP_SAVEDIR=\"${KDTEMPPATH}\"/" /etc/sysconfig/kdump
sed -i "s/^KDUMP_COPY_KERNEL=.*$/KDUMP_COPY_KERNEL=\"no\"/" /etc/sysconfig/kdump
sed -i "s/^KDUMP_PRESCRIPT=.*$/KDUMP_PRESCRIPT=\"\/tmp\/createdir\"/" /etc/sysconfig/kdump
sed -i "s/^KDUMP_REQUIRED_PROGRAMS=.*$/KDUMP_REQUIRED_PROGRAMS=\"\/tmp\/createdir\"/" /etc/sysconfig/kdump
TEMPDELAY=$(($RANDOM%30))
#work around for the kdump on sles 11.2
echo "/bin/mkdir -p /root/tmp/" > /tmp/createdir
#following 5 lines is the work around for kdump on multiply nodes
echo "/bin/sleep ${TEMPDELAY}" >> /tmp/createdir
echo "/bin/mount -o nolock ${KDIP}:${KDPATH} /tmp" >> /tmp/createdir
echo "/bin/mkdir -p /tmp/${NODE}" >> /tmp/createdir
echo "/bin/sleep ${TEMPDELAY}" >> /tmp/createdir
echo "/bin/umount /tmp" >> /tmp/createdir
/bin/chmod 777 /tmp/createdir
#change the mount and remount shell scripts' name, workaround for kdump on stateless node
oldmount=`ls /lib/mkinitrd/boot/*-mount.sh`
oldremount=`ls /lib/mkinitrd/boot/*-remount.sh`
@ -121,7 +133,7 @@ if [ ! -z "$DUMP" ]; then
fi
fi
/bin/umount $MOUNTPATH
/bin/umount -l $MOUNTPATH
else
/bin/echo "The kdump server is not configured"
fi