In configless mode compute nodes have an environment var set to tell slurmd what the the slurmctld host is. Login-only nodes don't have this so slurm commands can't work.
Use DNS SRV records to provide the slurmctld host name - not under control of this role, so can rule that out.
Template the config onto the login nodes - could do that, but then login images aren't "fixed" and have multiple possible sources-of-truth for cluster config when resizing etc, so don't like that.
Run slurmd on the login nodes - this is the docs suggestion when 1) isn't possible.
This PR implements 3). I don't particularly like the implementation but here's why it is the best I could come up with:
The current "runtime"-node package list (in e.g. vars/ohpc-2) already includes packages for slurmd.
We need ohpc_slurm_services = slurmd so that slurmd gets configured. This could be done simply by setting openhpc_enable.batch=True.
The slurm.conf needs a NodeName entry for each login-only node. Entries don't need any other information and don't need to be included in any partition.
Due to the openhpc_slurm_partitions design its very hard to extract the set of batch nodes which aren't listed in any partition. (This set is the login-only nodes). Therefore a new openhpc_enable.login flag is added to explicitly identify such nodes, rather than setting .batch = True.
As openhpc_enable is a role var it doesn't end up in hostvars so there's no way to find the .login nodes from within the templating. Hence, runtime.yml has to set a fact openhpc_login_only to get this info into hostvars (I considered calling this openhpc_enable_login but thought the similarity to openhpc_enable.login would actually be confusing not helpful).
In configless mode compute nodes have an environment var set to tell slurmd what the the slurmctld host is. Login-only nodes don't have this so slurm commands can't work.
There are three possible approaches (docs):
This PR implements 3). I don't particularly like the implementation but here's why it is the best I could come up with:
vars/ohpc-2
) already includes packages for slurmd.ohpc_slurm_services = slurmd
so that slurmd gets configured. This could be done simply by settingopenhpc_enable.batch=True
.NodeName
entry for each login-only node. Entries don't need any other information and don't need to be included in any partition.openhpc_slurm_partitions
design its very hard to extract the set ofbatch
nodes which aren't listed in any partition. (This set is the login-only nodes). Therefore a newopenhpc_enable.login
flag is added to explicitly identify such nodes, rather than setting.batch = True
.openhpc_enable
is a role var it doesn't end up in hostvars so there's no way to find the.login
nodes from within the templating. Hence,runtime.yml
has to set a factopenhpc_login_only
to get this info into hostvars (I considered calling thisopenhpc_enable_login
but thought the similarity toopenhpc_enable.login
would actually be confusing not helpful).