HTCondor Project List Archives



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

Re: [Condor-devel] Creating custom daemons



Hi David,
	You can find a custom daemon (condor_job_queue_publisher), which does
not use the Daemon Core library, under our Trellis project space
(Warning: Site still under construction) : https://fedorahost.org/grid.
Look at the CondorKeepAlive.cpp/.h files on how to send commands to the
condor_master without using the Daemon Core library directly.

CondorKeepAlive.cpp:
http://git.fedorahosted.org/git/?p=grid/condor_job_queue_publisher.git;a=blob;f=src/CondorKeepAlive.cpp;h=c01de6c74cc91001c1fb4a1ff8f32776be6b9f38;hb=HEAD

Configuring a Custom Daemon
----------------------------
If you want your custom daemon to be managed by the condor_master you'll
have to add it to the DAEMON_LIST variable in your Condor configuration
like so:

CUSTOM_DAEMON = <PATH_TO_EXE>    # e.g. /usr/local/bin/custom_daemon
CUSTOM_DAEMON_ARGS = <ARGUMENTS> # e.g. --logfile $(CUSTOM_DEAMON_LOG) 
CUSTOM_DAEMON_ENVIRONMENT = <ENVIRONMENT_VARIABLES> #e.g.
"LD_LIBRARY_PATH=/usr/local/lib:/opt/custom/lib"
CUSTOM_DAEMON_USERID = <userid> # i.e. User id you want the daemon to
run the process. !root ;-)

DAEMON_LIST = $(DAEMON_LIST), CUSTOM_DAEMON     # Not DC_DAEMON_LIST

The basic format for the condor_master macros is:
<SUBSYTEM>
<SUBSYSTEM>_ARGS
<SUBSYSTEM>_ENVIRONMENT
<SUBSYSTEM>_USERID

For more information see Section 3.3.9:
http://www.cs.wisc.edu/condor//manual/v7.5/3_3Configuration.html#SECTION00431200000000000000 

Hope this helps.

Best,
Lester


On Tue, 2010-10-19 at 17:11 -0400, David Arthur wrote:
> I imagine it's possible to create a custom Condor daemon that is
> controlled by condor_master. Are there some resources (aside from the
> source code) for getting started with this sort of endeavor?
> 
> I've gotten condor_master to startup my daemon, but I'm not sure how
> to go about getting it configured.
> 
> Cheers