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

Re: [Condor-users] Starting condor_master on boot



Hi Ian

I managed it, it was a booting sequence problem i.e. when condor starts it is
trying to look in "linux.local" picking up the hostname before it is reassigned
using DHCP to "hostname.local" where the files actually reside; and resultantly
a configuration problem.  Your instructions confirmed I was doing the right
thing before, so I...

1) Moved the directories from linux.local up a level to the opt/condor-6.6.11
directory (solving DHCP issue)
2) Altered the condor_config file to contain the variables I wanted
3) Put the config file in /opt/condor-6.6.11/etc/condor_config
4) Altered your init.d script to point to the appropriate locations

The moral of the story is that if your machines use DHCP to reassign the
hostname, running condor_configure --install --type=execute
--central-manager=hostname... --owner=condor doesn't configure things
apropriately, sure condor will run when invoked from a shell post boot and DHCP
assign, but a little rearranging is needed to get around the issue when the
condor init.d runs before dhcp...

Thanks again

James

---

Dr James Osborne, BSc (hons), PhD
High End Computing Support Engineer
Information Services, Cardiff University, 50 Park Place, Cardiff CF10 3AT,
Wales UK
Tel: +44(0)29 2087 4657
Fax: +44(0)29 2087 4285
Email: osborneja1@xxxxxxxxxxxxx 
Web: http://www.cardiff.ac.uk/insrv/condor

>>> ICHESAL@xxxxxxxxxx 20/07/2006 14:50:53 >>>
> 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


_______________________________________________
Condor-users mailing list
To unsubscribe, send a message to condor-users-request@xxxxxxxxxxx with a
subject: Unsubscribe
You can also unsubscribe by visiting
https://lists.cs.wisc.edu/mailman/listinfo/condor-users 

The archives can be found at either
https://lists.cs.wisc.edu/archive/condor-users/ 
http://www.opencondor.org/spaces/viewmailarchive.action?key=CONDOR