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

Re: [HTCondor-users] CondorCE ordering routes (when moving to new syntax)



Routes are considered in the order they are listed in JOB_ROUTER_ROUTE_NAMES.   The first route that matches and is not full will be used. 

-tj

From: HTCondor-users <htcondor-users-bounces@xxxxxxxxxxx> on behalf of Thomas Hartmann <thomas.hartmann@xxxxxxx>
Sent: Tuesday, July 16, 2024 5:31 AM
To: HTCondor-Users Mail List <htcondor-users@xxxxxxxxxxx>
Subject: [HTCondor-users] CondorCE ordering routes (when moving to new syntax)
 
Hi all,

we are rewriting currently our CondorCE routes in the new synatx and I
have a quick question. When having a number of routes, how are they
actually ordered (or can they be ordered during loading the config)? ð

Let's say, I have different routes, which could match for the same job -
so that the different routes have REQUIREMENTS on different original job
ads - but which are not necessarily excluding each other.

IIRC Routes are not chained and I would guess that the first route
matching its requirement wins and the job goes down this route (with a
PRE ROUTE maybe applied before).

If so, is there a suggested way to "order" routes to priotize these or
ensure that the correct route is taken (without overloading the
requirements)?
E.g., in [1] there would be three routes getting added to
JOB_ROUTER_ROUTE_NAMES. Would the routes then be applied in their order
as in JOB_ROUTER_ROUTE_NAMES - or would JOB_ROUTER_ROUTE_NAMES get
sorted alphanumerical and the routes then get tried to be matched in
their alphanumerical order?

On PRE ROUTEs - is it safe to assume that ads set in the pre_route can
be overwritten/extended in following routes? Or would it be better to
set only transient pre route ad, that is evaluated & set in the
following routes into the actual ad?

Cheers,
   Thomas


[1]

JOB_ROUTER_ROUTE_FOO_01DEFAULTS @=end
   SET adForAll = "valueForAll"
   SET requirements = "NODE_IS_HEALTHY"
@end

FOO_01PRIO @=end
   ...
   REQUIREMENTS (something == true)
   EVALSET requirements = "${requirements} && getFastBox == true"
@end

FOO_03BAZ @=end
   ...
   REQUIREMENTS (bazAd == true)
@end

FOO_90REST @=end
    ...
@end

JOB_ROUTER_PRE_ROUTE_TRANSFORM_NAMES =
$(JOB_ROUTER_PRE_ROUTE_TRANSFORM_NAMES) FOO_90REST FOO_01DEFAULTS FOO_03BAZ

JOB_ROUTER_ROUTE_NAMES = $(JOB_ROUTER_ROUTE_NAMES) FOO_01PRIO