Repository navigation
Conversation
Braces list alternatives for a part of a node name:
server[5-9]-{mds,oss} is server[5-9]-mds,server[5-9]-oss, and
node[1-3]{,-ib} adds the -ib names of node[1-3]. Several braces in a
term form a cartesian product.
A term with braces is evaluated as a whole operand of the extended
pattern operators, so node[1-9]&node{2,4} is node[2,4]. Alternatives are
literal strings: ranges, groups, wildcards and operators are rejected
inside braces (and braces inside ranges) but still work elsewhere in the
same term, as each expansion is fed back through the parser.
{ and } become reserved characters and are added to ILLEGAL_GROUP_CHARS.
Strings without braces take the same code path as before.
Signed-off-by: Stephane Thiell <stephane@thiell.com>
thiell
force-pushed
the
feature/nodeset-braces
branch
from
November 5, 2026 17:59
9fe60d2 to
51b9736
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Braces list alternatives for a part of a node name:
server[5-9]-{mds,oss}isserver[5-9]-mds,server[5-9]-oss, andnode[1-3]{,-ib}adds the-ibnames ofnode[1-3]. Shell brace expansion is the usual workaround today, but it breaksclush -w(the shell splits the argument and clush runs the wrong command) and does not help in group sources, host files or the Python API.{a,b}expands a term once per alternative; the union is one operand of the extended pattern operators, sonode[1-9]&node{2,4}isnode[2,4](a textual rewrite would be wrong for&and^)@rack{1,2},server-{mds,oss}[0-3],n{1,2}*)-warguments everywhere{and}become reserved characters and joinILLEGAL_GROUP_CHARSclush -w, the guide, the reserved characters in groups.conf, and a warning about quoting braces on the command line