clustershell
clustershell copied to clipboard
clush: add --axis option
By default, clustershell folds node sets in all dimensions. This can actually be quite annoying sometimes as other tools don't support that. For example, Slurm doesn't and requires that the folding axis is the last one:
# scontrol reboot_nodes sh-[2,11,13,30]-4
scontrol_reboot_nodes error: Invalid node name specified
What about adding an option to defauts.conf (and maybe clush.conf?) in order to specify a default folding axis (already implemented as a CLI option for nodeset/cluset in a5162d17b870dec44596892c5bf326c38cb6a00d)?
I also opened a Slurm ticket at https://bugs.schedmd.com/show_bug.cgi?id=4138
Also, the --axis
CLI option would be nice to have with clush
.
SchedMD says that the last single digit should be enclosed in brackets..... NodeSet
won't use brackets unless there is more than a single index for the dimension.
So you need to enclose the last number in a bracket, for example,
marshall@byu:~/slurm/16.05/byu$ scontrol show hostnames byu[3-4]-[2]
byu3-2
byu4-2
I see no real justification for Slurm limitation. Except they are lazy doing it :)
Nevertheless, this default folding axis config option makes sense to me. It could be useful for other use cases.
Looks like the Slurm folks are considering extending the syntax! Progress!
On our side, I will set the 'default folding axis' as enhancement for 1.9.
Setting a default folding axis is already possible in defaults.conf
See: https://clustershell.readthedocs.io/en/latest/config.html?highlight=fold_axis#use-case-slurm
I am renaming this issue to implement clush --axis
like with cluset
but with low priority.