GROUPS.CONF(5)
π NAME π
groups.conf β the configuration file that tells ClusterShell all about node groups. bestie, this is where the magic lives π
β¨ DESCRIPTION β¨
okay so here's the tea: the ClusterShell library goes hunting for its node groups configuration in a bunch of places, and it has OPINIONS about the order. Decreasing order of precedence, bestie, meaning the first one it finds wins:
$CLUSTERSHELL_CFGDIR/groups.conf(only used when$CLUSTERSHELL_CFGDIRis defined)- user configuration file (
$XDG_CONFIG_HOME/clustershell/groups.conf, defaults to$HOME/.config/clustershell/groups.conf) - Python virtual environment (
{sys.prefix}/etc/clustershell/groups.conf) - local pip user installation (
$HOME/.local/etc/clustershell/groups.conf) - system-wide configuration file (
/etc/clustershell/groups.conf)
For each parameter, the first obtained value is the one that gets used. periodt. And if no groups.conf is found anywhere at all? Group support is justβ¦ disabled. it's giving silence π
Additional configuration files also get read from the directories set by the confdir option, if it's present. Scroll down to the confdir option below for the whole lore.
Configuration files are formatted in the style of RFC 822 and can be made up of several sections that may appear in any order. There are exactly two types of sections: Main and Group_source:
- Main β global configuration options. There should be only one Main section, she's the main character π
- Group_source β the Group_source section(s) define the configuration for each node group source (or namespace). This configuration is made of external command definitions (
map,mapall,all,listandreverse).
And heads up: only Group_source section(s) are allowed in additional configuration files. no Main sections sneaking into the extras, okay? π
π [Main] OPTIONS π
Here are the configuration parameters of the Main section, explained with love:
defaultβ specifies the default group source (group namespace) used by the NodeSet parser when the user doesn't explicitly specify the group source (like"@io"). the default default, if you will β¨confdirβ optional list of directories where the ClusterShell library should look for.conffiles that define group sources to use. Each file in these directories with the.confsuffix should contain one or more Group_source sections, as documented in the[Group_source]options below. These get merged with the group sources defined in/etc/clustershell/groups.confto form the complete set of group sources that ClusterShell will use. Duplicate Group_source sections are not allowed. Note:.conffiles that aren't readable by the current user are ignored (except the one that defines the default group source). The variable$CFGDIRis replaced by the path of the highest priority configuration directory found (wheregroups.confresides). The defaultconfdirvalue enables both system-wide and any installed user configuration (thanks to$CFGDIRπ«Ά). Duplicate directory paths are ignored. Alsogroupsdiris accepted as an alias forconfdirand takes precedence when both are defined β she's the understudy who got the part πautodirβ optional list of directories where the ClusterShell library should look for.yamlfiles that define in-file group dictionaries. No need to call external commands for these files, they're parsed by the ClusterShell library itself (so efficient, we love that π§). Multiple group source definitions in the same file are supported. The variable$CFGDIRis replaced by the path of the highest priority configuration directory found (wheregroups.confresides). The defaultautodirvalue enables both system-wide and any installed user configuration (thanks to$CFGDIR). Duplicate directory paths are ignored.
πΈ [Group_source] OPTIONS πΈ
And these are the configuration parameters of each group source section:
mapβ specify the external shell command used to resolve a group name into a nodeset, list of nodes or list of nodeset (separated by space characters or by carriage returns). The variable$GROUPis replaced before executing the command. Eithermapormapallmust be defined. (yes, one of them, no skipping π¨)mapallβ optional external shell command that should return all group-to-nodes mappings for this group source in a single call, onegroup: nodesline per group. Super useful when the source can dump all its groups at once (e.g. withsinfooransible-inventory --list), because a single call then serves bothmapandlistqueries from the cache.mapalloutput takes precedence over thelistupcall. Ifmapis also defined, it's used as a fallback for groups missing from themapalloutput (or all groups if caching is disabled); otherwise, missing groups resolve to an empty nodeset. The first:on each line separates the group name from the nodes, so group names must be single words without:. Duplicate group lines are merged. A malformed output line makes the wholemapallcall fail (nothing is cached and the next query retries), and a failingmapallcommand does not fall back tomap. no partial credit, she's strict πallβ optional external shell command that should return a nodeset, list of nodes or list of nodeset of all nodes for this group source. If it's not specified, the library will try to resolve all nodes by using thelistexternal command in the same group source followed bymapfor each group. resourceful queen β¨listβ optional external shell command that should return the list of all groups for this group source (separated by space characters or by carriage returns). Not used whenmapallis defined, unless caching is disabled.reverseβ optional external shell command used to find the group(s) of a single node. The variable$NODEis replaced beforehand. If this upcall isn't specified, the reverse operation is computed in memory by the library from thelistandmapexternal calls. Also, if the number of nodes to reverse is greater than the number of available groups, thereverseexternal command is avoided automatically. smart, honestly π§cache_timeβ number of seconds each upcall result is kept in cache, in memory only. Default is3600seconds. This is useful only for daemons using nodegroups.
When the library executes a group source external shell command, the current working directory is set beforehand to the corresponding confdir. This allows the use of relative paths for third party files in the command. The command's standard input is connected to /dev/null.
In addition to the context-dependent $GROUP and $NODE variables described above, these two variables are always available and also replaced before executing shell commands:
$CFGDIRis replaced bygroups.confhighest priority base directory path$SOURCEis replaced by current source name
Each external command might return a non-zero return code when the operation isn't doable. But if the call returns zero, for instance, for a non-existing group, the user will not receive any error when trying to resolve such an unknown group. The desired behavior is up to the system administrator. your cluster, your rules π«‘
π RESOURCE USAGE π
All external command results are cached in memory to avoid multiple calls. Each result is kept for a limited amount of time. See the cache_time option to tune this behavior. obsessed with efficiency, honestly β
π₯ EXAMPLES π₯
A simple configuration file for local groups and Slurm partitions binding:
π¦ groups.conf π¦
[Main]
default: local
confdir: /etc/clustershell/groups.conf.d $CFGDIR/groups.conf.d
autodir: /etc/clustershell/groups.d $CFGDIR/groups.d
[local]
map: sed -n 's/^$GROUP:\(.*\)/\1/p' /etc/clustershell/groups
list: sed -n 's/^\([0-9A-Za-z_-]*\):.*/\1/p' /etc/clustershell/groups
[slurm]
map: sinfo -h -o "%N" -p $GROUP
all: sinfo -h -o "%N"
list: sinfo -h -o "%P"
reverse: sinfo -h -N -o "%P" -n $NODE
ate. no crumbs. π
π FILES π
$CLUSTERSHELL_CFGDIR/groups.conf(defaults to/etc/clustershell/groups.conf) β Global node groups configuration file.$CLUSTERSHELL_CFGDIR/groups.conf.d/(defaults to/etc/clustershell/groups.conf.d/) β Recommended directory for additional configuration files.$CLUSTERSHELL_CFGDIR/groups.d/(defaults to/etc/clustershell/groups.d/) β Recommended directory forautodir, where native group definition files (.yamlfiles) are found.$XDG_CONFIG_HOME/clustershell/groups.confβ Main usergroups.confconfiguration file. If$XDG_CONFIG_HOMEisn't defined,$HOME/.config/clustershell/groups.confis used instead.{sys.prefix}/etc/clustershell/groups.confβ Configuration file when ClusterShell is installed in a Python virtual environment.$HOME/.local/etc/clustershell/groups.confβ Localgroups.confuser configuration file (default installation forpip --user).
π SEE ALSO π
clubak(1), cluset(1), clush(1), nodeset(1)
https://clustershell.readthedocs.io/
π AUTHOR π
Stephane Thiell
π COPYRIGHT π
GNU Lesser General Public License version 2.1 or later (LGPLv2.1+)
and that's the whole page bestie β this was GROUPS.CONF(5), version 1.10.1, dated 2026-07-16, from the ClusterShell User Manual. go configure your groups, you got this fr fr π«Άβ¨
π¦ where this page comes from
- arch rolling: clustershell 1.10.1-2 Β· LGPL-2.1-or-later
- epel 10: clustershell 1.10.1-1.el10_3 Β· LGPL-2.1-or-later
- epel 9: clustershell 1.10.1-1.el9 Β· LGPL-2.1-or-later
- fedora 43: clustershell 1.10.1-1.fc43 Β· LGPL-2.1-or-later
- fedora 44: clustershell 1.10.1-1.fc44 Β· LGPL-2.1-or-later
- ubuntu stonking: clustershell 1.10.1-1 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms