Skip to content

Commit

Permalink
Support Slurm 23.11
Browse files Browse the repository at this point in the history
  • Loading branch information
treydock committed Feb 14, 2024
1 parent e478f69 commit fc43806
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 28 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,15 @@ Manage SLURM.

### Supported Versions of SLURM

This module is designed to work with SLURM 21.08.x, 22.05.x and 23.02.x.
This module is designed to work with SLURM 22.05.x, 23.02.x and 23.11.x.

| SLURM Version | SLURM Puppet module versions |
| ----------------- | -----------------------------|
| 20.02.x | 0.x |
| 20.11.x | 1.x |
| 21.08.x & 22.05.x | 2.x |
| 23.02.x | 3.x |
| 23.11.x | 4.x |

## Usage

Expand Down
8 changes: 4 additions & 4 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@
# @param slurmrestd_restart_on_failure
# @param cgroup_conf_template
# @param cgroup_conf_source
# @param cgroup_automount
# @param cgroup_mountpoint
# @param cgroup_plugin
# @param cgroup_allowed_ram_space
Expand All @@ -156,6 +155,7 @@
# @param cgroup_max_swap_percent
# @param cgroup_memory_swappiness
# @param cgroup_min_ram_space
# @param cgroup_signal_child_processes
# @param slurm_sh_template
# @param slurm_csh_template
# @param profile_d_env_vars
Expand Down Expand Up @@ -193,7 +193,7 @@
Boolean $install_pam = true,

# Source install
String $version = '21.08.8',
String $version = '23.11.3',
Array $source_dependencies = [],
Array $configure_flags = [],
Boolean $source_install_manage_alternatives = true,
Expand Down Expand Up @@ -359,9 +359,8 @@
# cgroups
String $cgroup_conf_template = 'slurm/cgroup/cgroup.conf.erb',
Optional[String] $cgroup_conf_source = undef,
Boolean $cgroup_automount = true,
Stdlib::Absolutepath $cgroup_mountpoint = '/sys/fs/cgroup',
Optional[String] $cgroup_plugin = undef,
String $cgroup_plugin = 'autodetect',
Integer $cgroup_allowed_ram_space = 100,
Integer $cgroup_allowed_swap_space = 0,
Boolean $cgroup_constrain_cores = false,
Expand All @@ -372,6 +371,7 @@
Integer $cgroup_max_swap_percent = 100,
Optional[Integer[0,100]] $cgroup_memory_swappiness = undef,
Integer $cgroup_min_ram_space = 30,
Boolean $cgroup_signal_child_processes = false,

# profile.d
String[1] $slurm_sh_template = 'slurm/profile.d/slurm.sh.erb',
Expand Down
16 changes: 7 additions & 9 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
'CliFilterPlugins' => undef,
'CommunicationParameters' => undef,
'CompleteWait' => '0',
'CoreSpecPlugin' => 'core_spec/none',
'CoreSpecPlugin' => undef,
'CpuFreqDef' => undef,
'CpuFreqGovernors' => 'OnDemand,Performance,UserSpace',
'CredType' => 'cred/munge',
Expand All @@ -46,8 +46,6 @@
'EioTimeout' => '60',
'EnforcePartLimits' => 'NO',
'EpilogMsgTime' => '2000',
'ExtSensorsFreq' => undef,
'ExtSensorsType' => undef,
'FairShareDampeningFactor' => '1',
'FederationParameters' => undef,
'FirstJobId' => '1',
Expand All @@ -63,7 +61,7 @@
'JobAcctGatherType' => 'jobacct_gather/cgroup',
'JobAcctGatherFrequency' => 'task=30,energy=0,network=0,filesystem=0',
'JobAcctGatherParams' => undef,
'JobCompType' => 'jobcomp/none',
'JobCompType' => undef,
'JobContainerType' => undef,
'JobFileAppend' => undef,
'JobRequeue' => '1',
Expand Down Expand Up @@ -107,7 +105,7 @@
'PriorityParameters' => undef,
'PrioritySiteFactorParameters' => undef,
'PrioritySiteFactorPlugin' => 'site_factor/none',
'PriorityType' => 'priority/basic',
'PriorityType' => 'priority/multifactor',
'PriorityUsageResetPeriod' => 'NONE',
'PriorityWeightAge' => '0',
'PriorityWeightAssoc' => '0',
Expand Down Expand Up @@ -138,7 +136,7 @@
'SchedulerTimeSlice' => '30',
'SchedulerType' => 'sched/backfill',
'ScronParameters' => undef,
'SelectType' => 'select/linear',
'SelectType' => 'select/cons_tres',
'SelectTypeParameters' => undef,
'SlurmctldAddr' => undef,
'SlurmctldDebug' => 'info',
Expand All @@ -162,15 +160,15 @@
'SuspendRate' => '60',
'SuspendTime' => '-1',
'SuspendTimeout' => '30',
'SwitchType' => 'switch/none',
'SwitchType' => undef,
'TaskPlugin' => 'task/affinity,task/cgroup',
'TaskPluginParam' => undef,
'TCPTimeout' => '2',
'TmpFS' => '/tmp',
'TopologyParam' => undef,
'TopologyPlugin' => 'topology/none',
'TopologyPlugin' => undef,
'TrackWCKey' => undef,
'TreeWidth' => '50',
'TreeWidth' => '16',
'UnkillableStepProgram' => undef,
'UnkillableStepTimeout' => '60',
'UsePAM' => '0',
Expand Down
15 changes: 6 additions & 9 deletions spec/shared_examples/slurm_common_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
'BatchStartTimeout=10',
'ClusterName=linux',
'CompleteWait=0',
'CoreSpecPlugin=core_spec/none',
'CpuFreqGovernors=OnDemand,Performance,UserSpace',
'CredType=cred/munge',
'DisableRootJobs=NO',
Expand All @@ -50,7 +49,6 @@
'InteractiveStepOptions="--interactive --preserve-env --pty $SHELL"',
'JobAcctGatherType=jobacct_gather/cgroup',
'JobAcctGatherFrequency=task=30,energy=0,network=0,filesystem=0',
'JobCompType=jobcomp/none',
'JobRequeue=1',
'KillOnBadExit=0',
'KillWait=30',
Expand All @@ -76,7 +74,7 @@
'PriorityFavorSmall=NO',
'PriorityMaxAge=7-0',
'PrioritySiteFactorPlugin=site_factor/none',
'PriorityType=priority/basic',
'PriorityType=priority/multifactor',
'PriorityUsageResetPeriod=NONE',
'PriorityWeightAge=0',
'PriorityWeightAssoc=0',
Expand All @@ -94,7 +92,7 @@
'RoutePlugin=route/default',
'SchedulerTimeSlice=30',
'SchedulerType=sched/backfill',
'SelectType=select/linear',
'SelectType=select/cons_tres',
'SlurmctldDebug=info',
'SlurmctldHost=slurm',
'SlurmctldLogFile=/var/log/slurm/slurmctld.log',
Expand All @@ -117,12 +115,10 @@
'SuspendRate=60',
'SuspendTime=-1',
'SuspendTimeout=30',
'SwitchType=switch/none',
'TaskPlugin=task/affinity,task/cgroup',
'TCPTimeout=2',
'TmpFS=/tmp',
'TopologyPlugin=topology/none',
'TreeWidth=50',
'TreeWidth=16',
'UnkillableStepTimeout=60',
'UsePAM=0',
'VSizeFactor=0',
Expand Down Expand Up @@ -172,8 +168,8 @@

it 'has cgroup.conf with valid contents' do
verify_exact_file_contents(catalogue, 'slurm-cgroup.conf', [
'CgroupAutomount=yes',
'CgroupMountpoint=/sys/fs/cgroup',
'CgroupPlugin=autodetect',
'AllowedRAMSpace=100',
'AllowedSwapSpace=0',
'ConstrainCores=no',
Expand All @@ -182,7 +178,8 @@
'ConstrainSwapSpace=no',
'MaxRAMPercent=100',
'MaxSwapPercent=100',
'MinRAMSpace=30'
'MinRAMSpace=30',
'SignalChildrenProcesses=no'
])
end

Expand Down
3 changes: 1 addition & 2 deletions spec/spec_helper_acceptance_setup.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
c.slurm_repo_baseurl = ENV['SLURM_BEAKER_repo_baseurl'] || nil

c.add_setting :slurm_version
c.slurm_version = ENV['SLURM_BEAKER_version'] || '23.02.6'
c.slurm_version = ENV['SLURM_BEAKER_version'] || '23.11.3'

if ENV['BEAKER_set'] =~ %r{cluster}
slurmctld_host = 'slurmctld'
Expand Down Expand Up @@ -73,7 +73,6 @@
slurm::auth_alt_types:
- auth/jwt
slurm::jwt_key_source: 'puppet:///modules/site_slurm/jwt.key'
slurm::cgroup_plugin: 'cgroup/v1'
slurm::partitions:
general:
default: 'YES'
Expand Down
4 changes: 1 addition & 3 deletions templates/cgroup/cgroup.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,8 @@
# See man slurm.conf and man cgroup.conf for further
# information on cgroup configuration parameters
#--
CgroupAutomount=<%= scope['slurm::cgroup_automount'] ? "yes" : "no" %>
CgroupMountpoint=<%= scope['slurm::cgroup_mountpoint'] %>
<%- if scope['slurm::cgroup_plugin'] -%>
CgroupPlugin=<%= scope['slurm::cgroup_plugin'] %>
<%- end -%>
# task/cgroup plugin
AllowedRAMSpace=<%= scope['slurm::cgroup_allowed_ram_space'] %>
AllowedSwapSpace=<%= scope['slurm::cgroup_allowed_swap_space'] %>
Expand All @@ -24,3 +21,4 @@ MaxSwapPercent=<%= scope['slurm::cgroup_max_swap_percent'] %>
MemorySwappiness=<%= scope['slurm::cgroup_memory_swappiness'] %>
<%- end -%>
MinRAMSpace=<%= scope['slurm::cgroup_min_ram_space'] %>
SignalChildrenProcesses=<%= scope['slurm::cgroup_signal_child_processes'] ? 'yes' : 'no' %>

0 comments on commit fc43806

Please sign in to comment.