Hi Julio,

I have not had much time to look at this script but we will get to it in the next few days as we have some work going on over on the commercial side that involves start and stop scripts.

In the meantime, does anyone on the list have a script they are currently using for /etc/init.d-style service services? Please post if you have something you are happy with.

Cheers, Robert

Robert Hodges, CTO, Continuent, Inc.
Email:  [EMAIL PROTECTED]
Mobile:  +1-510-501-3728  Skype:  hodgesrm


On Aug 6, 2007, at 1:52 PM, Julio Leyva wrote:



From: [EMAIL PROTECTED]
To: [email protected]
Subject: RE: [Sequoia] Shutting down sequoia 2.10.8
Date: Tue, 31 Jul 2007 15:38:36 +0000


Hi Robert
Here is my script




#!/bin/sh
export SEQUOIA_HOME=/opt/sequoia
#
# Author:
#
# /etc/init.d/sequoia
#
### BEGIN INIT INFO
# Provides:       sequoia
# Description:    Start sequoia controller
### END INIT INFO

# Check for missing binaries (stale symlinks should not happen)
CONTROLLER_BIN=/opt/sequoia/bin/abrazo.sh
RUNNING_CONTROLLER=controller.sh
CONSOLE_BIN=/opt/sequoia/bin/console.sh
SHUTDOWN=/opt/sequoia/bin/shutdownsequoia
test -x $CONTROLLER_BIN || exit 5
test -x $CONSOLE_BIN || exit 5

# Shell functions sourced from /etc/rc.status:
#      rc_check         check and set local and overall rc status
#      rc_status        check and set local and overall rc status
#      rc_status -v     ditto but be verbose in local rc status
#      rc_status -v -r  ditto and clear the local rc status
#      rc_status -s     display "skipped" and exit with status 3
#      rc_status -u     display "unused" and exit with status 3
#      rc_failed        set local and overall rc status to failed
#      rc_failed <num>  set local and overall rc status to <num>
#      rc_reset         clear local rc status (overall remains)
#      rc_exit          exit appropriate to overall rc status
#      rc_active    checks whether a service is activated by symlinks
#      rc_splash arg    sets the boot splash screen to arg (if active)
. /etc/rc.status

# First reset status of this service
rc_reset
# First reset status of this service
rc_reset

# Return values acc. to LSB for all commands but status:
# 0      - success
# 1       - generic or unspecified error
# 2       - invalid or excess argument(s)
# 3       - unimplemented feature (e.g. "reload")
# 4       - user had insufficient privileges
# 5       - program is not installed
# 6       - program is not configured
# 7       - program is not running
# 8--199  - reserved (8--99 LSB, 100--149 distrib, 150--199 appl)
#
# Note that starting an already running service, stopping
# or restarting a not-running service as well as the restart
# with force-reload (in case signaling is not supported) are
# considered a success.

case "$1" in
    start)
        echo -n "Starting sequoia controller"
        startproc $CONTROLLER_BIN
        rc_status -v
        ;;
    stop)
        echo -n "Shutting down sequoia controller"

        $CONSOLE_BIN -f $SHUTDOWN

        true
        rc_status -v
        ;;
    try-restart) $0 status >/dev/null &&  $0 restart
        rc_status
        ;;
    restart)
        $0 stop
        $0 start
        rc_status
        ;;
    status)
        echo -n "Checking for sequoia controller"
        checkproc $RUNNING_CONTROLLER
        rc_status -v
        ;;
    *)
        echo "Usage: $0 {start|stop|status|try-restart|restart}"
        exit 1
        ;;
esac
rc_exit


This is the content of shutdownsequoia file

shutdown virtualdatabase mydb 3
admin
mypassword
shutdown


Thanks a lot




From: [EMAIL PROTECTED]
Subject: Re: [Sequoia] Shutting down sequoia 2.10.8
Date: Mon, 30 Jul 2007 13:52:11 -0700
To: [email protected]

Hi Julio,

Can you post a copy of your script to the mailing list? It's hard to diagnose what may be happening without seeing what you are doing to shut down.

Thanks, Robert

Robert Hodges, CTO, Continuent, Inc.
Email:  [EMAIL PROTECTED]
Mobile:  +1-510-501-3728  Skype:  hodgesrm


On Jul 30, 2007, at 12:06 PM, Julio Leyva wrote:

Hi all

We have migrated from sequoia 2.10 to 2.10.8

We have a script that stops and starts sequoia , the script was working ok until we installed sequoia 2.10.8

Apparently the script stops sequoia but we can see the controller still running




ps -ef | grep controller



root 22660 22659 1 14:46 pts/12 00:00:09 /usr/lib64/jvm/java/ bin/java -classpath :/opt/sequoia/lib/octopus/Octopus.jar:/opt/ sequoia/lib/octopus/OctopusGenerator.jar:/opt/sequoia/lib/octopus/ csvjdbc.jar:/opt/sequoia/lib/sequoia-controller.jar:/opt/sequoia/ lib/sequoia-backend.jar:/opt/sequoia/lib/sequoia-backupers.jar:/opt/ sequoia/lib/sequoia-cache.jar:/opt/sequoia/lib/sequoia-commons.jar:/ opt/sequoia/lib/sequoia-jmx.jar:/opt/sequoia/lib/sequoia-sql.jar:/ opt/sequoia/lib/octopus:/opt/sequoia/drivers:/opt/sequoia/lib/ hedera-commons.jar:/opt/sequoia/lib/hedera-jgroups.jar:/opt/sequoia/ lib/hedera-appia.jar:/opt/sequoia/lib/appia.jar:/opt/sequoia/lib/ jgroups-core.jar:/opt/sequoia/lib/concurrent.jar:/opt/sequoia/lib/ commons-logging.jar:/opt/sequoia/lib/dom4j-1.6.1.jar:/opt/sequoia/ lib/jaxen-1.1-beta-8.jar:/opt/sequoia/lib/log4j.jar:/opt/sequoia/ lib/activation.jar:/opt/sequoia/lib/mail.jar:/opt/sequoia/lib/ commons-cli.jar:/opt/sequoia/lib/jmx/mx4j.jar:/opt/sequoia/lib/jmx/ mx4j-remote.jar:/opt/sequoia/lib/jmx/mx4j-tools.jar:/opt/sequoia/ xml:/opt/sequoia/lib/crimson.jar:/opt/sequoia/lib/xml-apis.jar:/opt/ sequoia/config/controller:/opt/sequoia/config/virtualdatabase:/opt/ sequoia/config/: -Dsequoia.home=/opt/sequoia -Dsequoia.log=/opt/ sequoia/log -Djava.security.policy=/opt/sequoia/config/java.policy - Xms1024m -Xmx1024m -Djava.net.preferIPv4Stack=true org.continuent.sequoia.controller.core.Controller -f /opt/sequoia/ config/controller/abrazo.xml

So every time we need to kill the process to start sequoia again.

Output in the log files

2007-07-30 14:46:43,789 INFO Controller 172.20.200.15:25322 ready, listening to requests ... 2007-07-30 14:47:11,041 INFO Shutting down virtual database abrazo in force mode : immediate without consistency 2007-07-30 14:47:11,042 INFO Database backend abrazo.abrazo1 is now in state disabled 2007-07-30 14:47:11,435 INFO Database backend abrazo.abrazo2 is now in state disabled 2007-07-30 14:47:11,607 INFO The virtual database abrazo has been successfully shut down 2007-07-30 14:47:11,619 INFO Shutting down controller 172.20.200.15:25322 2007-07-30 14:47:12,095 INFO Shutdown of controller 172.20.200.15:25322 completed


BTW this version has different log files (cluster.log and full_cluster.log) , Do I need to change something to migrate from 2.10 to 2.10.8? I assume it should be transparent...



Any suggestions?

Thanks in advance


JulioC.








_______________________________________________
Sequoia mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/sequoia

_______________________________________________
Sequoia mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/sequoia

_______________________________________________
Sequoia mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/sequoia

Reply via email to