|
36 | 36 | Boolean $hwloc_enabled = $::role::computing::slurm::hwloc_enabled, |
37 | 37 | String $db_buffer_pool_size = $::role::computing::slurm::db_buffer_pool_size, |
38 | 38 | String $db_log_file_size = $::role::computing::slurm::db_log_file_size, |
| 39 | + Optional[Integer[1]] $all_users_limit_nofile = $::role::computing::slurm::all_users_limit_nofile, |
| 40 | + Optional[Integer[1]] $slurmd_limit_nofile = $::role::computing::slurm::slurmd_limit_nofile, |
39 | 41 | ) inherits ::profile::computing { |
40 | 42 |
|
41 | 43 | # We manually install SLURM and munge packages because we're using packages |
|
156 | 158 | }) |
157 | 159 |
|
158 | 160 | class { '::profile::computing::slurm::slurmd': |
159 | | - interface => $interface, |
160 | | - node_cidrs => $node_cidrs, |
| 161 | + interface => $interface, |
| 162 | + node_cidrs => $node_cidrs, |
| 163 | + slurmd_limit_nofile => $slurmd_limit_nofile, |
161 | 164 | } |
162 | 165 | } |
163 | 166 |
|
| 167 | + # Configure PAM file descriptor limits for all users on SLURM nodes |
| 168 | + pam::limits::fragment { 'slurm_nofile': |
| 169 | + ensure => $all_users_limit_nofile ? { |
| 170 | + undef => 'absent', |
| 171 | + default => 'present', |
| 172 | + }, |
| 173 | + list => $all_users_limit_nofile ? { |
| 174 | + undef => undef, |
| 175 | + default => [ |
| 176 | + "* soft nofile ${all_users_limit_nofile}", |
| 177 | + "* hard nofile ${all_users_limit_nofile}", |
| 178 | + ], |
| 179 | + }, |
| 180 | + } |
| 181 | + |
164 | 182 | if !$enable { |
165 | 183 | package::remove( ['slurm', 'slurm-slurmdbd', 'slurm-slurmctld', 'slurm-slurmd', 'munge']) |
166 | 184 | } |
|
0 commit comments