Closed Falkor closed 3 years ago
In progress within the feature/slurm-19.05.3-2
branch
I've been testing the feature branch and when installing from scratch, if you have slurmctld and slurmdbd "included" both included on the one host then only the first included will be installed. The following lines in install.pp
slurmctld => ($slurm::with_slurmctld or defined(Class['slurm::slurmctld'])),
slurmdbd => ($slurm::with_slurmdbd or defined(Class['slurm::slurmdbd'])),
I think that the defined(Class... check only works once the class has been defined and so if you have
include ::slurm::slurmctld
include ::slurm::slurmdbd
only slurmctld will be installed and the puppet run will fail. If you reverse the order of the includes then only slurmdbd is installed. I'm not sure what the solution is at this stage. Still looking at it.
Hi @trenta
Many thanks for your interest in this module.
Actually, our own controller is configured exactly like you did, but it's also true that I enforce the parameters slurm::with_{slurmdbd,slurmctld}
to true as in the vagrant setup: tests/vagrant/puppet/hieradata/roles/controller.yaml
:
# -*- mode: yaml -*-
# Time-stamp: <Fri 2019-02-01 15:12 svarrette>
###########################################################################
# Puppet hiera settings for a SLURM controller = Head node + DBD node
---
# Profiles key may be used to include profile classes
profiles:
- '::profiles::slurm'
- '::profiles::slurm::slurmdbd'
- '::profiles::slurm::slurmctld'
slurm::with_slurmd: false
slurm::with_slurmctld: true
slurm::with_slurmdbd: true
See also under tests/vagrant/puppet/site/profiles/manifests/
:
slurm.pp
(class ::profiles::slurm
)slurm/slurmdbd.pp
(class ::profiles::slurm::slurmdbd
)slurm/slurmctld.pp
(class ::profiles::slurm::slurmctld
)The defined(Class[...])
seems to be the wrong approach to detect the sole inclusion like you did. I confess I don't see other way straight away so I suggest you apply the above approach. Any idea/suggestion is welcome to make the check able to really detect the inclusion of the class ;)
Thanks for that. A nice way of doing it.
OK, I tried all possible ways I could see to automatically detect the inclusion of the classes on the manifest:
include ::slurm::slurmdbd
include ::slurm::slurmctld
For some reason, only the first inclusion is detected. Actually, placing the following piece of code:
notice(inline_template("<%= classes.inspect %>"))
does not output the same result depending on the scope where it is placed.
So I don't see the solution except to always enforce for consistency the with_slurm{bdd | cltd | d}
to the expected values...
No worries. Thanks for looking into it. Enforcing those classes in hiera is a reasonable solution. Cheers
Deprecated -- upgrade in progress for 20.11.3
UL HPC Maintenance planned in October, coupled with a migration from Slurm 17.11.12-1 to 19.05.2 with extensive new features and fixes. At this occasion, this module will be reviewed and upgraded.