diff --git a/xCAT-client/share/doc/xCAT-Statelite.odt b/xCAT-client/share/doc/xCAT-Statelite.odt index 26abebe36..7faf0441d 100644 Binary files a/xCAT-client/share/doc/xCAT-Statelite.odt and b/xCAT-client/share/doc/xCAT-Statelite.odt differ diff --git a/xCAT-client/share/doc/xCAT-Statelite.pdf b/xCAT-client/share/doc/xCAT-Statelite.pdf index 2eb630ccb..b2b47862d 100644 Binary files a/xCAT-client/share/doc/xCAT-Statelite.pdf and b/xCAT-client/share/doc/xCAT-Statelite.pdf differ 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 0abbad38d..aaffda33f 100755 --- a/xCAT-server/share/xcat/netboot/add-on/statelite/rc.statelite +++ b/xCAT-server/share/xcat/netboot/add-on/statelite/rc.statelite @@ -122,8 +122,10 @@ GetSyncInfo () { | awk '{print $2}' \ > $SYNCTREE + RETCODE=$? + RETRY=0 - while [ ! -s $SYNCTREE ]; do + while [ ! -s $SYNCTREE ] && [ "$RETCODE" -ne "0" ] ; do # the file is empty, we should retry several times RETRY=$(( $RETRY + 1 )) if [ $RETRY -eq $MAX_RETRIES ]; then @@ -140,6 +142,7 @@ GetSyncInfo () { | awk '{print $2}' \ > $SYNCTREE + RETCODE=$? done } diff --git a/xCAT-server/share/xcat/netboot/add-on/statelite/rc.statelite.ppc.redhat b/xCAT-server/share/xcat/netboot/add-on/statelite/rc.statelite.ppc.redhat index c2ef315f7..d49cfcca8 100755 --- a/xCAT-server/share/xcat/netboot/add-on/statelite/rc.statelite.ppc.redhat +++ b/xCAT-server/share/xcat/netboot/add-on/statelite/rc.statelite.ppc.redhat @@ -9,7 +9,7 @@ # get all the database files. #set -x SL=".statelite" -ME=`hostname -s` +ME=`hostname` MNTDIR="/sysroot" SYNCTREE="${MNTDIR}/$SL/litetree" # the list of directories to sync from SYNCLIST="${MNTDIR}/$SL/litefile" # the list of files to sync @@ -53,7 +53,7 @@ GetSyncInfo () { fi done - hn=`hostname -s` + hn=`hostname` if [ -z $XCATSERVER ]; then @@ -62,8 +62,7 @@ GetSyncInfo () { fi # add one random sleeping time - SLI=$(( $RANDOM%30 )) - SLI=$(( $SLI + 20 )) + SLI=$(( $RANDOM%50 )) sleep $SLI # request the list of files from xCAT: xCATCmd $XCATSERVER litefile \ @@ -109,8 +108,10 @@ GetSyncInfo () { | awk '{print $2}' \ > $SYNCTREE + RETCODE=$? + RETRY=0 - while [ ! -s $SYNCTREE ]; do + while [ ! -s $SYNCTREE ] && [ "$RETCODE" -ne "0" ]; do # the file is empty, we should retry several times RETRY=$(( $RETRY + 1 )) if [ $RETRY -eq $MAX_RETRIES ]; then @@ -118,7 +119,7 @@ GetSyncInfo () { /bin/bash fi - SLI=$(( $RAMDOM % 50 )) + SLI=$(( $RANDOM%50 )) sleep $SLI xCATCmd $XCATSERVER litetree \ | sed -e 's/<[^>]*>//g' \ @@ -127,6 +128,7 @@ GetSyncInfo () { | awk '{print $2}' \ > $SYNCTREE + RETCODE=$? done }