From 0feee7a7b8ea05750e620a5c90e9d4cb150aec2d Mon Sep 17 00:00:00 2001 From: mxi1 Date: Wed, 25 Aug 2010 03:08:52 +0000 Subject: [PATCH] update the sleep time from 20+random%30 to random%50; and if it can not get the litefile table or litetree table from xCATd on the management node, it will fail into shell, and also echo one error message git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7216 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- .../xcat/netboot/add-on/statelite/rc.statelite | 18 ++++++++---------- .../add-on/statelite/rc.statelite.ppc.redhat | 15 +++++++-------- 2 files changed, 15 insertions(+), 18 deletions(-) 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 83997adf9..0abbad38d 100755 --- a/xCAT-server/share/xcat/netboot/add-on/statelite/rc.statelite +++ b/xCAT-server/share/xcat/netboot/add-on/statelite/rc.statelite @@ -76,8 +76,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 \ @@ -94,11 +93,11 @@ GetSyncInfo () { # the file is empty, we should retry several times RETRY=$(( $RETRY+1 )) if [ $RETRY -eq $MAX_RETRIES ]; then - break + echo "FATAL error: could not get the entries from litefile table..." + /bin/bash fi - SLI=$(( $RANDOM%30 )) - SLI=$(( $SLI+20 )) + SLI=$(( $RANDOM%50 )) sleep $SLI xCATCmd $XCATSERVER litefile \ @@ -113,8 +112,7 @@ GetSyncInfo () { # files will now be inside /.snapshot/tmpfs/synclist in the form: # options path - SLI=$(( $RANDOM%30 )) - SLI=$(( $SLI + 20 )) + SLI=$(( $RANDOM%50 )) sleep $SLI xCATCmd $XCATSERVER litetree \ @@ -129,11 +127,11 @@ GetSyncInfo () { # the file is empty, we should retry several times RETRY=$(( $RETRY + 1 )) if [ $RETRY -eq $MAX_RETRIES ]; then - break + echo "FATAL error: could not get the entries from litetree table..." + /bin/bash fi - SLI=$(( $RAMDOM % 30 )) - SLI=$(( $SLI + 20 )) + SLI=$(( $RAMDOM % 50 )) sleep $SLI xCATCmd $XCATSERVER litetree \ | sed -e 's/<[^>]*>//g' \ 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 842a2c983..c2ef315f7 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 @@ -80,11 +80,11 @@ GetSyncInfo () { # the file is empty, we should retry several times RETRY=$(( $RETRY+1 )) if [ $RETRY -eq $MAX_RETRIES ]; then - break + echo "FATAL error: could not get the entries from litefile table..." + /bin/bash fi - SLI=$(( $RANDOM%30 )) - SLI=$(( $SLI+20 )) + SLI=$(( $RANDOM%50 )) sleep $SLI xCATCmd $XCATSERVER litefile \ @@ -99,8 +99,7 @@ GetSyncInfo () { # files will now be inside /.snapshot/tmpfs/synclist in the form: # options path - SLI=$(( $RANDOM%30 )) - SLI=$(( $SLI + 20 )) + SLI=$(( $RANDOM%50 )) sleep $SLI xCATCmd $XCATSERVER litetree \ @@ -115,11 +114,11 @@ GetSyncInfo () { # the file is empty, we should retry several times RETRY=$(( $RETRY + 1 )) if [ $RETRY -eq $MAX_RETRIES ]; then - break + echo "FATAL error: could not get the entries from litetree table..." + /bin/bash fi - SLI=$(( $RAMDOM % 30 )) - SLI=$(( $SLI + 20 )) + SLI=$(( $RAMDOM % 50 )) sleep $SLI xCATCmd $XCATSERVER litetree \ | sed -e 's/<[^>]*>//g' \