1job_container.conf(5) Slurm Configuration File job_container.conf(5)
2
3
4
6 job_container.conf - Slurm configuration file for job_container/tmpfs
7 plugin
8
9
11 job_container.conf is an ASCII file which defines parameters used by
12 Slurm's job_container/tmpfs plugin. The plugin reads the job_con‐
13 tainer.conf file to find out the configuration settings. Based on them
14 it constructs a private mount namespace for the job and mounts /tmp and
15 /dev/shm inside it. This gives the job a private view of /tmp and
16 /dev/shm. /tmp is mounted inside a location that is specified as
17 'BasePath' in job_container.conf file. To make use of this plugin,
18 'PrologFlags=Contain' must be present in your slurm.conf file.
19
20 The file location can be modified at system build time using the DE‐
21 FAULT_SLURM_CONF parameter or at execution time by setting the
22 SLURM_CONF environment variable. The file will always be located in the
23 same directory as the slurm.conf file.
24
25
26 If using the job_container.conf file to define a namespace available to
27 nodes the first parameter on the line should be NodeName. If configur‐
28 ing a namespace without specifying nodes, the first parameter on the
29 line should be BasePath.
30
31
32 Parameter names are case insensitive. Any text following a "#" in the
33 configuration file is treated as a comment through the end of that
34 line. Changes to the configuration file take effect upon restart of
35 Slurm daemons.
36
37
38 The following job_container.conf parameters are defined to control the
39 behavior of the job_container/tmpfs plugin.
40
41
42 AutoBasePath
43 This determines if plugin should create the BasePath directory
44 or not. Set it to the directory is created with permission 0755.
45 Directory is not deleted during slurm shutdown. If set to
46 'false' or not specified, plugin would expect directory to ex‐
47 ist. This option can be used on a global or per-line basis.
48 This parameter is optional.
49
50
51 BasePath
52 Specify the PATH that the tmpfs plugin should use to mount pri‐
53 vate /tmp to. This path must be readable and writable by the
54 plugin. The plugin also constructs a directory for each job in‐
55 side this path, which is then used for mounting. The BasePath
56 gets mounted as 'private' during slurmd start and remains
57 mounted until shutdown.
58
59 NOTE: The BasePath parameter should not be configured to use
60 /tmp or /dev/shm. Using these directories will cause conflicts
61 when trying to mount and unmount the private directories for the
62 job.
63
64
65 InitScript
66 Specify fully qualified pathname of an optional initialization
67 script. This script is run before the namespace construction of
68 a job. It can be used to make the job join additional namespaces
69 prior to the construction of /tmp namespace or it can be used
70 for any site-specific setup. This parameter is optional.
71
72
73 NodeName
74 A NodeName specification can be used to permit one job_con‐
75 tainer.conf file to be used for all compute nodes in a cluster
76 by specifying the node(s) that each line should apply to. The
77 NodeName specification can use a Slurm hostlist specification as
78 shown in the example below. This parameter is optional.
79
80
82 /etc/slurm/job_container.conf:
83
84 ###
85 # Sample job_container.conf file 1
86 # Define 2 basepaths
87 # The first will only be on largemem[1-2] and it will automatically created.
88 # The second will only be on gpu[1-10], will be expected to exist and will run
89 # an initscript before each job.
90 ###
91 NodeName=largemem[1-2] AutoBasePath=true BasePath=/var/nvme/storage
92 NodeName=gpu[1-10] BasePath=/var/nvme/storage InitScript=/etc/slurm/init.sh
93
94 ###
95 # Sample job_container.conf file 2
96 # Define 1 basepath that will be on all nodes and automatically created.
97 ###
98 AutoBasePath=true
99 BasePath=/var/nvme/storage
100
101
102 /etc/slurm/slurm.conf:
103 These are the entries required in slurm.conf to activate the
104 job_container/tmpfs plugin.
105
106 ###
107 # Slurm configuration need to use job_container/tmpfs plugin
108 ###
109 JobContainerType=job_container/tmpfs
110
111
113 If any parameters in job_container.conf are changed while slurm is run‐
114 ning, then slurmd on the respective nodes will need to be restarted for
115 changes to take effect. Additionally this can be disruptive to jobs al‐
116 ready running on the node. So care must be taken to make sure no jobs
117 are running if any changes to job_container.conf are deployed.
118
119 Restarting slurmd is safe and non-disruptive to running jobs, as long
120 as job_container.conf is not changed between restarts in which case
121 above point applies.
122
123
124
126 Copyright (C) 2021 Regents of the University of California Produced at
127 Lawrence Berkeley National Laboratory
128 Copyright (C) 2021-2021 SchedMD LLC.
129
130
131 This file is part of Slurm, a resource management program. For de‐
132 tails, see <https://slurm.schedmd.com/>.
133
134 Slurm is free software; you can redistribute it and/or modify it under
135 the terms of the GNU General Public License as published by the Free
136 Software Foundation; either version 2 of the License, or (at your op‐
137 tion) any later version.
138
139 Slurm is distributed in the hope that it will be useful, but WITHOUT
140 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
141 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
142 for more details.
143
144
146 slurm.conf(5)
147
148
149
150May 2021 Slurm Configuration File job_container.conf(5)