[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [HTCondor-users] Best strategy for matchmaking based on schedd hostname
- Date: Wed, 8 Apr 2020 12:26:38 -0500
- From: Todd Tannenbaum <tannenba@xxxxxxxxxxx>
- Subject: Re: [HTCondor-users] Best strategy for matchmaking based on schedd hostname
On 4/8/2020 11:33 AM, jcaballero.hep@xxxxxxxxx wrote:
I need to add a constraint in my startd configuration to accept jobs
only from one of the several schedd's serving the pool.
IIRC, the schedd name is embedded in the GlobalJobId, right?
What would be the recommended strategy to extract the schedd name from
it and add it to the expression? Something like this?
split( GlobalJobId , "#" ) =?= my_schedd_hostname
Any suggestion is more than welcome.
Thanks a lot in advance.
I strongly advise that you do not reference GlobalJobId in your startd's START expression. While it would work, it will
result in the central manager doing a lot of extra work resulting in slower matchmaking when many jobs are queued. The
reason is because GlobalJobId has a unique value for every single job, and referencing a unique value in the START
expression means that HTCondor can no longer automatically group jobs together when doing matchmaking... it will need to
consider every single job individually.
Instead, I recommend perhaps looking at the job's "User" attribute which is owner@xxxxxxxxxxxxx maybe this works for
you? Then you could have in the config on your execute machine something like:
START = splitUserName(User) == "whatever"
Another idea is to simply make a custom attribute in all the jobs coming from the schedd's you care about. On your
submit machine(s) you could put in condor_config something like the following to create a custom attribute ScheddHostName:
ScheddHostName = "$(FULL_HOSTNAME)"
SUBMIT_ATTRS = $(SUBMIT_ATTRS) ScheddHostName
and then reference this custom attribute in your START expression on your execute nodes like so:
START = ScheddHostName == "whatever.gov"
Hope the above helps,