stackhpc / ansible-role-openhpc

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

Can't define a cluster with zero compute nodes #76

Open sjpb opened 3 years ago

sjpb commented 3 years ago

This would be useful for e.g. packer build pipelines if you want to stand up the login/control node first. But the templating fix for #51 means that an error gets thrown if there are no hosts in a group/partition, to avoid nodes getting defined with no cpu info. I guess the correct approach is to skip writing the Node/Partition info for that group entirely, possibly warning that that has been done?

sjpb commented 3 years ago

Sort-of fixed in 29e81bea8a5681406fa3254f3b009b49c2ad3dc6 - if a group is empty it will now just skip it, but if a group is non-empty at least one host from it must still be in the play.

Not creating the slurm partition if a group has no nodes in the play doesn't really make sense IMO; you'd still have to rerun at some point with nodes in the play to create the correct conf. We'll see what actual usage is.

The alternative is to provide some other mechanism of defining the cpu/memory info.