[TRAFODION-2649] Fixed 'rmscheck' method for obtaining status #1138
Conversation
It now generates the 'rmscheck.sql' logic in a temporary file which obtains the node-ids from the 'trafconf' utility. The tempory file is created at 'rmscheck' invocation.
Check Test Started: https://jenkins.esgyn.com/job/Check-PR-master/1873/ |
core/sqf/sql/scripts/rmscheck
Outdated
# Most of this was stolen from WMScheck... which may have started as NDCScheck | ||
|
||
if [ -z $TRAF_HOME ]; then | ||
echo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need double brackets here, or an empty variable will give shell syntax error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it!
core/sqf/sql/scripts/sqconfig
Outdated
@@ -20,7 +20,7 @@ | |||
# @@@ END COPYRIGHT @@@ | |||
|
|||
begin node | |||
_virtualnodes 2 | |||
_virtualnodes 4 | |||
end node |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Intentional to change to 4 virtual nodes for single-nodes? Or was this just for testing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. I need to fix this, I was testing and forgot to change it back.
core/sqf/sql/scripts/sqgenrmscheck
Outdated
SQLCI_IN_FILE=rmscheck.sql | ||
|
||
if [ -z $TRAF_HOME ]; then | ||
echo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
double brackets again.
core/sqf/sql/scripts/sqgenrmscheck
Outdated
rm -f $SQLCI_IN_FILE | ||
|
||
cd $TRAF_HOME/sql/scripts | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are writing temp files into sql/scripts? Ugh.
I'm busy trying to move such things to $TRAF_VAR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point! Perhaps your next suggestion on using stding will remove this issue altogether. Right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep.
core/sqf/sql/scripts/rmscheck
Outdated
|
||
echo "Timestamp Id Status " | ||
sqlci -i $TRAF_HOME/sql/scripts/rmscheck.sql | grep 'Node\|ERROR' | grep -v varchar | ||
sqlci -i $temp_rmscheck_sql | grep 'Node\|ERROR' | grep -v varchar | ||
rm -f $temp_rmscheck_sql |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be easier to generate commands to stdin of sqlci instead of using a temp file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this would be better. Scripting is not one of my strengths.
Test Failed. https://jenkins.esgyn.com/job/Check-PR-master/1873/ |
Previous Test Aborted. New Check Test Started: https://jenkins.esgyn.com/job/Check-PR-master/1875/ |
Test Passed. https://jenkins.esgyn.com/job/Check-PR-master/1875/ |
It now generates the 'rmscheck.sql' logic in a temporary file which obtains the
node-ids from the 'trafconf' utility. The tempory file is created at 'rmscheck'
invocation.