Skip to content

Commit 6b48c60

Browse files
authored
Merge pull request htcondor#623 from htcondor/V24_HTCONDOR-2457-fix-job-router-formatting
HTCONDOR-2457: Fix job router documentation formattig
2 parents bf58088 + 4a0aac1 commit 6b48c60

File tree

3 files changed

+233
-232
lines changed

3 files changed

+233
-232
lines changed

docs/v24/configuration/htcondor-routes.md

Lines changed: 34 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,20 @@ In this example, we set the routed job on hold if the job is idle and has been s
2222
tried to start more than once.
2323
This will catch jobs which are starting and stopping multiple times.
2424

25-
```hl_lines="5 8"
26-
JOB_ROUTER_ROUTE_Condor_Pool @=jrt
27-
UNIVERSE VANILLA
28-
# Puts the routed job on hold if the job's been idle and has been started at least
29-
# once or if the job has tried to start more than once
30-
SET PeriodicHold ((NumJobStarts >= 1 && JobStatus == 1) || NumJobStarts > 1)
31-
# Release routed jobs if the condor_starter couldn't start the executable and
32-
# 'VMGAHP_ERR_INTERNAL' is in the HoldReason
33-
SET PeriodicRelease = (HoldReasonCode == 6 && regexp("VMGAHP_ERR_INTERNAL", HoldReason))
34-
@jrt
35-
36-
JOB_ROUTER_ROUTE_NAMES = Condor_Pool
37-
```
25+
```hl_lines="5 8"
26+
JOB_ROUTER_ROUTE_Condor_Pool @=jrt
27+
UNIVERSE VANILLA
28+
# Puts the routed job on hold if the job's been idle and has been started at least
29+
# once or if the job has tried to start more than once
30+
SET PeriodicHold ((NumJobStarts >= 1 && JobStatus == 1) || NumJobStarts > 1)
31+
# Release routed jobs if the condor_starter couldn't start the executable and
32+
# 'VMGAHP_ERR_INTERNAL' is in the HoldReason
33+
SET PeriodicRelease = (HoldReasonCode == 6 && regexp("VMGAHP_ERR_INTERNAL", HoldReason))
34+
@jrt
35+
36+
JOB_ROUTER_ROUTE_NAMES = Condor_Pool
37+
```
38+
3839
Setting routed job requirements
3940
-------------------------------
4041

@@ -47,14 +48,14 @@ For more information on requirements, consult the
4748

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

50-
```hl_lines="3"
51-
JOB_ROUTER_ROUTE_Condor_Pool @jrt
52-
UNIVERSE VANILLA
53-
SET Requirements = (TARGET.OpSys == "LINUX")
54-
@jrt
51+
```hl_lines="3"
52+
JOB_ROUTER_ROUTE_Condor_Pool @jrt
53+
UNIVERSE VANILLA
54+
SET Requirements = (TARGET.OpSys == "LINUX")
55+
@jrt
5556
56-
JOB_ROUTER_ROUTE_NAMES = Condor_Pool
57-
```
57+
JOB_ROUTER_ROUTE_NAMES = Condor_Pool
58+
```
5859

5960
### Preserving original job requirements ###
6061

@@ -63,9 +64,9 @@ Requirements` or `copy_Requirements` to store the current value of `Requirements
6364
`original_requirements`.
6465
To do this, replace the above `SET Requirements` or `set_Requirements` lines with:
6566

66-
```
67-
SET Requirements = ($(MY.Requirements)) && (<YOUR REQUIREMENTS EXPRESSION>)
68-
```
67+
```
68+
SET Requirements = ($(MY.Requirements)) && (<YOUR REQUIREMENTS EXPRESSION>)
69+
```
6970

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

@@ -82,18 +83,18 @@ Because of this, the default CE config will copy all attributes that match `Auth
8283

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

85-
```
86-
JOB_ROUTER_CLASSAD_USER_MAP_NAMES = $(JOB_ROUTER_CLASSAD_USER_MAP_NAMES) AcctGroupMap
87-
CLASSAD_USER_MAPFILE_AcctGroupMap = <path-to-mapfile>
86+
```
87+
JOB_ROUTER_CLASSAD_USER_MAP_NAMES = $(JOB_ROUTER_CLASSAD_USER_MAP_NAMES) AcctGroupMap
88+
CLASSAD_USER_MAPFILE_AcctGroupMap = <path-to-mapfile>
8889
89-
JOB_ROUTER_TRANSFORM_SetAcctGroup @=end
90-
REQUIREMENTS (orig_AuthTokenSubject ?: x509UserProxySubject) isnt undefined
91-
EVALSET AcctGroup UserMap("AcctGroupMap", orig_AuthTokenSubject ?: x509UserProxySubject, AcctGroup)
92-
EVALSET AccountingGroup join(".", AcctGroup, Owner)
93-
@end
90+
JOB_ROUTER_TRANSFORM_SetAcctGroup @=end
91+
REQUIREMENTS (orig_AuthTokenSubject ?: x509UserProxySubject) isnt undefined
92+
EVALSET AcctGroup UserMap("AcctGroupMap", orig_AuthTokenSubject ?: x509UserProxySubject, AcctGroup)
93+
EVALSET AccountingGroup join(".", AcctGroup, Owner)
94+
@end
9495
95-
JOB_ROUTER_PRE_ROUTE_TRANSFORMS = $(JOB_ROUTER_PRE_ROUTE_TRANSFORMS) SetAcctGroup
96-
```
96+
JOB_ROUTER_PRE_ROUTE_TRANSFORMS = $(JOB_ROUTER_PRE_ROUTE_TRANSFORMS) SetAcctGroup
97+
```
9798

9899
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).
99100

docs/v24/configuration/non-htcondor-routes.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ Setting a default batch queue
88

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

11-
```hl_lines="3"
12-
JOB_ROUTER_ROUTE_Slurm_Cluster @=jrt
13-
GridResource = "batch slurm"
14-
default_queue = osg_queue
15-
@jrt
11+
```hl_lines="3"
12+
JOB_ROUTER_ROUTE_Slurm_Cluster @=jrt
13+
GridResource = "batch slurm"
14+
default_queue = osg_queue
15+
@jrt
1616
17-
JOB_ROUTER_ROUTE_NAMES = Slurm_Cluster
18-
```
17+
JOB_ROUTER_ROUTE_NAMES = Slurm_Cluster
18+
```
1919

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

31-
```
32-
SET foo = "X"
33-
SET bar = "Y"
34-
SET default_CERequirements = "foo,bar"
35-
```
31+
```
32+
SET foo = "X"
33+
SET bar = "Y"
34+
SET default_CERequirements = "foo,bar"
35+
```
3636

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

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

42-
```hl_lines="4 5 6"
43-
JOB_ROUTER_ROUTE_Slurm_Cluster @=jrt
44-
GridResource = "batch slurm"
45-
SET Walltime = 3600
46-
SET AccountingGroup = x509UserProxyFirstFQAN
47-
SET default_CERequirements = "WallTime,AccountingGroup"
48-
@jrt
42+
```hl_lines="4 5 6"
43+
JOB_ROUTER_ROUTE_Slurm_Cluster @=jrt
44+
GridResource = "batch slurm"
45+
SET Walltime = 3600
46+
SET AccountingGroup = x509UserProxyFirstFQAN
47+
SET default_CERequirements = "WallTime,AccountingGroup"
48+
@jrt
4949
50-
JOB_ROUTER_ROUTE_NAMES = Slurm_Cluster
51-
```
50+
JOB_ROUTER_ROUTE_NAMES = Slurm_Cluster
51+
```
5252

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

0 commit comments

Comments
 (0)