Skip to content

Commit 8f9436f

Browse files
committed
cope with empty nodegroups/partitions
1 parent ba8a38a commit 8f9436f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

templates/slurm.conf.j2

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,10 @@ NodeName={{ hostlist }} {{ '' -}}
166166
{{ nodegroup.params | default({}) | dict2parameters }} {{ '' -}}
167167
{% if 'gres' in nodegroup %}Gres={{ ','.join(nodegroup.gres | map(attribute='conf')) }}{% endif %}
168168
{% endfor %}{# hostlists #}
169-
170-
NodeSet={{ nodegroup.name }} Nodes={{ ','.join(hostlists) }}{# no support for creating nodesets by Feature #}
171169
{% endif %}{# 1 or more hosts in inventory #}
170+
171+
NodeSet={{ nodegroup.name }} Nodes={{ ','.join(hostlists | default(['""'])) }}{# no support for creating nodesets by Feature #}
172+
172173
{% endfor %}
173174

174175
# Define a non-existent node, in no partition, so that slurmctld starts even with all partitions empty

0 commit comments

Comments
 (0)