Skip to content

Commit

Permalink
Bug Fix: Fix azslurm partitions command. (#287)
Browse files Browse the repository at this point in the history
If some dynamic nodes get added on the command line without the
feature set associated with dynamic partition, then slurm still
registers those nodes but does not associate them with a partition.
In "scontrol show nodes" the partition field then appears blank
resulting in a key error. This fixes that.
  • Loading branch information
aditigaur4 authored Oct 30, 2024
1 parent 79561bc commit 44cee96
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion slurm/src/slurmcc/partition.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def node_list(self) -> str:
ret: List[str] = []
all_slurm_nodes = Partition._slurm_nodes()
for node in all_slurm_nodes:
partitions = node["Partitions"].split(",")
partitions = node.get("Partitions", "").split(",")
if self.name in partitions:
# only include nodes that have the same vm_size declared as a feature
features = (node.get("AvailableFeatures") or "").lower().split(",")
Expand Down

0 comments on commit 44cee96

Please sign in to comment.