Skip to content

Commit

Permalink
Add parameter to configure slurm.conf addendum
Browse files Browse the repository at this point in the history
Fix #257
  • Loading branch information
cmd-ntrf committed Jan 13, 2024
1 parent 742bb47 commit b4cd7a2
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -928,6 +928,7 @@ to all Slurm's roles. It also installs and configure Munge service.
| `resume_timeout` | Maximum time permitted (seconds) between a node resume request and its availability. | Integer |
| `force_slurm_in_path` | Enable Slurm's bin path in all users (local and LDAP) PATH environment variable | Boolean |
| `enable_x11_forwarding` | Enable Slurm's built-in X11 forwarding capabilities | Boolean |
| `config_addendum` | Additional parameters included at the end of slurm.conf. | String |

<details>
<summary>default values</summary>
Expand All @@ -941,6 +942,7 @@ profile::slurm::base::suspend_time: 3600
profile::slurm::base::resume_timeout: 3600
profile::slurm::base::force_slurm_in_path: false
profile::slurm::base::enable_x11_forwarding: true
profile::slurm::base::config_addendum: ''
```
</details>

Expand Down
15 changes: 15 additions & 0 deletions site/profile/manifests/slurm.pp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
Integer $resume_timeout = 3600,
Boolean $force_slurm_in_path = false,
Boolean $enable_x11_forwarding = true,
String $config_addendum = '',
)
{
include epel
Expand Down Expand Up @@ -207,6 +208,20 @@
require => File['/etc/slurm'],
}

file { '/etc/slurm/slurm-addendum.conf':
ensure => present,
content => @("EOF"),
# FILE MANAGED BY PUPPET, DO NOT EDIT DIRECTLY.
# Content of this file has been specified via profile::slurm::base::config_addendum.
# It has not been validated.
${config_addendum}
|EOF
group => 'slurm',
owner => 'slurm',
mode => '0644',
require => File['/etc/slurm'],
}

file { '/etc/slurm/slurm-consul.tpl':
ensure => 'present',
source => 'puppet:///modules/profile/slurm/slurm-consul.tpl',
Expand Down
2 changes: 2 additions & 0 deletions site/profile/templates/slurm/slurm.conf.epp
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,5 @@ JobSubmitPlugins=lua
# Not needed for Slurm >= 23.02
PrivateData=cloud
<% } -%>

include /etc/slurm/slurm-addendum.conf

0 comments on commit b4cd7a2

Please sign in to comment.