Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTCONDOR-2457: Fix job router documentation formattig #623

Merged
merged 2 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
66 changes: 33 additions & 33 deletions docs/v24/configuration/htcondor-routes.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,19 @@ 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.

```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
```
```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
-------------------------------

Expand All @@ -47,14 +47,14 @@ For more information on requirements, consult the

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

```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
```
JOB_ROUTER_ROUTE_NAMES = Condor_Pool
```

### Preserving original job requirements ###

Expand All @@ -63,9 +63,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:

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

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

Expand All @@ -82,18 +82,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.

```
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
42 changes: 21 additions & 21 deletions docs/v24/configuration/non-htcondor-routes.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ Setting a default batch queue

To set a default queue for routed jobs, set the variable `default_queue`:

```hl_lines="3"
JOB_ROUTER_ROUTE_Slurm_Cluster @=jrt
GridResource = "batch slurm"
default_queue = osg_queue
@jrt
```hl_lines="3"
JOB_ROUTER_ROUTE_Slurm_Cluster @=jrt
GridResource = "batch slurm"
default_queue = osg_queue
@jrt

JOB_ROUTER_ROUTE_NAMES = Slurm_Cluster
```
JOB_ROUTER_ROUTE_NAMES = Slurm_Cluster
```

Setting batch system directives
-------------------------------
Expand All @@ -28,27 +28,27 @@ submit script.
ClassAd attributes can be passed from the routed job to the local submit attributes script via
`default_CERequirements` attribute, which takes a comma-separated list of other attributes:

```
SET foo = "X"
SET bar = "Y"
SET default_CERequirements = "foo,bar"
```
```
SET foo = "X"
SET bar = "Y"
SET default_CERequirements = "foo,bar"
```

This sets `foo` to the string `X` and `bar` to the string `Y` in the environment of the local submit attributes script.

The following example sets the maximum walltime to 1 hour and the accounting group to the `x509UserProxyFirstFQAN`
attribute of the job submitted to a PBS batch system:

```hl_lines="4 5 6"
JOB_ROUTER_ROUTE_Slurm_Cluster @=jrt
GridResource = "batch slurm"
SET Walltime = 3600
SET AccountingGroup = x509UserProxyFirstFQAN
SET default_CERequirements = "WallTime,AccountingGroup"
@jrt
```hl_lines="4 5 6"
JOB_ROUTER_ROUTE_Slurm_Cluster @=jrt
GridResource = "batch slurm"
SET Walltime = 3600
SET AccountingGroup = x509UserProxyFirstFQAN
SET default_CERequirements = "WallTime,AccountingGroup"
@jrt

JOB_ROUTER_ROUTE_NAMES = Slurm_Cluster
```
JOB_ROUTER_ROUTE_NAMES = Slurm_Cluster
```

With `/etc/blahp/pbs_local_submit_attributes.sh` containing:

Expand Down
Loading
Loading