[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Condor-users] In a multi-startd setup, how do you prevent starter log collisions?
- Date: Wed, 07 Sep 2011 14:42:02 -0500
- From: Todd Tannenbaum <tannenba@xxxxxxxxxxx>
- Subject: Re: [Condor-users] In a multi-startd setup, how do you prevent starter log collisions?
Ian Chesal wrote:
Better subject would be: how do you prevent starter log collisions and
keep the log files named sensibly. I'd like to be able to distinguish
which log file goes with which slot without log file diving in startd logs.
I have the following mulit-startd configuration working:
# Define the first STARTD on this machine
STARTD1 = $(STARTD)
STARTD1_ARGS = -f -local-name S1
STARTD1_LOG = $(LOCAL_DIR)/log/StartdLog.1
STARTD1_EXECUTE = $(LOCAL_DIR)/execute.1
STARTD.S1.NUM_SLOTS = 2
STARTD.S1.STARTD_NAME = S1
STARTD.S1.STARTD_LOG = $(STARTD1_LOG)
STARTD.S1.STARTD_EXEUTE = $(STARTD1_EXECUTE)
DAEMON_LIST = $(DAEMON_LIST), STARTD1
# Define the second STARTD on this machine
STARTD2 = $(STARTD)
STARTD2_ARGS = -f -local-name S2
STARTD2_LOG = $(LOCAL_DIR)/log/StartdLog.2
STARTD2_EXECUTE = $(LOCAL_DIR)/execute.2
STARTD.S2.NUM_SLOTS = 2
STARTD.S2.STARTD_NAME = S2
STARTD.S2.STARTD_LOG = $(STARTD2_LOG)
STARTD.S2.STARTD_EXEUTE = $(STARTD2_EXECUTE)
DAEMON_LIST = $(DAEMON_LIST), STARTD2
DC_DAEMON_LIST = +STARTD1 STARTD2
But the StartLog.# files are colliding for the startd pairs.
Without resorting to something like $(PID) in the starter log file
names, is there a way to prevent the collisions?
Simple suggestion: instead of $(PID), use $(PPID) which will use the
parent pid. So now you will have a separate starter log per startd
instead of a separate starter log per starter. Perhaps this is all you
More complicated but general suggestion: Anything in the config can be
overridden via the environment - you can set STARTER_LOG via an
environment variable _condor_STARTER_LOG. Condor daemons inherit the
environment from there parent. Combine this with the config knob
(for descip of this knob see
and I think we have a general solution. So if you wanted
StarterLog.S1.slotX, StarterLog.S2.slotX, ...
I am hoping all you need to do is add the following to your config above:
STARTD1_ENVIRONMENT = "_condor_STARTER_LOG=StarterLog.S1"
STARTD2_ENVIRONMENT = "_condor_STARTER_LOG=StarterLog.S2"
Disclaimer: The above suggestions are off the top of my head, I didn't
Ian, hope the above helps. If it does... could I twist your arm to
volunteer to write a HOWTO on the wiki that captures your recipe for
configuring a multi-startd setup? :)
thanks and regards,