From 6daba3107cdbb2c2f15907e799e887d2cbe6f54c Mon Sep 17 00:00:00 2001 From: immarvin Date: Mon, 25 Aug 2014 21:28:21 -0700 Subject: [PATCH] fix defect #4246 In rhel7/p8 env,sometimes cn provision status is failed. --- xCAT/postscripts/xcatinstallpost | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/xCAT/postscripts/xcatinstallpost b/xCAT/postscripts/xcatinstallpost index c0ac65f1c..03fd10b82 100755 --- a/xCAT/postscripts/xcatinstallpost +++ b/xCAT/postscripts/xcatinstallpost @@ -12,6 +12,24 @@ fi SLI=$(awk 'BEGIN{srand(); printf("%d\n",rand()*10)}') sleep $SLI + + +#the nics have not been configured when running the PBS sometimes, need to make sure... +RETRY=0 +until ip -4 --oneline addr show|grep -v 127.0.0.1 >/dev/null +do + sleep 2 + RETRY=$[ $RETRY + 1 ] + if [ $RETRY -eq 15 ];then + logger -t xcat -p local4.err "Network not configured, please check..." + echo `date` "xcatinstallpost: Network not configured, please check..." >> /var/log/xcat/xcat.log + exit 1 + fi + +done + + + cd /xcatpost; PATH=/xcatpost:$PATH export PATH