You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafodion.apache.org by se...@apache.org on 2016/12/08 21:22:08 UTC

[2/3] incubator-trafodion git commit: [TRAFODION-2384] Trafodion node needs to be gracefully shutdown when the node is brought down

[TRAFODION-2384] Trafodion node needs to be gracefully shutdown when
the node is brought down

Changes as per the review comments


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/4731cbf7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/4731cbf7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/4731cbf7

Branch: refs/heads/master
Commit: 4731cbf707fbcb0ccaa74ce853782cd46ee53c5c
Parents: af9524e
Author: selvaganesang <se...@esgyn.com>
Authored: Thu Dec 8 00:38:45 2016 +0000
Committer: selvaganesang <se...@esgyn.com>
Committed: Thu Dec 8 00:38:45 2016 +0000

----------------------------------------------------------------------
 core/sqf/sysinstall/etc/init.d/trafodion | 20 ++++++++++----------
 install/python-installer/traf_setup.py   |  2 +-
 2 files changed, 11 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/4731cbf7/core/sqf/sysinstall/etc/init.d/trafodion
----------------------------------------------------------------------
diff --git a/core/sqf/sysinstall/etc/init.d/trafodion b/core/sqf/sysinstall/etc/init.d/trafodion
index df0f14c..69319ba 100755
--- a/core/sqf/sysinstall/etc/init.d/trafodion
+++ b/core/sqf/sysinstall/etc/init.d/trafodion
@@ -53,25 +53,25 @@ TRAF_NODE_NAME=`uname -n`
 
 
 node_start() {
-echo "Trafodion node UP not implemented"
+echo "trafodion start not implemented"
 }
 
 node_stop() {
 nid=`${TRAF_SUDO_CMD} -c "${SQ_ROOT}/sql/scripts/${TRAF_SHELL_CMD} -c node info | grep -B1 ${TRAF_NODE_NAME} | grep Up | head -1 | cut -d ' ' -f 2"`
 if [ $? != 0 ]; then 
    echo -n `date` >> ${TRAF_OUT} 2>&1 </dev/null 
-   echo " Trafodion on ${TRAF_NODE_NAME} is already stopped" >> ${TRAF_OUT} 2>&1 </dev/null 
-   echo "Trafodion on ${TRAF_NODE_NAME} is already stopped"
+   echo " trafodion on ${TRAF_NODE_NAME} is already stopped" >> ${TRAF_OUT} 2>&1 </dev/null 
+   echo "trafodion on ${TRAF_NODE_NAME} is already stopped"
    return 1
 fi
 if [ "$nid" == "" ]; then
    echo -n `date` >> ${TRAF_OUT} 2>&1 </dev/null 
-   echo " Trafodion on ${TRAF_NODE_NAME} is already stopped" >> ${TRAF_OUT} 2>&1 </dev/null 
-   echo "Trafodion on node ${TRAF_NODE_NAME} is already stopped"
+   echo " trafodion on ${TRAF_NODE_NAME} is already stopped" >> ${TRAF_OUT} 2>&1 </dev/null 
+   echo "trafodion on node ${TRAF_NODE_NAME} is already stopped"
 else
-   echo "Stopping Trafodion node $nid on ${TRAF_NODE_NAME}"
+   echo "Stopping trafodion node $nid on ${TRAF_NODE_NAME}"
    echo -n `date` >> ${TRAF_OUT} 2>&1 </dev/null 
-   echo " Stopping Trafodion node $nid on ${TRAF_NODE_NAME}" >> ${TRAF_OUT} 2>&1 </dev/null 
+   echo " Stopping trafodion node $nid on ${TRAF_NODE_NAME}" >> ${TRAF_OUT} 2>&1 </dev/null 
    ${TRAF_SUDO_CMD} /bin/bash -c "${SQ_ROOT}/sql/scripts/${TRAF_SHELL_CMD} -c down $nid" >> ${TRAF_OUT}  2>&1 </dev/null &
 fi
 return 0
@@ -80,13 +80,13 @@ return 0
 node_status() {
 nid=`${TRAF_SUDO_CMD} -c "${SQ_ROOT}/sql/scripts/${TRAF_SHELL_CMD} -c node info | grep -B1 ${TRAF_NODE_NAME} | grep Up | head -1 | cut -d ' ' -f 2"`
 if [ $? != 0 ]; then 
-   echo "Trafodion on node $nid is not yet started"
+   echo "trafodion on node $nid is not yet started"
    return 0
 fi
 if [ "$nid" == "" ]; then
-   echo "Trafodion on node ${TRAF_NODE_NAME} is not yet started"
+   echo "trafodion on node ${TRAF_NODE_NAME} is not yet started"
 else
-   echo "Trafodion on node ${TRAF_NODE_NAME} is started as logical node $nid"
+   echo "trafodion on node ${TRAF_NODE_NAME} is started as logical node $nid"
 fi
 return 0
 }

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/4731cbf7/install/python-installer/traf_setup.py
----------------------------------------------------------------------
diff --git a/install/python-installer/traf_setup.py b/install/python-installer/traf_setup.py
index 08bc283..0ab0b37 100755
--- a/install/python-installer/traf_setup.py
+++ b/install/python-installer/traf_setup.py
@@ -50,7 +50,7 @@ def run():
     ### kernel settings ###
     run_cmd('sysctl -w kernel.pid_max=65535 2>&1 > /dev/null')
     run_cmd('echo "kernel.pid_max=65535" >> /etc/sysctl.conf')
-    run_cmd('cp $SQ_ROOT/sysinstall/etc/init.d/trafodion /etc/init.d')
+    run_cmd('cp %s/sysinstall/etc/init.d/trafodion /etc/init.d' % SQ_ROOT)
     run_cmd('chkconfig --add trafodion')
     run_cmd('chkconfig --level 06 trafodion on')