This specification describes a compact form for expressing a list of hostnames which contain an optional numerical part.
Editor: Mark A. Grondona <email@example.com>
The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in RFC 2119.
The hostlist is a somewhat well known format supported by
existing HPC tools such as pdsh,
powerman, and genders. The format is designed as a convenience
on systems where hostnames are assigned with a common prefix, a numeric
part, and an optional suffix. The result is a compact way to represent
a possibly large list of hosts by name, e.g.
This RFC details the Flux implementation of the hostlist format.
A hostlist SHALL represent an ordered list of strings.
A hostlist string SHALL be a list of comma separated hostlist expressions.
A hostlist expression SHALL be a string of the form
prefix[idlist]suffix, where all components
suffix are OPTIONAL.
An empty hostlist expression,
"", SHALL represent an empty list.
The prefix and suffix components of a hostlist expression SHALL
consist of any printable, non-whitespace ASCII character besides the special
characters including square brackets: “
[ ]”, and comma: “
An idlist SHALL represent an ordered list of non-negative integer ids.
An idlist MAY be a simple comma-separated list, e.g.
Consecutive ids in an idlist MAY be compressed into hyphenated ranges,
Leading zeros in the first element of an idlist SHALL be preserved
across all ids in the list, e.g.
005,4,11-13 represents the list
An idlist MAY contain repeated numbers, e.g.
2,2,2 is a valid list.
Within a hostlist expression, an idlist SHALL be enclosed in square