[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Condor-users] Starting condor_master on boot



> Is it possible that these environment variables are not set before the
> /etc/init.d/condor file is called ?

I think that is likely. I've always set CONDOR_CONFIG explicitly in my
init.d/condor script (or made a symlink to my real config file in
/etc/condor/condor_config).

> I have tried adding CONDOR_CONFIG as above to "/etc/init.d/condor"
> - no luck

Try the symlink?

I'm including the /etc/init.d/condor script that I've used without any
trouble on a few different flavours of Linux. See below. I've always
installed it with:

  chkconfig --level 345 condor on
  service condor start

And it's worked find on reboot. One thing you should check: make sure
your current run level is sufficiently high to start Condor. Just run:

  runlevel

And you'll see what level you're at. If you've only told Condor to start
a level 5 but you're running a 3 or 4 (because you don't want all the
user services and X started) that could be your problem.

Hope that helps.

- Ian

#! /bin/sh

#
# chkconfig: 3 90 99
# description: Condor batch system
#
# condor script for SysV-style init boot scripts.  
#
# Usually this would be installed as /etc/init.d/condor with soft
# links put in from /etc/rc*.d to point back to /etc/init.d/condor to
# determine when Condor should be started and stopped.  Exact
# directories or details of the links you should use will vary from
# platform to platform. 
#
# To customize, all you need to do is edit the MASTER line below.
# condor_install (if run as root) will do that for you.  The PS line
# should be the full path and arguments to a ps command that dumps out
# all running processes.  This should be correct on all platforms.
#
# Author: Derek Wright <wright@xxxxxxxxxxx> 2/27/98
#

CONDOR_ROOT=/local/linux/condor
MASTER=${CONDOR_ROOT}/sbin/condor_master
CONDOR_CONFIG=/etc/condor/condor_config
export CONDOR_CONFIG
PS="/bin/ps auwx"

case $1 in
'start')
    if [ -x $MASTER ]; then
        echo "Starting up Condor"
        $MASTER
    else
        echo "$MASTER is not executable.  Skipping Condor startup."
        exit 1
    fi
    ;;

'stop')
    pid=`$PS | grep condor_master | grep -v grep | awk '{print $2}'`
    if [ -n "$pid" ]; then 
        # send SIGQUIT to the condor_master, which initiates its fast
        # shutdown method.  The master itself will start sending
        # SIGKILL to all it's children if they're not gone in 20
        # seconds. 
        echo "Shutting down Condor (fast-shutdown mode)"
        kill -QUIT $pid
    else
        echo "Condor not running"
    fi  
    ;;

*)
    echo "Usage: condor {start|stop}"
    ;;

esa