Skip to content

Commit

Permalink
Merge pull request #99 from ComputeCanada/slurm2011
Browse files Browse the repository at this point in the history
Update slurm_version enum to include month and fix salloc with Slurm 20.11
  • Loading branch information
cmd-ntrf authored Feb 24, 2021
2 parents 9450f22 + f1db2e3 commit 6fcf14f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 | |

Expand Down
8 changes: 6 additions & 2 deletions site/profile/manifests/slurm.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
{
Expand Down Expand Up @@ -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',
Expand Down
5 changes: 5 additions & 0 deletions site/profile/templates/slurm/slurm.conf.epp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,12 @@ ProctrackType=proctrack/cgroup
TaskPlugin=task/cgroup

StateSaveLocation=/var/spool/slurm
<% if $slurm_version == '19.05' { -%>
SallocDefaultCommand="srun -n1 -N1 --mem-per-cpu=0 --pty --preserve-env --mpi=none bash"
<% } elsif $slurm_version == '20.11' { -%>
InteractiveStepOptions="--interactive --mem-per-cpu=0 --preserve-env --pty $SHELL"
LaunchParameters=use_interactive_step
<% } -%>

## Accounting
{{ range service "slurmdbd" -}}
Expand Down

0 comments on commit 6fcf14f

Please sign in to comment.