ULHPC / puppet-slurm

A Puppet module designed to configure and manage SLURM(see https://slurm.schedmd.com/), an open source, fault-tolerant, and highly scalable cluster management and job scheduling system for large and small Linux clusters
Apache License 2.0
19 stars 24 forks source link

Allow for custom content #18

Closed Falkor closed 5 years ago

Falkor commented 5 years ago

Add a new parameter custom_content to allow for quickly test and deploy directives within slurm.conf not yet managed as [hiera] parameters of the module... I should have planned that from the beginning ;)

Falkor commented 5 years ago

Example of hiera setting (multiline YAML with |) (used in tests/vagrant/puppet/hieradata/custom.yaml):

slurm::custom_content: |
  SlurmctldSyslogDebug=fatal
  SuspendExcNodes=iris-[10-20]:4,iris-[80-90]:2

Which results in the following:

$> vagrant provision --provision-with puppet slurm-master
==> generating hieradata/locals.yaml
==> slurm-master: Running provisioner: puppet...
[...]
==> slurm-master: Info: Applying configuration version '1549121528'
==> slurm-master: Notice: /Stage[main]/Slurm::Config/File[slurm.conf]/content:
==> slurm-master: --- /etc/slurm/slurm.conf 2019-02-02 15:03:56.557671308 +0000
==> slurm-master: +++ /tmp/puppet-file20190202-24821-1nhsutc    2019-02-02 15:32:16.838333212 +0000
==> slurm-master: @@ -245,6 +245,11 @@
==> slurm-master:  MpiDefault=pmi2
==> slurm-master:  MpiParams=ports=55000-59999
==> slurm-master:
==> slurm-master: +### Custom content
==> slurm-master: +SlurmctldSyslogDebug=fatal
==> slurm-master: +SuspendExcNodes=iris-[10-20]:4,iris-[80-90]:2
==> slurm-master: +
==> slurm-master: +
==> slurm-master:  ###############################
==> slurm-master:  ### Network Characteristics ###
==> slurm-master:  ###############################
==> slurm-master:
==> slurm-master: Info: Computing checksum on file /etc/slurm/slurm.conf
[...]