You are viewing a plain text version of this content. The canonical link for it is here.
Posted to codereview@trafodion.apache.org by selvaganesang <gi...@git.apache.org> on 2016/12/02 23:41:09 UTC

[GitHub] incubator-trafodion pull request #862: [TRAFODION-2384] Trafodion node needs...

GitHub user selvaganesang opened a pull request:

    https://github.com/apache/incubator-trafodion/pull/862

    [TRAFODION-2384] Trafodion node needs to be gracefully shutdown when \u2026

    \u2026the node is brought down
    
    Added a service script for Trafodion at $MY_SQROOT/sysinstall/etc/init.d/trafodion.
    As part of cluster install, this file will be copied to /etc/init.d and
    configured for service startup.
    
    The service script has the support for stop and status only.
    
    You can do the following:
    bin]$ sudo service trafodion status
    trafodion on node kenai01.cluster.local is started as logical node 000
    bin]$ sudo service trafodion stop
    Stopping trafodion node 000 on kenai01.cluster.local
    bin]$ sudo service trafodion status
    trafodion on node kenai01.cluster.local is not yet started
    bin]$ sudo service trafodion start
    start: missing job name
    Try `start --help' for more information.
    
    This allows init 6, shutdown and reboot to execute the trafodion services to be stopped in
    correct sequence.  Hence, it should fix the core dumps seen at the time of node shutdown.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/selvaganesang/incubator-trafodion trafodion-2384

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-trafodion/pull/862.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #862
    
----
commit af9524e686b1e0fcfc8a192b0b6b7c971a8ec77c
Author: selvaganesang <se...@esgyn.com>
Date:   2016-12-02T23:16:18Z

    [TRAFODION-2384] Trafodion node needs to be gracefully shutdown when the node is brought down
    
    Added a service script for Trafodion at $MY_SQROOT/sysinstall/etc/init.d/trafodion.
    As part of cluster install, this file will be copied to /etc/init.d and
    configured for service startup.
    
    The service script has the support for stop and status only.
    
    You can do the following:
    bin]$ sudo service trafodion status
    trafodion on node kenai01.cluster.local is started as logical node 000
    bin]$ sudo service trafodion stop
    Stopping trafodion node 000 on kenai01.cluster.local
    bin]$ sudo service trafodion status
    trafodion on node kenai01.cluster.local is not yet started
    bin]$ sudo service trafodion start
    start: missing job name
    Try `start --help' for more information.
    
    This allows init 6, shutdown and reboot to execute the trafodion services to be stopped in
    correct sequence.  Hence, it should fix the core dumps seen at the time of node shutdown.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-trafodion pull request #862: [TRAFODION-2384] Trafodion node needs...

Posted by selvaganesang <gi...@git.apache.org>.
Github user selvaganesang commented on a diff in the pull request:

    https://github.com/apache/incubator-trafodion/pull/862#discussion_r91423001
  
    --- Diff: install/python-installer/traf_setup.py ---
    @@ -50,6 +50,9 @@ 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')
    --- End diff --
    
    @mkby suggested in another chat that  /etc/trafodion/trafodion_config  may not available soon. Hence my earlier response.  I made the change in the script as indicated by him


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-trafodion pull request #862: [TRAFODION-2384] Trafodion node needs...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/incubator-trafodion/pull/862


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-trafodion pull request #862: [TRAFODION-2384] Trafodion node needs...

Posted by svarnau <gi...@git.apache.org>.
Github user svarnau commented on a diff in the pull request:

    https://github.com/apache/incubator-trafodion/pull/862#discussion_r90957899
  
    --- Diff: install/python-installer/traf_setup.py ---
    @@ -50,6 +50,9 @@ 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')
    --- End diff --
    
    I think @mkby is right. The run_cmd will not have SQ_ROOT in the shell environment. The cp command needs to be changed as he suggests.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-trafodion pull request #862: [TRAFODION-2384] Trafodion node needs...

Posted by mkby <gi...@git.apache.org>.
Github user mkby commented on a diff in the pull request:

    https://github.com/apache/incubator-trafodion/pull/862#discussion_r90759767
  
    --- Diff: install/python-installer/traf_setup.py ---
    @@ -50,6 +50,9 @@ 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')
    --- End diff --
    
    $SQ_ROOT should be SQ_ROOT, it's a local variable in this script.
    `run_cmd('cp %s/sysinstall/etc/init.d/trafodion /etc/init.d' % SQ_ROOT)`


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-trafodion pull request #862: [TRAFODION-2384] Trafodion node needs...

Posted by selvaganesang <gi...@git.apache.org>.
Github user selvaganesang commented on a diff in the pull request:

    https://github.com/apache/incubator-trafodion/pull/862#discussion_r90761237
  
    --- Diff: install/python-installer/traf_setup.py ---
    @@ -50,6 +50,9 @@ 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')
    --- End diff --
    
    Good point. I would leave it as is till /etc/trafodion/trafodion_config is available.  The service script needs to be executed by root as part of shutdown.  The variable SQ_ROOT will not be available to root user unless the service script trafodion is regenerated on the fly after installation or the new installer stores some default info at /etc/default/trafodion
    
    Also, by leaving it as it is possible for the existing installation to configure trafodion as a service by issuing the commands in the traf_setup.py manually


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---