From 27108d373200ff799b5d3f22ab655e8667a951f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix-Antoine=20Fortin?= Date: Mon, 22 Feb 2021 14:55:55 -0500 Subject: [PATCH 1/2] Fix salloc for slurm 20.11 --- site/profile/manifests/slurm.pp | 6 +++++- site/profile/templates/slurm/slurm.conf.epp | 5 +++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/site/profile/manifests/slurm.pp b/site/profile/manifests/slurm.pp index 0f2ef02a3..7175d59ac 100644 --- a/site/profile/manifests/slurm.pp +++ b/site/profile/manifests/slurm.pp @@ -175,7 +175,11 @@ file { 'slurm.conf.tpl': ensure => 'present', path => '/etc/slurm/slurm.conf.tpl', - content => epp('profile/slurm/slurm.conf', {'cluster_name' => $cluster_name}), + content => epp('profile/slurm/slurm.conf', + { + 'cluster_name' => $cluster_name, + 'slurm_version' => $slurm_version, + }), group => 'slurm', owner => 'slurm', mode => '0644', diff --git a/site/profile/templates/slurm/slurm.conf.epp b/site/profile/templates/slurm/slurm.conf.epp index c6e65b605..4edd3381a 100644 --- a/site/profile/templates/slurm/slurm.conf.epp +++ b/site/profile/templates/slurm/slurm.conf.epp @@ -45,7 +45,12 @@ ProctrackType=proctrack/cgroup TaskPlugin=task/cgroup StateSaveLocation=/var/spool/slurm +<% if $slurm_version == 19 { -%> SallocDefaultCommand="srun -n1 -N1 --mem-per-cpu=0 --pty --preserve-env --mpi=none bash" +<% } elsif $slurm_version == 20 { -%> +InteractiveStepOptions="--interactive --mem-per-cpu=0 --preserve-env --pty $SHELL" +LaunchParameters=use_interactive_step +<% } -%> ## Accounting {{ range service "slurmdbd" -}} From f1db2e374ddfddf026af39e962249bee6d5fc8a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix-Antoine=20Fortin?= Date: Tue, 23 Feb 2021 09:42:09 -0500 Subject: [PATCH 2/2] Change slurm_version options from 19,20 to 19.05 and 20.11 --- README.md | 2 +- site/profile/manifests/slurm.pp | 2 +- site/profile/templates/slurm/slurm.conf.epp | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 79c173780..9fc8258f8 100644 --- a/README.md +++ b/README.md @@ -86,7 +86,7 @@ variables for each profile. | ------------------------------------- | :------ | :---------------------------------------------------------------------- | -------- | | `profile::slurm::base::cluster_name` | String | Name of the cluster | | | `profile::slurm::base::munge_key` | String | Base64 encoded Munge key | | -| `profile::slurm::base::slurm_version` | Enum[19, 20] | Slurm Major version to install | 19 | +| `profile::slurm::base::slurm_version` | Enum[19.05, 20.11] | Slurm version to install | 19.05 | | `profile::slurm::accounting:password` | String | Password used by for SlurmDBD to connect to MariaDB | | | `profile::slurm::accounting:dbd_port` | Integer | SlurmDBD service listening port | | diff --git a/site/profile/manifests/slurm.pp b/site/profile/manifests/slurm.pp index 7175d59ac..520a20bb5 100644 --- a/site/profile/manifests/slurm.pp +++ b/site/profile/manifests/slurm.pp @@ -7,7 +7,7 @@ class profile::slurm::base ( String $cluster_name, String $munge_key, - Integer[19, 20] $slurm_version = 19, + Enum['19.05', '20.11'] $slurm_version = '19.05', Boolean $force_slurm_in_path = false ) { diff --git a/site/profile/templates/slurm/slurm.conf.epp b/site/profile/templates/slurm/slurm.conf.epp index 4edd3381a..184c7101f 100644 --- a/site/profile/templates/slurm/slurm.conf.epp +++ b/site/profile/templates/slurm/slurm.conf.epp @@ -45,9 +45,9 @@ ProctrackType=proctrack/cgroup TaskPlugin=task/cgroup StateSaveLocation=/var/spool/slurm -<% if $slurm_version == 19 { -%> +<% if $slurm_version == '19.05' { -%> SallocDefaultCommand="srun -n1 -N1 --mem-per-cpu=0 --pty --preserve-env --mpi=none bash" -<% } elsif $slurm_version == 20 { -%> +<% } elsif $slurm_version == '20.11' { -%> InteractiveStepOptions="--interactive --mem-per-cpu=0 --preserve-env --pty $SHELL" LaunchParameters=use_interactive_step <% } -%>