Skip to content

Commit

Permalink
Prune slurm version no longer supported by SchedMD
Browse files Browse the repository at this point in the history
  • Loading branch information
cmd-ntrf committed Jun 8, 2024
1 parent 2c20819 commit 488f8a1
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 46 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -946,7 +946,7 @@ to all Slurm's roles. It also installs and configure Munge service.
| :---------------------- | :----------------------- | :------ |
| `cluster_name` | Name of the cluster | String |
| `munge_key` | Base64 encoded Munge key | String |
| `slurm_version` | Slurm version to install | Enum['21.08', '22.05', '23.02', '23.11', '24.05'] |
| `slurm_version` | Slurm version to install | Enum['23.02', '23.11', '24.05'] |
| `os_reserved_memory` | Memory in MB reserved for the operating system on the compute nodes | Integer |
| `suspend_time` | Idle time (seconds) for nodes to becomes eligible for suspension. | Integer |
| `resume_timeout` | Maximum time permitted (seconds) between a node resume request and its availability. | Integer |
Expand All @@ -961,7 +961,7 @@ to all Slurm's roles. It also installs and configure Munge service.
```yaml
profile::slurm::base::cluster_name: "%{alias('terraform.data.cluster_name')}"
profile::slurm::base::munge_key: ENC[PKCS7, ...]
profile::slurm::base::slurm_version: '23.02'
profile::slurm::base::slurm_version: '23.11'
profile::slurm::base::os_reserved_memory: 512
profile::slurm::base::suspend_time: 3600
profile::slurm::base::resume_timeout: 3600
Expand Down
2 changes: 1 addition & 1 deletion data/common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ profile::freeipa::mokey::access_tags: "%{alias('profile::users::ldap::access_tag
profile::freeipa::server::id_start: 60001
profile::software_stack::min_uid: "%{alias('profile::freeipa::server::id_start')}"

profile::slurm::base::slurm_version: '23.02'
profile::slurm::base::slurm_version: '23.11'
profile::slurm::base::os_reserved_memory: 512
profile::slurm::controller::autoscale_version: '0.5.1'

Expand Down
39 changes: 11 additions & 28 deletions site/profile/manifests/slurm.pp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
class profile::slurm::base (
String $cluster_name,
String $munge_key,
Enum['21.08', '22.05', '23.02', '23.11', '24.05'] $slurm_version,
Enum['23.02', '23.11', '24.05'] $slurm_version,
Integer $os_reserved_memory,
Integer $suspend_time = 3600,
Integer $resume_timeout = 3600,
Expand Down Expand Up @@ -97,15 +97,6 @@
),
}

if versioncmp($slurm_version, '22.05') < 0 {
file { '/etc/slurm/cgroup_allowed_devices_file.conf':
ensure => 'present',
owner => 'slurm',
group => 'slurm',
source => 'puppet:///modules/profile/slurm/cgroup_allowed_devices_file.conf'
}
}

file { '/etc/slurm/epilog':
ensure => 'present',
owner => 'slurm',
Expand Down Expand Up @@ -503,19 +494,15 @@
|EOT
}


$slurm_version = lookup('profile::slurm::base::slurm_version')
if versioncmp($slurm_version, '21.08') >= 0 {
file { '/etc/slurm/job_submit.lua':
ensure => 'present',
owner => 'slurm',
group => 'slurm',
content => epp('profile/slurm/job_submit.lua',
{
'selinux_context' => $selinux_context,
}
),
}
file { '/etc/slurm/job_submit.lua':
ensure => 'present',
owner => 'slurm',
group => 'slurm',
content => epp('profile/slurm/job_submit.lua',
{
'selinux_context' => $selinux_context,
}
),
}

consul::service { 'slurmctld':
Expand Down Expand Up @@ -566,11 +553,7 @@
contain profile::slurm::base

$slurm_version = lookup('profile::slurm::base::slurm_version')
if versioncmp($slurm_version, '22.05') >= 0 {
$cc_tmpfs_mounts_url = "https://download.copr.fedorainfracloud.org/results/cmdntrf/spank-cc-tmpfs_mounts-${slurm_version}/"
} else {
$cc_tmpfs_mounts_url = 'https://download.copr.fedorainfracloud.org/results/cmdntrf/spank-cc-tmpfs_mounts/'
}
$cc_tmpfs_mounts_url = "https://download.copr.fedorainfracloud.org/results/cmdntrf/spank-cc-tmpfs_mounts-${slurm_version}/"

yumrepo { 'spank-cc-tmpfs_mounts-copr-repo':
enabled => true,
Expand Down
3 changes: 0 additions & 3 deletions site/profile/templates/slurm/cgroup.conf.epp
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
CgroupMountpoint="/sys/fs/cgroup"
<% if versioncmp($slurm_version, '22.05') < 0 { -%>
AllowedDevicesFile="/etc/slurm/cgroup_allowed_devices_file.conf"
<% } -%>
ConstrainCores=yes
ConstrainRAMSpace=yes
ConstrainSwapSpace=yes
Expand Down
12 changes: 0 additions & 12 deletions site/profile/templates/slurm/slurm.conf.epp
Original file line number Diff line number Diff line change
Expand Up @@ -66,25 +66,13 @@ Epilog=/etc/slurm/epilog
PlugStackConfig=/etc/slurm/plugstack.conf
MpiDefault=pmi2
ProctrackType=proctrack/cgroup
<% if versioncmp($slurm_version, '21.08') >= 0 { -%>
TaskPlugin=task/affinity,task/cgroup
<% } else { -%>
TaskPlugin=task/cgroup
<% } -%>
PropagateResourceLimits=NONE
MailProg=/usr/sbin/slurm_mail

StateSaveLocation=/var/spool/slurm
InteractiveStepOptions="--interactive --mem-per-cpu=0 --preserve-env --pty $SHELL"
LaunchParameters=use_interactive_step,disable_send_gids
<% if versioncmp($slurm_version, '21.08') >= 0 { -%>
JobSubmitPlugins=lua
<% } -%>

<% if versioncmp($slurm_version, '23.02') < 0 { -%>
# The autoscaling compute nodes are not showed by sinfo unless we set PrivateData=cloud
# Not needed for Slurm >= 23.02
PrivateData=cloud
<% } -%>

include /etc/slurm/slurm-addendum.conf

0 comments on commit 488f8a1

Please sign in to comment.