Skip to content

Commit 46dceaa

Browse files
authored
Merge pull request #156 from stackhpc/fix/empty-partitions
Allow multiple empty partitions
2 parents bff03a3 + f6d1b16 commit 46dceaa

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

molecule/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Local installation on a RockyLinux 8.x machine looks like:
3232
sudo yum install -y git
3333
git clone [email protected]:stackhpc/ansible-role-openhpc.git
3434
cd ansible-role-openhpc/
35-
python3.9 -m venv venv
35+
python3.8 -m venv venv
3636
. venv/bin/activate
3737
pip install -U pip
3838
pip install -r molecule/requirements.txt

templates/slurm.conf.j2

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,13 +129,15 @@ NodeName={{ hostlist }} State=UNKNOWN RealMemory={{ group.get('ram_mb', ram_mb)
129129
{% set _ = nodelist.append(extra_node_defn['NodeName']) %}
130130
{% endfor %}
131131
{% endfor %}{# group #}
132-
{% if not nodelist %} {# empty partition - define an invalid hostname which slurm accepts #}
133-
{% set nodelist = ['n/a'] %}
134-
NodeName={{ nodelist[0] }}
132+
{% if not nodelist %}{# empty partition #}
133+
{% set nodelist = ['""'] %}
135134
{% endif %}
136135
PartitionName={{part.name}} Default={{ part.get('default', 'YES') }} MaxTime={{ part.get('maxtime', openhpc_job_maxtime) }} State=UP Nodes={{ nodelist | join(',') }} {{ part.partition_params | default({}) | dict2parameters }}
137136
{% endfor %}{# partitions #}
138137

138+
# Define a non-existent node, in no partition, so that slurmctld starts even with all partitions empty
139+
NodeName=nonesuch
140+
139141
# Want nodes that drop out of SLURM's configuration to be automatically
140142
# returned to service when they come back.
141143
ReturnToService=2

0 commit comments

Comments
 (0)