Skip to content

Commit ecf2f1f

Browse files
committed
slurm: correctly configure StateSaveLocation and SlurmdSpoolDir
Signed-off-by: Francesco De Martino <[email protected]>
1 parent 90c58c8 commit ecf2f1f

File tree

4 files changed

+17
-2
lines changed

4 files changed

+17
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ This file is used to list changes made in each version of the AWS ParallelCluste
3232
- Fix issue with slurmd daemon not being restarted correctly when a compute node is rebooted
3333
- Fix errors causing Torque not able to locate jobs, setting server_name to fqdn on master node
3434
- Fix Torque issue that was limiting the max number of running jobs to the max size of the cluster
35+
- Slurm: configured StateSaveLocation and SlurmdSpoolDir directories to be writable only to slurm user
3536

3637
2.5.1
3738
-----

recipes/_compute_slurm_config.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,13 @@
1515
# OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions and
1616
# limitations under the License.
1717

18+
# Create directory configured as SlurmdSpoolDir
19+
directory '/var/spool/slurmd' do
20+
user 'slurm'
21+
group 'slurm'
22+
mode '0700'
23+
end
24+
1825
# Mount /opt/slurm over NFS
1926
nfs_master = node['cfncluster']['cfn_master']
2027
mount '/opt/slurm' do

recipes/_master_slurm_config.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,13 @@
2929
mode '0755'
3030
end
3131

32+
# Create directory configured as StateSaveLocation
33+
directory '/var/spool/slurm.state' do
34+
user 'slurm'
35+
group 'slurm'
36+
mode '0700'
37+
end
38+
3239
template '/opt/slurm/etc/slurm.conf' do
3340
source 'slurm.conf.erb'
3441
owner 'root'

templates/default/slurm.conf.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ SlurmdPort=6818
2121
AuthType=auth/munge
2222
#JobCredentialPrivateKey=
2323
#JobCredentialPublicCertificate=
24-
StateSaveLocation=/tmp
25-
SlurmdSpoolDir=/tmp/slurmd
24+
StateSaveLocation=/var/spool/slurm.state
25+
SlurmdSpoolDir=/var/spool/slurmd
2626
SwitchType=switch/none
2727
MpiDefault=none
2828
SlurmctldPidFile=/var/run/slurmctld.pid

0 commit comments

Comments
 (0)