diff --git a/manifests/init.pp b/manifests/init.pp index c0c454c..aa14690 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -1,5 +1,5 @@ ################################################################################ -# Time-stamp: +# Time-stamp: # # File:: init.pp # Author:: UL HPC Team (hpc-sysadmins@uni.lu) @@ -82,9 +82,9 @@ # @param clustername [String] Default: 'cluster' # The name by which this Slurm managed cluster is known in the accounting database # -# @param accountingstorageTRES [String] Default: '' -# @param acct_gatherenergytype [String] Default: 'none' # @param accountingstoragehost [String] Default: $:hostname +# @param accountingstorageTRES [String] Default: '' +# @param acct_gatherenergytype [String] Default: 'none' # Identifies the plugin to be used for energy consumption accounting # Elligible values in [ 'none', 'ipmi', 'rapl' ] # @paraĆ¹ acct_storageenforce [Array] Default: ['qos', 'limits', 'associations'] @@ -238,8 +238,6 @@ # @param taskpluginparams [Array ] Default: ['cpusets'] # @param taskprolog [String ] Default: '' # @param tmpfs [String ] Default: '/tmp' -# @param tresbillingweights [String] Default: '' -# Normally associated to your partition definitions (typically under the 'DEFAULT' partition settings) # @param waittime [Integer] Default: 0 # ############################ #################################### @@ -561,7 +559,6 @@ # Trackable RESources (TRES) String $accountingstorageTRES = $slurm::params::accountingstorageTRES, String $priorityweightTRES = $slurm::params::priorityweightTRES, - String $tresbillingweights = $slurm::params::tresbillingweights, # # Which topology plugin to be used for determining the network topology and diff --git a/templates/slurm.conf.erb b/templates/slurm.conf.erb index 52a3734..9ac218f 100644 --- a/templates/slurm.conf.erb +++ b/templates/slurm.conf.erb @@ -317,10 +317,9 @@ PriorityWeightQOS=<%= scope['slurm::priorityweightqos'] %> ### Trackable RESources (TRES) policies ### ########################################### # See https://slurm.schedmd.com/tres.html -# Define which TRES are to be tracked on the system -<% if scope['slurm::accountingstorageTRES'].empty? -%> -# AccountingStorageTRES = cpu,mem,energy,node,billing -<% else -%> +# Define which TRES are to be tracked on the system in addition to the default +# billing, cpu, energy, memory and node +<% unless scope['slurm::accountingstorageTRES'].empty? -%> AccountingStorageTRES=<%= scope['slurm::accountingstorageTRES'] %> <% end -%> <% if scope['slurm::priorityweightTRES'].empty? -%> @@ -328,13 +327,9 @@ AccountingStorageTRES=<%= scope['slurm::accountingstorageTRES'] %> <% else -%> PriorityWeightTRES=<%= scope['slurm::priorityweightTRES'] %> <% end -%> -# For each partition this option is used to define the billing weights of each -# TRES type that will be used in calculating the usage of a job. -<% if scope['slurm::tresbillingweights'].empty? -%> -# TRESBillingWeights = -<% else -%> -TRESBillingWeights=<%= scope['slurm::tresbillingweights'] %> -<% end -%> +# For each partition (or in the 'DEFAULT' setting), use the TRESBillingWeights +# option to define the billing weights of each TRES type that will be used in +# calculating the usage of a job. ########################### @@ -492,6 +487,7 @@ NodeName=<%= name.ljust(12) %> <%= content %> <% content << " AllowGroups=#{v['allowgroups'].is_a?(Array) ? v['allowgroups'].join(',') : v['allowgroups']}" if v['allowgroups'] -%> <% content << " AllowQos=#{v['allowqos'].is_a?(Array) ? v['allowqos'].join(',') : v['allowqos']}" if v['allowqos'] -%> <% content << ' DisableRootJobs=YES' if (!v['disablerootjobs'].nil? and v['disablerootjobs'] and content !~ /DisableRootJobs=/) -%> +<% content << " TRESBillingWeights=#{v['TRESbillingweights'].is_a?(Array) ? v['TRESbillingweights'].join(',') : v['TRESbillingweights']}" if v['TRESbillingweights'] -%> <% end -%> <% unless (content.nil? or content.empty?) -%> PartitionName=<%= name.ljust(12) %> <%= content %>