Skip to content
This repository has been archived by the owner on Jun 7, 2021. It is now read-only.

[TRAFODION-2649] Fixed 'rmscheck' method for obtaining status #1138

Merged
merged 2 commits into from Jun 23, 2017

Conversation

zcorrea
Copy link
Contributor

@zcorrea zcorrea commented Jun 22, 2017

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.

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.
@Traf-Jenkins
Copy link

Check Test Started: https://jenkins.esgyn.com/job/Check-PR-master/1873/

# Most of this was stolen from WMScheck... which may have started as NDCScheck

if [ -z $TRAF_HOME ]; then
echo
Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it!

@@ -20,7 +20,7 @@
# @@@ END COPYRIGHT @@@

begin node
_virtualnodes 2
_virtualnodes 4
end node
Copy link
Contributor

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?

Copy link
Contributor Author

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.

SQLCI_IN_FILE=rmscheck.sql

if [ -z $TRAF_HOME ]; then
echo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

double brackets again.

rm -f $SQLCI_IN_FILE

cd $TRAF_HOME/sql/scripts

Copy link
Contributor

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.

Copy link
Contributor Author

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?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep.


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
Copy link
Contributor

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?

Copy link
Contributor Author

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.

@Traf-Jenkins
Copy link

@Traf-Jenkins
Copy link

Previous Test Aborted. New Check Test Started: https://jenkins.esgyn.com/job/Check-PR-master/1875/

@Traf-Jenkins
Copy link

@asfgit asfgit merged commit 86ae544 into apache:master Jun 23, 2017
@zcorrea zcorrea deleted the TRAFODION-2649 branch June 29, 2017 13:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
4 participants