2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-29 09:13:08 +00:00

fix defect #4739 [fvt]2.10:still have debug info in ubuntu compute node's xcat log without xcatdebugmode set;fix defect #4745 [FVT]updatenode return some err message when postcripts having parameters

This commit is contained in:
immarvin 2015-07-15 02:48:15 -04:00
parent 3554ee345b
commit 8607edffce
3 changed files with 17 additions and 12 deletions

View File

@ -155,10 +155,15 @@ run_ps () {
local logfile=\"/var/log/xcat/xcat.log\"
if [ -f \$1 ]; then
msgutil_r \"\$MASTER_IP\" \"info\" "\"\`date\` Running postscript: \$@\"" \"\$logfile\"
bash -x ./\$@ 2>&1 | tee -a \$logfile
ret_local=\${PIPESTATUS[0]}
msgutil_r \"\$MASTER_IP\" \"info\" "\"\`date\` postscript \$@ return with \$ret_local\"" \"\$logfile\"
msgutil_r \"\$MASTER_IP\" \"info\" "\"\`date\` Running postscript: \$*\"" \"\$logfile\"
if [ \"\$XCATDEBUGMODE\" = \"1\" ]; then
bash -x ./\$@ 2>&1 | tee -a \$logfile
ret_local=\${PIPESTATUS[0]}
else
./\$@ 2>&1 | tee -a \$logfile
ret_local=\${PIPESTATUS[0]}
fi
msgutil_r \"\$MASTER_IP\" \"info\" "\"\`date\` postscript \$* return with \$ret_local\"" \"\$logfile\"
if [ \"\$ret_local\" -ne \"0\" ]; then
return_value=\$ret_local
fi

View File

@ -140,7 +140,7 @@ run_ps () {
local logfile=\"/var/log/xcat/xcat.log\"
if [ -f \$1 ]; then
msgutil_r \"\$MASTER_IP\" \"info\" "\"\`date\` Running postscript: \$@\"" \"\$logfile\"
msgutil_r \"\$MASTER_IP\" \"info\" "\"\`date\` Running postscript: \$*\"" \"\$logfile\"
if [ \"\$XCATDEBUGMODE\" = \"1\" ]; then
bash -x ./\$@ 2>&1 | tee -a \$logfile
ret_local=\${PIPESTATUS[0]}
@ -148,7 +148,7 @@ run_ps () {
./\$@ 2>&1 | tee -a \$logfile
ret_local=\${PIPESTATUS[0]}
fi
msgutil_r \"\$MASTER_IP\" \"info\" "\"\`date\` postscript \$@ return with \$ret_local\"" \"\$logfile\"
msgutil_r \"\$MASTER_IP\" \"info\" "\"\`date\` postscript \$* return with \$ret_local\"" \"\$logfile\"
if [ \"\$ret_local\" -ne \"0\" ]; then
return_value=\$ret_local
fi

View File

@ -259,7 +259,7 @@ fi
xcatpost="/xcatpost"
# Check for debug mode and you have nodename available you can change the path for debug
echolog "debug" "running $0 $@"
echolog "debug" "running $0 $*"
if [ -n "$XCATDEBUG" ]; then
@ -827,8 +827,8 @@ run_ps () {
logfile=\"/var/log/xcat/xcat.log\"
if [ -f \$1 ]; then
echo \"\`date\` Running postscript: \$@\"
msgutil_r \$MASTER_IP \"debug\" \"\`date\` Running postscript: \$@\" \"\$logfile\"
echo \"\`date\` Running postscript: \$*\"
msgutil_r \$MASTER_IP \"debug\" \"\`date\` Running postscript: \$*\" \"\$logfile\"
if [ \"\$XCATDEBUGMODE\" = \"1\" ]; then
bash -x ./\$@ 2>&1 | tee -a \$logfile
ret_local=\${PIPESTATUS[0]}
@ -840,11 +840,11 @@ run_ps () {
if [ \"\$ret_local\" -ne \"0\" ]; then
return_value=\$ret_local
fi
echo \"Postscript: \$@ exited with code \$ret_local\"
msgutil_r \$MASTER_IP \"debug\" \"\`date\` Postscript: \$@ exited with code \$ret_local\" \"\$logfile\"
echo \"Postscript: \$* exited with code \$ret_local\"
msgutil_r \$MASTER_IP \"debug\" \"\`date\` Postscript: \$* exited with code \$ret_local\" \"\$logfile\"
else
echo \"\`date\` Postscript \$1 does NOT exist.\"
msgutil_r \$MASTER_IP \"debug\" \"\`date\` Postscript: \$@ exited with code \$ret_local\" \"\$logfile\"
msgutil_r \$MASTER_IP \"debug\" \"\`date\` Postscript: \$* exited with code \$ret_local\" \"\$logfile\"
return_value=-1
fi