Hi Ole,
On Fri, Jun 23, 2017 at 1:26 AM, Ole Holm Nielsen
<[email protected]> wrote:
> Yes, ClusterShell has indeed lots of features and compares favorably to
> PDSH. I've added a brief description in my Slurm Wiki
> https://wiki.fysik.dtu.dk/niflheim/SLURM#clustershell, please comment on it
> off-line if you have the time.
Nice, I'll take a look.
> However, after a brief reading of the ClusterShell manual, it hasn't dawned
> upon me how I use it with Slurm partitions. The basic functionality is OK:
>
> # clush -w i[001-003] date
> i001: Fri Jun 23 09:52:29 CEST 2017
> i003: Fri Jun 23 09:52:29 CEST 2017
> i002: Fri Jun 23 09:52:29 CEST 2017
>
> But how do I configure fro Slurm?? I've copied the example file to
> /etc/clustershell/groups.conf.d/slurm.conf, but this doesn't enable Slurm
> partitions (here: xeon24) as ClusterShell groups:
>
> # clush -g xeon24 date
> Usage: clush [options] command
> clush: error: No node to run on.
>
> Could you kindly explain this (and perhaps add examples to the
> documentation)?
Sure! That's because the groups.conf.d/slurm.conf file defines new
group sources [1]. ClusterShell supports multiple group sources, ie.
multiple sources of information to define groups. There is a default
one, defined in groups.conf, which will be used when a group name is
used, without specifying anything else, as in your "clush -g xeon24
date" command. But since the "slurm" group source is not the default,
it's not used to map the "xeon24" group to the corresponding Slurm
partition.
So, you can either:
* use the -s option to specify a group source, or prefix the group
name with the group source name in the command line, like this:
$ clush -s slurm -g xeon24 date
or, more compact:
$ clush -w@slurm:xeon24 date
* or if you don't plan to use any other group source than "slurm", you
can make it the default with the following in
/etc/clustershell/groups.conf:
[Main]
# Default group source
default: slurm
With the example Slurm group source, you can easily execute commands
on all the nodes from a given partition, but also on nodes based on
their Slurm state, like:
$ clush -w@slurmstate:drained date
Hope this makes things a bit clearer.
[1]
https://clustershell.readthedocs.io/en/latest/config.html#external-group-sources
Cheers,
--
Kilian