You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafodion.apache.org by db...@apache.org on 2016/06/27 16:49:24 UTC
[1/3] incubator-trafodion git commit: [TRAFODION-2069] Fixed sqcheck
to use TRAF_EXCLUDE_LIST when calculating counts
Repository: incubator-trafodion
Updated Branches:
refs/heads/master 7ad34b175 -> 85ba23365
[TRAFODION-2069] Fixed sqcheck to use TRAF_EXCLUDE_LIST when calculating counts
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/d13776b0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/d13776b0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/d13776b0
Branch: refs/heads/master
Commit: d13776b029da6c78401f70aa2709b283029683c1
Parents: 75aebed
Author: Zalo Correa <za...@esgyn.com>
Authored: Wed Jun 22 12:08:38 2016 -0700
Committer: Zalo Correa <za...@esgyn.com>
Committed: Wed Jun 22 12:08:38 2016 -0700
----------------------------------------------------------------------
core/sqf/sql/scripts/sqcheck | 68 ++++++++++++++++++++++++++++++---------
1 file changed, 53 insertions(+), 15 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/d13776b0/core/sqf/sql/scripts/sqcheck
----------------------------------------------------------------------
diff --git a/core/sqf/sql/scripts/sqcheck b/core/sqf/sql/scripts/sqcheck
index 95b2f95..d1aa0df 100755
--- a/core/sqf/sql/scripts/sqcheck
+++ b/core/sqf/sql/scripts/sqcheck
@@ -33,7 +33,7 @@ function Usage {
echo
echo "Usage: $0 [ -c <cc> | -i <nn> | -d <nn> | -h | -f | -q | -v | -r | -j ]"
echo
- echo "-i <nn> Number of times the check for SQ processes be done (Default $max_checks)"
+ echo "-i <nn> Number of times the check for Trafodion processes be done (Default $max_checks)"
echo "-d <nn> Duration of sleep (in seconds) between each check (Default $sleep_duration)"
echo "-c <cc> Which component to check: [all | dtm | dcs | rms | rest ] (Default $sqck_component)"
echo "-f fast - (it's like running $0 -i 1 -d 0)"
@@ -185,7 +185,7 @@ ft_pair=""
GetOpts $1 $2 $3 $4 $5 $6 $7 $8 $9
if [ $sqc_verbose '==' 1 ]; then
- echo "Max number of times to check the SQ environment: $max_checks, Sleep Duration: $sleep_duration seconds"
+ echo "Max number of times to check the Trafodion environment: $max_checks, Sleep Duration: $sleep_duration seconds"
fi
declare -i num_checks
@@ -199,6 +199,8 @@ declare -i cfg_rms_cnt
declare -i cfg_mxo_cnt
declare -i cfg_lnode_cnt
declare -i cfg_pnode_cnt
+declare -i exc_lnode_cnt
+declare -i exc_pnode_cnt
let act_dtm_cnt=0
let act_rms_cnt=0
@@ -208,6 +210,10 @@ let act_lnode_down_cnt=0
let act_pnode_down_cnt=0
let act_lnode_up_cnt=0
let act_pnode_up_cnt=0
+let cfg_lnode_cnt=0
+let cfg_pnode_cnt=0
+let exc_lnode_cnt=0
+let exc_pnode_cnt=0
let cfg_mxo_cnt=0
let act_mxo_down_cnt=0
@@ -256,23 +262,37 @@ for pnodedn in `cat $sq_tmp_pnode_dn`; do
let ++act_pnode_down_cnt
done
-cfg_lnode_cnt=(act_lnode_up_cnt+act_lnode_down_cnt)
-cfg_pnode_cnt=(act_pnode_up_cnt+act_pnode_down_cnt)
+### EXCLUDED NODEs (assumes 1:1 logical node to physical node mapping)
+sq_exc_node=`mktemp -t`
+echo $TRAF_EXCLUDE_LIST > $sq_exc_node
+for enode in `cat $sq_exc_node`; do
+ let ++exc_lnode_cnt
+ let ++exc_pnode_cnt
+done
+
+if [ $act_lnode_up_cnt '>' 0 ]; then
+ cfg_lnode_cnt=(act_lnode_up_cnt+act_lnode_down_cnt)
+ cfg_pnode_cnt=(act_pnode_up_cnt+act_pnode_down_cnt)
+fi
rm -f $sq_tmp_lnode_up
rm -f $sq_tmp_pnode_up
rm -f $sq_tmp_lnode_dn
rm -f $sq_tmp_pnode_dn
rm -f $sq_tmp_node_info
+rm -f $sq_exc_node
### CONFIGURED DTMs
let cfg_dtm_cnt=`grep -i 'type dtm,' $SQSCRIPT_FILE | wc -l`
+let cfg_dtm_cnt=$cfg_dtm_cnt-$exc_lnode_cnt
sq_tmp_dtms_names=`mktemp -t`
let num_dtms=0
grep -i 'type dtm,' $SQSCRIPT_FILE | grep -o 'name \\\$[A-Za-z]*[0-9]*' | grep -o '\\\$[A-Za-z]*[0-9]*' > $sq_tmp_dtms_names
for dtms in `cat $sq_tmp_dtms_names`; do
- cfg_dtms[num_dtms]=$dtms
- let ++num_dtms
+ if ( [ "$num_dtms" '<' "$cfg_dtm_cnt" ] ); then
+ cfg_dtms[num_dtms]=$dtms
+ let ++num_dtms
+ fi
done
#echo ${cfg_dtms[*]}
rm -f $sq_tmp_dtms_names
@@ -291,14 +311,29 @@ fi
if [[ $SQ_START_RMS == "1" ]]; then
let cfg_sscp_cnt=`grep -i 'exec ' $STARTSSCP_FILE | egrep -i ' mxsscp' | wc -l`
let cfg_ssmp_cnt=`grep -i 'exec ' $STARTSSMP_FILE | egrep -i ' mxssmp' | wc -l`
+ # Adjust the configured counts with the number of excluded elastic nodes
+ let cfg_sscp_cnt=$cfg_sscp_cnt-$exc_lnode_cnt
+ let cfg_ssmp_cnt=$cfg_ssmp_cnt-$exc_lnode_cnt
let cfg_rms_cnt=$cfg_sscp_cnt+$cfg_ssmp_cnt
sq_tmp_rms_names=`mktemp -t`
+ let num_sscp=0
+ let num_ssmp=0
let num_rms=0
grep -i 'exec ' $STARTSSCP_FILE | egrep -i 'mxsscp' | grep -o 'name \\\$[A-Za-z]*[0-9]*' | grep -o '\\\$[A-Za-z]*[0-9]*' > $sq_tmp_rms_names
- grep -i 'exec ' $STARTSSMP_FILE | egrep -i 'mxssmp' | grep -o 'name \\\$[A-Za-z]*[0-9]*' | grep -o '\\\$[A-Za-z]*[0-9]*' >> $sq_tmp_rms_names
for rms in `cat $sq_tmp_rms_names`; do
- cfg_rms[num_rms]=$rms
- let ++num_rms
+ if ( [ "$num_sscp" '<' "$cfg_sscp_cnt" ] ); then
+ cfg_rms[num_rms]=$rms
+ let ++num_sscp
+ let ++num_rms
+ fi
+ done
+ grep -i 'exec ' $STARTSSMP_FILE | egrep -i 'mxssmp' | grep -o 'name \\\$[A-Za-z]*[0-9]*' | grep -o '\\\$[A-Za-z]*[0-9]*' > $sq_tmp_rms_names
+ for rms in `cat $sq_tmp_rms_names`; do
+ if ( [ "$num_ssmp" '<' "$cfg_ssmp_cnt" ] ); then
+ cfg_rms[num_rms]=$rms
+ let ++num_ssmp
+ let ++num_rms
+ fi
done
rm -f $sq_tmp_rms_names
else
@@ -312,6 +347,9 @@ if [[ $? != 0 ]]; then
fi
if [ $json_output '==' 0 ]; then
+ echo
+ echo "*** Checking Trafodion Environment ***"
+ echo
echo "Checking if processes are up."
fi
@@ -480,11 +518,11 @@ fi
if ([ $act_lnode_up_cnt == $cfg_lnode_cnt ] ); then
echo
echo
- echo "The SQ environment is up!"
+ echo "The Trafodion environment is up!"
else
echo
echo
- echo "The SQ environment is up! Node(s) are down and environment is in a degraded state."
+ echo "The Trafodion environment is up! Node(s) are down and environment is in a degraded state."
echo
echo
sqshell -c node info
@@ -516,11 +554,11 @@ if [ $json_output '==' 0 ]; then
if [ $sq_up '==' 1 ]; then
if [ $pcmp_result '==' 1 ]; then
echo
- echo "The SQ environment is partially up and operational."
+ echo "The Trafodion environment is partially up and operational."
fi
else
echo
- echo "The SQ environment is not up all, or partially up and not operational. Check the logs."
+ echo "The Trafodion environment is not up at all, or partially up and not operational. Check the logs."
fi
fi
fi
@@ -556,7 +594,7 @@ else
echo -e "RMS\t\t$cfg_rms_cnt\t\t$act_rms_cnt\t ${down_rms[*]}"
echo -e "DcsMaster\t$cfg_dcsmaster_cnt\t\t$actual_dcsmaster_cnt\t $down_dcsmaster_cnt"
echo -e "DcsServer\t$cfg_dcsserver_cnt\t\t$actual_dcsserver_cnt\t $down_dcsserver_cnt"
- echo -e "mxosrvr\t\t$cfg_mxo_cnt\t\t$act_mxo_cnt\t ${act_mxo_down_cnt}"
+ echo -e "mxosrvr\t\t$cfg_mxo_cnt\t\t$act_mxo_cnt\t ${act_mxo_down_cnt}\n"
echo -e "RestServer\t$cfg_restserver_cnt\t\t$actual_restserver_cnt\t $down_restserver_cnt\n"
elif [[ $sqck_component == "dtm" ]]; then
echo -e "DTM\t\t$cfg_dtm_cnt\t\t$act_dtm_cnt\t ${down_dtms[*]}\n"
@@ -580,7 +618,7 @@ if [ $sq_up '==' 1 ]; then
elif ( [ $total_procs_result '==' 0 ] ); then
if [ $json_output '==' 0 ]; then
echo
- echo "The SQ environment is down."
+ echo "The Trafodion environment is down."
fi
exit -1;
else
[3/3] incubator-trafodion git commit: Merge [TRAFODION-2069] sqcheck
fix
Posted by db...@apache.org.
Merge [TRAFODION-2069] sqcheck fix
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/85ba2336
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/85ba2336
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/85ba2336
Branch: refs/heads/master
Commit: 85ba233650ef9cef15498fb0fe48c40b7f7d5f25
Parents: 7ad34b1 dabdf43
Author: Dave Birdsall <db...@apache.org>
Authored: Mon Jun 27 16:48:31 2016 +0000
Committer: Dave Birdsall <db...@apache.org>
Committed: Mon Jun 27 16:48:31 2016 +0000
----------------------------------------------------------------------
core/sqf/sql/scripts/sqcheck | 68 ++++++++++++++++++++++++++++++---------
1 file changed, 53 insertions(+), 15 deletions(-)
----------------------------------------------------------------------
[2/3] incubator-trafodion git commit: [TRAFODION-2069] Fixed sqcheck
to use TRAF_EXCLUDE_LIST when calculating counts Code review fix.
Posted by db...@apache.org.
[TRAFODION-2069] Fixed sqcheck to use TRAF_EXCLUDE_LIST when calculating counts
Code review fix.
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/dabdf432
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/dabdf432
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/dabdf432
Branch: refs/heads/master
Commit: dabdf432613096cfbaf250cbc9156bc3aa8f8122
Parents: d13776b
Author: Zalo Correa <za...@esgyn.com>
Authored: Wed Jun 22 16:30:36 2016 -0700
Committer: Zalo Correa <za...@esgyn.com>
Committed: Wed Jun 22 16:30:36 2016 -0700
----------------------------------------------------------------------
core/sqf/sql/scripts/sqcheck | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/dabdf432/core/sqf/sql/scripts/sqcheck
----------------------------------------------------------------------
diff --git a/core/sqf/sql/scripts/sqcheck b/core/sqf/sql/scripts/sqcheck
index d1aa0df..a81ce92 100755
--- a/core/sqf/sql/scripts/sqcheck
+++ b/core/sqf/sql/scripts/sqcheck
@@ -33,7 +33,7 @@ function Usage {
echo
echo "Usage: $0 [ -c <cc> | -i <nn> | -d <nn> | -h | -f | -q | -v | -r | -j ]"
echo
- echo "-i <nn> Number of times the check for Trafodion processes be done (Default $max_checks)"
+ echo "-i <nn> Number of times the check for Trafodion processes will be done (Default $max_checks)"
echo "-d <nn> Duration of sleep (in seconds) between each check (Default $sleep_duration)"
echo "-c <cc> Which component to check: [all | dtm | dcs | rms | rest ] (Default $sqck_component)"
echo "-f fast - (it's like running $0 -i 1 -d 0)"