stackhpc / ansible-role-openhpc

Ansible role for OpenHPC
Apache License 2.0
45 stars 15 forks source link

slurm.conf templating can't handle empty partitions #113

Closed sjpb closed 12 months ago

sjpb commented 3 years ago

Example of faulty result:

NodeName=DEFAULT State=UNKNOWN \
    RealMemory=122185 \
    Sockets=2 \
    CoresPerSocket=10 \
    ThreadsPerCore=2
NodeName=kbendl-compute-0
NodeName=kbendl-compute-1
PartitionName=baremetal \
    Default=YES \
    MaxTime=86400 \
    State=UP \
    Nodes=\
kbendl-compute-0,\
kbendl-compute-1NodeName=-nonesuch
PartitionName=small \
    Default=YES \
    MaxTime=86400 \
    State=UP \
    Nodes=\
-nonesuch

At a glance I think there's two issues here - empty partitions should probably be ignored (that would be a chance in behaviour, but would be more useful I think), and clearly there's a missing \n here too.

sjpb commented 12 months ago

Fixed by https://github.com/stackhpc/ansible-role-openhpc/pull/156