Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to define several SlurmctldHost in a list #55

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ More extensive example:
SelectType: "select/cons_res"
SelectTypeParameters: "CR_Core"
SlurmctldHost: "slurmctl"
# Use a list to configure master and backups Slurmctld hosts
# SlurmctldHost: ['slurmctl1', 'slurmctl2']
SlurmctldLogFile: "/var/log/slurm/slurmctld.log"
SlurmctldPidFile: "/var/run/slurmctld.pid"
SlurmdLogFile: "/var/log/slurm/slurmd.log"
Expand Down
6 changes: 6 additions & 0 deletions templates/slurm.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,14 @@ ControlMachine=localhost
{% for key in __slurm_config_merged | sort %}
{% set val = __slurm_config_merged[key] %}
{% if val is not none and val != omit %}
{% if key == 'SlurmctldHost' and val is iterable and val is not string and val is not mapping %}
{% for slurmctldhost in val %}
SlurmctldHost={{ slurmctldhost }}
{% endfor %}
{% else %}
{{ key }}={{ 'YES' if val is sameas true else ('NO' if val is sameas false else val) }}
{% endif %}
{% endif %}
{% endfor %}

# Nodes
Expand Down
Loading