1GROUPS.CONF(5) ClusterShell User Manual GROUPS.CONF(5)
2
3
4
6 groups.conf - Configuration file for ClusterShell node groups
7
9 The ClusterShell library obtains its node groups configuration from the
10 following sources in the following order:
11
12 1. user configuration file ($XDG_CONFIG_HOME/cluster‐
13 shell/groups.conf)
14
15 2. local pip user installation ($HOME/.local/etc/cluster‐
16 shell/groups.conf)
17
18 3. system-wide configuration file (/etc/clustershell/groups.conf)
19
20 If no groups.conf is found, group support will be disabled.
21
22 Additional configuration files are also read from the directories set
23 by the confdir option, if present. See the confdir option below for
24 further details.
25
26 Configuration files have a format in the style of RFC 822 potentially
27 composed of several sections which may be present in any order. There
28 are two types of sections: Main and Group_source:
29
30 Main Global configuration options. There should be only one Main sec‐
31 tion.
32
33 Group_source
34 The Group_source section(s) define the configuration for each
35 node group source (or namespace). This configuration consists in
36 external commands definition (map, all, list and reverse).
37
38 Only Group_source section(s) are allowed in additional configuration
39 files.
40
41 [Main] OPTIONS
42 Configuration parameters of the Main section are described below.
43
44 default
45 Specify the default group source (group namespace) used by the
46 NodeSet parser when the user does not explicitly specify the
47 group source (eg. "@io").
48
49 confdir
50 Optional list of directories where the ClusterShell library
51 should look for .conf files which define group sources to use.
52 Each file in these directories with the .conf suffix should con‐
53 tain one or more Group_source sections as documented in
54 [Group_source] options below. These will be merged with the
55 group sources defined in /etc/clustershell/groups.conf to form
56 the complete set of group sources that ClusterShell will use.
57 Duplicate Group_source sections are not allowed. Note: .conf
58 files that are not readable by the current user are ignored
59 (except the one that defines the default group source). The
60 variable $CFGDIR is replaced by the path of the highest priority
61 configuration directory found (where groups.conf resides). The
62 default confdir value enables both system-wide and any installed
63 user configuration (thanks to $CFGDIR). Duplicate directory
64 paths are ignored.
65
66 autodir
67 Optional list of directories where the ClusterShell library
68 should look for .yaml files that define in-file group dictionar‐
69 ies. No need to call external commands for these files, they are
70 parsed by the ClusterShell library itself. Multiple group
71 source definitions in the same file is supported. The variable
72 $CFGDIR is replaced by the path of the highest priority configu‐
73 ration directory found (where groups.conf resides). The default
74 confdir value enables both system-wide and any installed user
75 configuration (thanks to $CFGDIR). Duplicate directory paths are
76 ignored.
77
78 [Group_source] OPTIONS
79 Configuration parameters of each group source section are described
80 below.
81
82 map Specify the external shell command used to resolve a group name
83 into a nodeset, list of nodes or list of nodeset (separated by
84 space characters or by carriage returns). The variable $GROUP is
85 replaced before executing the command.
86
87 all Optional external shell command that should return a nodeset,
88 list of nodes or list of nodeset of all nodes for this group
89 source. If not specified, the library will try to resolve all
90 nodes by using the list external command in the same group
91 source followed by map for each group.
92
93 list Optional external shell command that should return the list of
94 all groups for this group source (separated by space characters
95 or by carriage returns).
96
97 reverse
98 Optional external shell command used to find the group(s) of a
99 single node. The variable $NODE is previously replaced. If this
100 upcall is not specified, the reverse operation is computed in
101 memory by the library from the list and map external calls.
102 Also, if the number of nodes to reverse is greater than the num‐
103 ber of available groups, the reverse external command is avoided
104 automatically.
105
106 cache_time
107 Number of seconds each upcall result is kept in cache, in memory
108 only. Default is 3600 seconds. This is useful only for daemons
109 using nodegroups.
110
111 When the library executes a group source external shell command, the
112 current working directory is previously set to the corresponding
113 confdir. This allows the use of relative paths for third party files in
114 the command.
115
116 In addition to context-dependent $GROUP and $NODE variables described
117 above, the two following variables are always available and also
118 replaced before executing shell commands:
119
120 · $CFGDIR is replaced by groups.conf highest priority base directory
121 path
122
123 · $SOURCE is replaced by current source name
124
125 Each external command might return a non-zero return code when the
126 operation is not doable. But if the call return zero, for instance, for
127 a non-existing group, the user will not receive any error when trying
128 to resolve such unknown group. The desired behaviour is up to the sys‐
129 tem administrator.
130
132 All external command results are cached in memory to avoid multiple
133 calls. Each result is kept for a limited amount of time. See cache_time
134 option to tune this behaviour.
135
137 Simple configuration file for local groups and slurm partitions bind‐
138 ing.
139
140 groups.conf
141 [Main]
142 default: local
143 confdir: /etc/clustershell/groups.conf.d $CFGDIR/groups.conf.d
144 autodir: /etc/clustershell/groups.d $CFGDIR/groups.d
145
146 [local]
147 map: sed -n 's/^$GROUP:(.*)/1/p' /etc/clustershell/groups
148 list: sed -n 's/^\([0-9A-Za-z_-]*\):.*/\1/p' /etc/clustershell/groups
149
150 [slurm]
151 map: sinfo -h -o "%N" -p $GROUP
152 all: sinfo -h -o "%N"
153 list: sinfo -h -o "%P"
154 reverse: sinfo -h -N -o "%P" -n $NODE
155
156
158 /etc/clustershell/groups.conf
159 System-wide node groups configuration file.
160
161 /etc/clustershell/groups.conf.d/
162 Recommended directory for additional configuration files.
163
164 /etc/clustershell/groups.d/
165 Recommended directory for autodir, where native group definition
166 files (.yaml files) are found.
167
168 $XDG_CONFIG_HOME/clustershell/groups.conf
169 Main user groups.conf configuration file. If $XDG_CONFIG_HOME is
170 not defined, $HOME/.config/clustershell/groups.conf is used
171 instead.
172
173 $HOME/.local/etc/clustershell/groups.conf
174 Local groups.conf user configuration file (default installation
175 for pip --user)
176
178 clubak(1), cluset(1), clush(1), nodeset(1)
179
180 http://clustershell.readthedocs.org/
181
183 Stephane Thiell, <sthiell@stanford.edu>
184
186 GNU Lesser General Public License version 2.1 or later (LGPLv2.1+)
187
188
189
190
1911.8.1 2018-10-30 GROUPS.CONF(5)