Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
942 changes: 0 additions & 942 deletions docs/v23/configuration/writing-job-routes.md

This file was deleted.

122 changes: 0 additions & 122 deletions docs/v23/releases.md

This file was deleted.

6 changes: 1 addition & 5 deletions docs/v24/releases.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ Known bugs affecting HTCondor-CEs can be found in
Updating to HTCondor-CE 24
--------------------------

!!! note "Updating from HTCondor-CE < 23"
If updating to HTCondor-CE 24 from HTCondor-CE < 23, be sure to also consult the HTCondor-CE 23
[upgrade instructions](../v23/releases.md).

!!! tip "Finding relevant configuration changes"
When updating HTCondor-CE RPMs, `.rpmnew` and `.rpmsave` files may be created containing new defaults that you
should merge or new defaults that have replaced your customization, respectively.
Expand All @@ -34,7 +30,7 @@ If you have custom job routes, you must use the new, more flexible,
job router syntax.

If you have added custom job routes, make sure that you
[convert](../../v23/configuration/job-router-overview/#converting-to-classad-transforms)
[convert](../configuration/job-router-overview/#converting-to-classad-transforms)
any jobs routes to the new, more flexible,
[ClassAd transform](../configuration/job-router-overview/#classad-transforms)
syntax.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,76 +22,40 @@ In this example, we set the routed job on hold if the job is idle and has been s
tried to start more than once.
This will catch jobs which are starting and stopping multiple times.

=== "ClassAd Transform"

```hl_lines="5 8"
JOB_ROUTER_ROUTE_Condor_Pool @=jrt
UNIVERSE VANILLA
# Puts the routed job on hold if the job's been idle and has been started at least
# once or if the job has tried to start more than once
SET PeriodicHold ((NumJobStarts >= 1 && JobStatus == 1) || NumJobStarts > 1)
# Release routed jobs if the condor_starter couldn't start the executable and
# 'VMGAHP_ERR_INTERNAL' is in the HoldReason
SET PeriodicRelease = (HoldReasonCode == 6 && regexp("VMGAHP_ERR_INTERNAL", HoldReason))
@jrt

JOB_ROUTER_ROUTE_NAMES = Condor_Pool
```
=== "Deprecated Syntax"

```hl_lines="7 10"
JOB_ROUTER_ENTRIES @=jre
[
TargetUniverse = 5;
name = "Condor_Pool";
# Puts the routed job on hold if the job's been idle and has been started at least
# once or if the job has tried to start more than once
set_PeriodicHold = (NumJobStarts >= 1 && JobStatus == 1) || NumJobStarts > 1;
# Release routed jobs if the condor_starter couldn't start the executable and
# 'VMGAHP_ERR_INTERNAL' is in the HoldReason
set_PeriodicRelease = HoldReasonCode == 6 && regexp("VMGAHP_ERR_INTERNAL", HoldReason);
]
@jre

JOB_ROUTER_ROUTE_NAMES = Condor_Pool
```
```hl_lines="5 8"
JOB_ROUTER_ROUTE_Condor_Pool @=jrt
UNIVERSE VANILLA
# Puts the routed job on hold if the job's been idle and has been started at least
# once or if the job has tried to start more than once
SET PeriodicHold ((NumJobStarts >= 1 && JobStatus == 1) || NumJobStarts > 1)
# Release routed jobs if the condor_starter couldn't start the executable and
# 'VMGAHP_ERR_INTERNAL' is in the HoldReason
SET PeriodicRelease = (HoldReasonCode == 6 && regexp("VMGAHP_ERR_INTERNAL", HoldReason))
@jrt

JOB_ROUTER_ROUTE_NAMES = Condor_Pool
```

Setting routed job requirements
-------------------------------

If you need to set requirements on your routed job, you will need to use `SET REQUIREMENTS` or `set_Requirements`
instead of `Requirements` for ClassAd transform and deprecated syntaxes, respectively.
If you need to set requirements on your routed job, you will need to use `SET REQUIREMENTS`
instead of `Requirements`.
The `Requirements` attribute filters jobs coming into your CE into different job routes whereas the set function will
set conditions on the routed job that must be met by the worker node it lands on.
For more information on requirements, consult the
[HTCondor manual](https://htcondor.readthedocs.io/en/lts/users-manual/submitting-a-job.html#about-requirements-and-rank).

To ensure that your job lands on a Linux machine in your pool:

=== "ClassAd Transform"
```hl_lines="3"
JOB_ROUTER_ROUTE_Condor_Pool @jrt
UNIVERSE VANILLA
SET Requirements = (TARGET.OpSys == "LINUX")
@jrt

```hl_lines="3"
JOB_ROUTER_ROUTE_Condor_Pool @jrt
UNIVERSE VANILLA
SET Requirements = (TARGET.OpSys == "LINUX")
@jrt

JOB_ROUTER_ROUTE_NAMES = Condor_Pool
```

=== "Deprecated Syntax"

```hl_lines="5"
JOB_ROUTER_ENTRIES @=jre
[
TargetUniverse = 5;
name = "Condor_Pool";
set_Requirements = (TARGET.OpSys == "LINUX");
]
@jre

JOB_ROUTER_ROUTE_NAMES = Condor_Pool
```
JOB_ROUTER_ROUTE_NAMES = Condor_Pool
```

### Preserving original job requirements ###

Expand All @@ -100,19 +64,9 @@ Requirements` or `copy_Requirements` to store the current value of `Requirements
`original_requirements`.
To do this, replace the above `SET Requirements` or `set_Requirements` lines with:

=== "ClassAd Transform"

```
SET Requirements = ($(MY.Requirements)) && (<YOUR REQUIREMENTS EXPRESSION>)
```

=== "Deprecated Syntax"

```
copy_Requirements = "original_requirements";
set_Requirements = original_requirements && ...;
```

```
SET Requirements = ($(MY.Requirements)) && (<YOUR REQUIREMENTS EXPRESSION>)
```

### Setting the accounting group based on the credential of the submitted job ###

Expand All @@ -129,20 +83,18 @@ Because of this, the default CE config will copy all attributes that match `Auth

Example of setting the accounting group from AuthToken or x509 attributes.

=== "ClassAd Transform"

```
JOB_ROUTER_CLASSAD_USER_MAP_NAMES = $(JOB_ROUTER_CLASSAD_USER_MAP_NAMES) AcctGroupMap
CLASSAD_USER_MAPFILE_AcctGroupMap = <path-to-mapfile>
```
JOB_ROUTER_CLASSAD_USER_MAP_NAMES = $(JOB_ROUTER_CLASSAD_USER_MAP_NAMES) AcctGroupMap
CLASSAD_USER_MAPFILE_AcctGroupMap = <path-to-mapfile>

JOB_ROUTER_TRANSFORM_SetAcctGroup @=end
REQUIREMENTS (orig_AuthTokenSubject ?: x509UserProxySubject) isnt undefined
EVALSET AcctGroup UserMap("AcctGroupMap", orig_AuthTokenSubject ?: x509UserProxySubject, AcctGroup)
EVALSET AccountingGroup join(".", AcctGroup, Owner)
@end
JOB_ROUTER_TRANSFORM_SetAcctGroup @=end
REQUIREMENTS (orig_AuthTokenSubject ?: x509UserProxySubject) isnt undefined
EVALSET AcctGroup UserMap("AcctGroupMap", orig_AuthTokenSubject ?: x509UserProxySubject, AcctGroup)
EVALSET AccountingGroup join(".", AcctGroup, Owner)
@end

JOB_ROUTER_PRE_ROUTE_TRANSFORMS = $(JOB_ROUTER_PRE_ROUTE_TRANSFORMS) SetAcctGroup
```
JOB_ROUTER_PRE_ROUTE_TRANSFORMS = $(JOB_ROUTER_PRE_ROUTE_TRANSFORMS) SetAcctGroup
```

Refer to the HTCondor documentation for [information on mapfiles](https://htcondor.readthedocs.io/en/lts/admin-manual/security.html?highlight=mapfile#the-unified-map-file-for-authentication).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,7 @@ overview of how to configure your HTCondor-CE Job Router
Route Syntaxes
--------------

HTCondor-CE 5 introduced the ability to write job routes using [ClassAd transform syntax](#classad-transforms) in
addition to the [existing configuration syntax](#deprecated-syntax).
The old route configuration syntax is no longer the default in HTCondor-CE 23.x and one should transition
to the new syntax as [outlined below](#choosing-a-syntax).
HTCondor-CE 5 introduced the ability to write job routes using [ClassAd transform syntax](#classad-transforms).

### ClassAd transforms ###

Expand All @@ -38,47 +35,12 @@ in the following order:
See [the section on route matching](#how-jobs-match-to-routes) below.
1. Each transform in `JOB_ROUTER_POST_ROUTE_TRANSFORM_NAMES` whose requirements are met by the job

### Deprecated syntax ###
### Required syntax ###

!!! warning "Planned Removal of Deprecated Syntax"
- `JOB_ROUTER_DEFAULTS`, `JOB_ROUTER_ENTRIES`, `JOB_ROUTER_ENTRIES_CMD`, and `JOB_ROUTER_ENTRIES_FILE` are
deprecated and will be removed for *V24* of the HTCondor Software Suite. New configuration syntax for the job router
is defined using `JOB_ROUTER_ROUTE_NAMES` and `JOB_ROUTER_ROUTE_[name]`.
- For a ClassAd transform syntax example vist:
[HTCondor Documentation - Job Router](https://htcondor.readthedocs.io/en/lts/grid-computing/job-router.html#an-example-configuration)
- **Note:** The removal will occur during the lifetime of the HTCondor *V23* feature series.

Since the inception of HTCondor-CE, job routes have been written as a
[list of ClassAds](https://htcondor.readthedocs.io/en/lts/grid-computing/job-router.html#deprecated-router-configuration).
Each job route’s [ClassAd](https://htcondor.readthedocs.io/en/lts/classads/classad-mechanism.html) is constructed
by combining each entry from the `JOB_ROUTER_ENTRIES` with the `JOB_ROUTER_DEFAULTS`:

- `JOB_ROUTER_ENTRIES` is a configuration variable whose default is set in `/etc/condor-ce/config.d/02-ce-*.conf` but
may be overriden by the administrator in subsequent files in `/etc/condor-ce/config.d/`.
- `JOB_ROUTER_DEFAULTS` is a generated configuration variable that sets default job route values that are required for
HTCondor-CE's functionality.
To view its contents in a readable format, run the following command:

:::console
user@host $ condor_ce_config_val JOB_ROUTER_DEFAULTS | sed 's/;/;\n/g'

Take care when modifying attributes in `JOB_ROUTER_DEFAULTS`: you may
[add new attributes](writing-job-routes.md#setting-attributes-for-all-routes) and override attributes that are
[set_*](writing-job-routes.md#setting-attributes) in `JOB_ROUTER_DEFAULTS`.

!!! danger "The following may break your HTCondor-CE"
- Do **not** set the `JOB_ROUTER_DEFAULTS` configuration variable yourself. This will cause the CE to stop
functioning.
- If a value is set in `JOB_ROUTER_DEFAULTS` with `eval_set_<variable>`, override it by using
`eval_set_<variable>` in the `JOB_ROUTER_ENTRIES`.
Do this at your own risk as it may cause the CE to break.

### Choosing a syntax ###

For existing HTCondor-CEs, it's recommended that administrators stop using the deprecated syntax and
For existing HTCondor-CEs, it's required that administrators stop using the deprecated syntax and
transition to ClassAd transforms now.

For new HTCondor-CEs, it's recommended that administrators start with ClassAd transforms.
For new HTCondor-CEs, it's required that administrators start with ClassAd transforms.
The [ClassAd transform](#classad-transforms) syntax provides many benefits including:

- Statements being evaluated in [the order they are written](writing-job-routes.md#editing-attributes)
Expand Down Expand Up @@ -110,8 +72,6 @@ transform syntax:
later, e.g. `95-local.conf`, you will need to rename your generated config file, e.g. `96-generated-job-routes.conf`.

4. Tweak new job routes as needed. For assistance please reach out to [htcondor-users@cs.wisc.edu](mailto:htcondor-users@cs.wisc.edu)
5. Set `JOB_ROUTER_USE_DEPRECATED_ROUTER_ENTRIES = False` (see [this documentation](https://htcondor.readthedocs.io/en/latest/admin-manual/configuration-macros.html#JOB_ROUTER_USE_DEPRECATED_ROUTER_ENTRIES)
in the HTCondor-CE's configuration.
6. Restart the HTCondor-CE

!!! note "Not Using Custom Job Routes?"
Expand All @@ -131,14 +91,9 @@ If the incoming job meets the above constraints, then the job is matched to the
whose requirements are satisfied by the job's ClassAd.
Additionally:

- **If you are using the [ClassAd transform syntax](#classad-transforms),** transforms in
- Transforms in
`JOB_ROUTER_PRE_ROUTE_TRANSFORM_NAMES` and `JOB_ROUTER_POST_ROUTE_TRANSFORM_NAMES` may also have their own
requirements that determine whether or not that transform is applied.
- **If you are using the [deprecated syntax](#deprecated-syntax),** you may configure the Job Router to evenly
distribute jobs across all matching routes (i.e., round-robin matching).
To do so, add the following configuration to a file in `/etc/condor-ce/config.d/`:

JOB_ROUTER_ROUND_ROBIN_SELECTION = True

Getting Help
------------
Expand Down
Loading
Loading