Skip to content

Commit 32fb617

Browse files
committed
fix partitions for caas and non-rebuilt-enabled clusters
1 parent c8af52e commit 32fb617

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

environments/.caas/hooks/pre.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,14 @@
1414
roles:
1515
- cluster_infra
1616

17+
- name: DEBUG
18+
hosts: all
19+
tasks:
20+
- debug:
21+
msg: |
22+
openhpc_nodegroups: {{ openhpc_nodegroups }}
23+
openhpc_partitions: {{ openhpc_partitions }}
24+
1725
# Ensure that the secrets are generated and persisted on the control host
1826
- name: Generate and persist secrets
1927
hosts: control

environments/common/inventory/group_vars/all/openhpc.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ openhpc_slurm_control_host: "{{ groups['control'] | first }}" # avoid using host
1717
openhpc_slurmdbd_host: "{{ openhpc_slurm_control_host }}"
1818
openhpc_rebuild_partition: # not a role var - could actually add more indirection here for things we're expecting to be modified, e.g. groups and maxtime
1919
name: rebuild
20-
nodegroups: "{{ cluster_compute_groups }}"
20+
nodegroups: "{{ cluster_compute_groups | default([]) }}"
2121
default: NO
2222
maxtime: 30
2323
partition_params:
@@ -29,7 +29,7 @@ openhpc_rebuild_partition: # not a role var - could actually add more indirectio
2929
OverSubscribe: EXCLUSIVE
3030
openhpc_nodegroups: "{{ cluster_compute_groups | map('community.general.dict_kv', 'name') }}" # create nodegroup for each compute group
3131
openhpc_user_partitions: "{{ openhpc_nodegroups }}" # create partition for each nodegroup (actually role default) - this is what we'd expect to be changed
32-
openhpc_partitions: "{{ openhpc_user_partitions + [openhpc_rebuild_partition] if groups['rebuild'] | length > 0 else [] }}" # auto-create rebuild partition if reqd.
32+
openhpc_partitions: "{{ openhpc_user_partitions + ([openhpc_rebuild_partition] if groups['rebuild'] | length > 0 else []) }}" # auto-create rebuild partition if reqd.
3333
openhpc_packages_default:
3434
# system packages
3535
- podman

0 commit comments

Comments
 (0)