50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
|
# File 'manifests/partition.pp', line 50
define slurm::partition (
$partition_name = $name,
$alloc_nodes = undef,
$allow_accounts = undef,
$allow_groups = undef,
$allow_qos = undef,
$alternate = undef,
$cpu_bind = undef,
Optional[Enum['YES','NO']] $default = undef,
$def_cpu_per_gpu = undef,
$def_mem_per_cpu = undef,
$def_mem_per_gpu = undef,
$def_mem_per_node = undef,
$deny_accounts = undef,
$deny_qos = undef,
$default_time = undef,
Optional[Enum['YES','NO']] $disable_root_jobs = undef,
Optional[Enum['YES','NO']] $exclusive_user = undef,
$grace_time = undef,
Optional[Enum['YES','NO']] $hidden = undef,
Optional[Enum['YES','NO']] $lln = undef,
$max_cpus_per_node = undef,
$max_mem_per_cpu = undef,
$max_mem_per_node = undef,
$max_nodes = undef,
$max_time = undef,
$min_nodes = undef,
$nodes = undef,
Optional[Enum['EXCLUSIVE','FORCE','YES','NO']] $over_subscribe = undef,
$over_time_limit = undef,
Optional[Slurm::PreemptMode] $preempt_mode = undef,
$priority_job_factor = undef,
$priority_tier = undef,
$qos = undef,
$req_resv = undef,
$resume_timeout = undef,
Optional[Enum['YES','NO']] $root_only = undef,
Optional[Slurm::SelectTypeParameters] $select_type_parameters = undef,
$shared = undef,
Slurm::PartitionState $state = 'UP',
$suspend_time = undef,
$suspend_timeout = undef,
$tres_billing_weights = undef,
$target = 'slurm.conf',
$order = '50',
) {
include ::slurm
$conf_values = {
'PartitionName' => $partition_name,
'AllocNodes' => $alloc_nodes,
'AllowAccounts' => $allow_accounts,
'AllowGroups' => $allow_groups,
'AllowQos' => $allow_qos,
'Alternate' => $alternate,
'CpuBind' => $cpu_bind,
'Default' => $default,
'DefaultTime' => $default_time,
'DefCpuPerGPU' => $def_cpu_per_gpu,
'DefMemPerCPU' => $def_mem_per_cpu,
'DefMemPerGPU' => $def_mem_per_gpu,
'DefMemPerNode' => $def_mem_per_node,
'DenyAccounts' => $deny_accounts,
'DenyQos' => $deny_qos,
'DisableRootJobs' => $disable_root_jobs,
'ExclusiveUser' => $exclusive_user,
'GraceTime' => $grace_time,
'Hidden' => $hidden,
'LLN' => $lln,
'MaxCPUsPerNode' => $max_cpus_per_node,
'MaxMemPerCPU' => $max_mem_per_cpu,
'MaxMemPerNode' => $max_mem_per_node,
'MaxNodes' => $max_nodes,
'MaxTime' => $max_time,
'MinNodes' => $min_nodes,
'Nodes' => $nodes,
'OverSubscribe' => $over_subscribe,
'OverTimeLimit' => $over_time_limit,
'PreemptMode' => $preempt_mode,
'PriorityJobFactor' => $priority_job_factor,
'PriorityTier' => $priority_tier,
'QOS' => $qos,
'ReqResv' => $req_resv,
'ResumeTimeout' => $resume_timeout,
'RootOnly' => $root_only,
'SelectTypeParameters' => $select_type_parameters,
'Shared' => $shared,
'State' => $state,
'SuspendTime' => $suspend_time,
'SuspendTimeout' => $suspend_timeout,
'TRESBillingWeights' => $tres_billing_weights,
}
concat::fragment { "${target}-partition-${name}":
target => $target,
content => template($::slurm::partition_template),
order => $order,
}
}
|