2008-03-14 20:54:31 +00:00
|
|
|
=head1 Name
|
|
|
|
|
|
|
|
B<noderange> - syntax for compactly expressing a list of node names
|
|
|
|
|
|
|
|
=head1 B<Synopsis>
|
|
|
|
|
|
|
|
I<Examples:>
|
|
|
|
|
2008-08-19 01:29:31 +00:00
|
|
|
node1,node2,node8,node20,group1
|
2008-03-14 20:54:31 +00:00
|
|
|
|
2008-08-19 01:29:31 +00:00
|
|
|
node14-node56,node70-node203,group1-group10
|
2008-03-14 20:54:31 +00:00
|
|
|
|
2008-08-19 01:29:31 +00:00
|
|
|
node1,node2,node8,node20,node14-node56,node70-node203
|
2008-03-14 20:54:31 +00:00
|
|
|
|
2008-08-19 01:29:31 +00:00
|
|
|
node[14-56]
|
2008-03-14 20:54:31 +00:00
|
|
|
|
2008-08-19 01:29:31 +00:00
|
|
|
all,-node129-node256,-frame01-frame03
|
2008-03-14 20:54:31 +00:00
|
|
|
|
2008-08-19 01:29:31 +00:00
|
|
|
/node.*
|
2008-03-14 20:54:31 +00:00
|
|
|
|
2008-08-19 01:29:31 +00:00
|
|
|
^/tmp/nodes
|
2008-03-14 20:54:31 +00:00
|
|
|
|
2008-08-19 01:29:31 +00:00
|
|
|
node10+5
|
2008-03-14 20:54:31 +00:00
|
|
|
|
2008-08-19 01:29:31 +00:00
|
|
|
10-15,-13
|
2008-03-14 20:54:31 +00:00
|
|
|
|
2008-08-19 01:29:31 +00:00
|
|
|
group1@group2
|
2008-03-14 20:54:31 +00:00
|
|
|
|
2009-10-01 11:53:18 +00:00
|
|
|
table.attribute<operator>value
|
|
|
|
|
2008-03-14 20:54:31 +00:00
|
|
|
=head1 B<Description>
|
|
|
|
|
2008-08-19 01:29:31 +00:00
|
|
|
B<noderange> is a syntax that can be used in most xCAT commands to
|
|
|
|
conveniently specify a list of nodes. The result is that the command will
|
2008-03-14 20:54:31 +00:00
|
|
|
be applied to a range of nodes, often in parallel.
|
|
|
|
|
2008-08-19 01:29:31 +00:00
|
|
|
B<noderange> is a comma-separated list. Each token (text between commas)
|
2008-03-14 20:54:31 +00:00
|
|
|
in the list can be any of the forms listed below:
|
|
|
|
|
|
|
|
Individual node or group:
|
|
|
|
|
2008-08-19 01:29:31 +00:00
|
|
|
node01
|
|
|
|
group1
|
2008-03-14 20:54:31 +00:00
|
|
|
|
|
|
|
A range of nodes or groups:
|
|
|
|
|
2008-08-19 01:29:31 +00:00
|
|
|
node01-node10 (equivalent to: node01,node02,node03,...node10)
|
|
|
|
node[01-10] (same as above)
|
|
|
|
node01:node10 (same as above)
|
|
|
|
node[01:10] (same as above)
|
|
|
|
group1-group3 (equivalent to: group1,group2,group3)
|
|
|
|
(all the permutations supported above for nodes are also supported for groups)
|
2008-03-14 20:54:31 +00:00
|
|
|
|
2008-08-19 01:29:31 +00:00
|
|
|
B<nodeRange> tries to be intelligent about detecting padding, so
|
|
|
|
you can specify "node001-node200" and it will add the proper number of
|
|
|
|
zeroes to make all numbers 3 digits.
|
2008-03-14 20:54:31 +00:00
|
|
|
|
|
|
|
An incremented range of nodes:
|
|
|
|
|
2008-08-19 01:29:31 +00:00
|
|
|
node10+3 (equivalent to: node10,node11,node12,node13)
|
|
|
|
|
|
|
|
A node shorthand range of nodes:
|
|
|
|
|
|
|
|
10-20 (equivalent to: node10,node11,node12,...node20)
|
|
|
|
10+3 (equivalent to: node10,node11,node12,node13)
|
|
|
|
|
|
|
|
Currently, the prefix that will be prepended for the above syntax is always "node".
|
|
|
|
Eventually, the prefix and optional suffix will be settable via the environment variables
|
|
|
|
XCAT_NODE_PREFIX and XCAT_NODE_SUFFIX, but currently this only works in bypass mode.
|
|
|
|
|
|
|
|
A regular expression match of nodes or groups:
|
|
|
|
|
|
|
|
/node[345].* (will match any nodes that start with node3, node4, or node5)
|
|
|
|
/group[12].* (will match any groups that start with group1 or group2)
|
2008-03-14 20:54:31 +00:00
|
|
|
|
|
|
|
The full path of a file containing noderanges of nodes or groups:
|
|
|
|
|
2008-08-19 01:29:31 +00:00
|
|
|
^/tmp/nodelist
|
2008-03-14 20:54:31 +00:00
|
|
|
|
2008-08-19 01:29:31 +00:00
|
|
|
where /tmp/nodelist can contain entries like:
|
2008-03-14 20:54:31 +00:00
|
|
|
|
2008-08-19 01:29:31 +00:00
|
|
|
#my node list (this line ignored)
|
|
|
|
^/tmp/foo #ignored
|
|
|
|
node01 #node comment
|
|
|
|
node02
|
|
|
|
node03
|
|
|
|
node10-node20
|
|
|
|
/group[456].*
|
|
|
|
-node50
|
2008-03-14 20:54:31 +00:00
|
|
|
|
2008-08-19 01:29:31 +00:00
|
|
|
Node ranges can contain any combination:
|
2008-03-14 20:54:31 +00:00
|
|
|
|
2008-08-19 01:29:31 +00:00
|
|
|
node01-node30,node40,^/tmp/nodes,/node[13].*,2-10,node50+5
|
2008-03-14 20:54:31 +00:00
|
|
|
|
2008-08-19 01:29:31 +00:00
|
|
|
Any individual B<noderange> may be prefixed with an exclusion operator
|
|
|
|
(default -) with the exception of the file operator (default ^). This will cause
|
|
|
|
that individual noderange to be subtracted from the total resulting list of nodes.
|
2008-03-14 20:54:31 +00:00
|
|
|
|
|
|
|
The intersection operator @ calculates the intersection of the left and
|
|
|
|
right sides:
|
|
|
|
|
2008-08-19 01:29:31 +00:00
|
|
|
group1@group2 (will result in the list of nodes that group1 and group2 have in common)
|
2008-03-14 20:54:31 +00:00
|
|
|
|
|
|
|
Any combination or multiple combinations of inclusive and exclusive
|
|
|
|
ranges of nodes and groups is legal. There is no precedence implied in
|
|
|
|
the order of the arguments. Exclusive ranges have precedence over
|
2008-08-19 01:29:31 +00:00
|
|
|
inclusive. Parentheses can be used to explicitly specify precendence of any operators.
|
2008-03-14 20:54:31 +00:00
|
|
|
|
2008-08-19 01:29:31 +00:00
|
|
|
Nodes have precedence over groups. If a node range match is made then
|
2008-03-14 20:54:31 +00:00
|
|
|
no group range match will be attempted.
|
|
|
|
|
2008-08-19 01:29:31 +00:00
|
|
|
All node and group names are validated against the nodelist table. Invalid names
|
2008-03-14 20:54:31 +00:00
|
|
|
are ignored and return nothing.
|
|
|
|
|
2008-08-19 01:29:31 +00:00
|
|
|
=head2 B<xCAT Node Name Format>
|
2008-03-14 20:54:31 +00:00
|
|
|
|
2008-08-19 01:29:31 +00:00
|
|
|
Throughout this man page the term B<xCAT Node Name Format> is used.
|
|
|
|
B<xCAT Node Name Format> is defined by the following regex:
|
2008-03-14 20:54:31 +00:00
|
|
|
|
2008-08-19 01:29:31 +00:00
|
|
|
^([A-Za-z-]+)([0-9]+)(([A-Za-z-]+[A-Za-z0-9-]*)*)
|
2008-03-14 20:54:31 +00:00
|
|
|
|
2008-08-19 01:29:31 +00:00
|
|
|
In plain English, a node or group name is in B<xCAT Node Name Format> if starting
|
|
|
|
from the begining there are:
|
2008-03-14 20:54:31 +00:00
|
|
|
|
2008-08-19 01:29:31 +00:00
|
|
|
=over 2
|
2008-03-14 20:54:31 +00:00
|
|
|
|
2008-08-19 01:29:31 +00:00
|
|
|
=item *
|
2008-03-14 20:54:31 +00:00
|
|
|
|
2008-08-19 01:29:31 +00:00
|
|
|
one or more alpha characters of any case and any number of "-" in any combination
|
2008-03-14 20:54:31 +00:00
|
|
|
|
2008-08-19 01:29:31 +00:00
|
|
|
=item *
|
2008-03-14 20:54:31 +00:00
|
|
|
|
2008-08-19 01:29:31 +00:00
|
|
|
followed by one or more numbers
|
2008-03-14 20:54:31 +00:00
|
|
|
|
2008-08-19 01:29:31 +00:00
|
|
|
=item *
|
2008-03-14 20:54:31 +00:00
|
|
|
|
2008-08-19 01:29:31 +00:00
|
|
|
then optionally followed by one alpha character of any case or "-"
|
2008-03-14 20:54:31 +00:00
|
|
|
|
2008-08-19 01:29:31 +00:00
|
|
|
=item *
|
2008-03-14 20:54:31 +00:00
|
|
|
|
2008-08-19 01:29:31 +00:00
|
|
|
followed by any combination of case mixed alphanumerics and "-"
|
2008-03-14 20:54:31 +00:00
|
|
|
|
2008-08-19 01:29:31 +00:00
|
|
|
=back
|
2008-03-14 20:54:31 +00:00
|
|
|
|
2008-08-19 01:29:31 +00:00
|
|
|
B<noderange> supports node/group names in I<any> format. B<xCAT Node Name Format> is
|
|
|
|
B<not> required, however some node range methods used to determine range
|
|
|
|
will not be used for non-conformant names.
|
2008-03-14 20:54:31 +00:00
|
|
|
|
2008-08-19 01:29:31 +00:00
|
|
|
Example of B<xCAT Node Name Format> node/group names:
|
2008-03-14 20:54:31 +00:00
|
|
|
|
2008-08-19 01:29:31 +00:00
|
|
|
NODENAME PREFIX NUMBER SUFFIX
|
|
|
|
node1 node 1
|
|
|
|
node001 node 001
|
|
|
|
node-001 node- 001
|
|
|
|
node-foo-001-bar node-foo- 001 -bar
|
|
|
|
node-foo-1bar node-foo- 1 bar
|
|
|
|
foo1bar2 foo 1 bar2
|
|
|
|
rack01unit34 rack 01 unit34
|
|
|
|
unit34rack01 unit 34 rack01
|
|
|
|
pos0134 pos 0134
|
2008-03-14 20:54:31 +00:00
|
|
|
|
|
|
|
|
2008-08-19 01:29:31 +00:00
|
|
|
=head1 B<Examples>
|
2008-03-14 20:54:31 +00:00
|
|
|
|
2008-08-19 01:29:31 +00:00
|
|
|
=over 3
|
2008-03-14 20:54:31 +00:00
|
|
|
|
2008-08-19 01:29:31 +00:00
|
|
|
=item 1.
|
2008-03-14 20:54:31 +00:00
|
|
|
|
2008-08-19 01:29:31 +00:00
|
|
|
Generates a list of all nodes (assuming all is a group) listed in the
|
|
|
|
B<nodelist> table less node5 through node10:
|
2008-03-14 20:54:31 +00:00
|
|
|
|
2008-08-19 01:29:31 +00:00
|
|
|
all,-node5-node10
|
2008-03-14 20:54:31 +00:00
|
|
|
|
2008-08-19 01:29:31 +00:00
|
|
|
=item 2.
|
2008-03-14 20:54:31 +00:00
|
|
|
|
|
|
|
Generates a list of nodes 1 through 10 less nodes 3,4,5. Note that
|
|
|
|
node4 is listed twice, first in the range and then at the end. Because
|
|
|
|
exclusion has precedence node4 will be excluded.
|
|
|
|
|
2008-08-19 01:29:31 +00:00
|
|
|
node1-node10,-node3-node5,node4
|
|
|
|
|
|
|
|
=item 3.
|
2008-03-14 20:54:31 +00:00
|
|
|
|
|
|
|
Generates a list of nodes 1 through 10 less nodes 3 and 5.
|
|
|
|
|
2008-08-19 01:29:31 +00:00
|
|
|
node1-node10,-node3,-node5
|
|
|
|
|
|
|
|
=item 4.
|
2008-03-14 20:54:31 +00:00
|
|
|
|
|
|
|
Generates a list of all (assuming `all' is a group) nodes in the
|
|
|
|
B<nodelist> table less 17 through 32.
|
|
|
|
|
2008-08-19 01:29:31 +00:00
|
|
|
-node17-node32,all
|
|
|
|
|
|
|
|
=item 5.
|
2008-03-14 20:54:31 +00:00
|
|
|
|
|
|
|
Generates a list of nodes 1 through 128, and user nodes 1 through 4.
|
|
|
|
|
2008-08-19 01:29:31 +00:00
|
|
|
node1-node128,user1-user4
|
|
|
|
|
|
|
|
=item 6.
|
2008-03-14 20:54:31 +00:00
|
|
|
|
|
|
|
Generates a list of all nodes (assuming `all' is a group), less nodes
|
|
|
|
in groups rack1 through rack3 (assuming groups rack1, rack2, and rack3
|
|
|
|
are defined), less nodes 100 through 200, less nodes in the storage
|
|
|
|
group. Note that node150 is listed but is excluded.
|
|
|
|
|
2008-08-19 01:29:31 +00:00
|
|
|
all,-rack1-rack3,-node100-node200,node150,-storage
|
|
|
|
|
|
|
|
=item 7.
|
2008-03-14 20:54:31 +00:00
|
|
|
|
|
|
|
Generates a list of nodes matching the regex I<node[23].*>. That is all
|
|
|
|
nodes that start with node2 or node3 and end in anything or nothing.
|
|
|
|
E.g. node2, node3, node20, node30, node21234 all match.
|
|
|
|
|
2008-08-19 01:29:31 +00:00
|
|
|
/node[23].*
|
|
|
|
|
2009-10-01 11:53:18 +00:00
|
|
|
=item 8.
|
|
|
|
|
|
|
|
Generates a list of nodes which have the value hmc in the nodehm.cons
|
|
|
|
attribute.
|
|
|
|
|
|
|
|
nodehm.cons==hmc
|
|
|
|
|
|
|
|
nodehm.cons=~hmc
|
|
|
|
|
2008-08-19 01:29:31 +00:00
|
|
|
=back
|
|
|
|
|
|
|
|
|
2008-03-14 20:54:31 +00:00
|
|
|
=head1 B<SEE ALSO>
|
|
|
|
|
2008-08-02 16:18:07 +00:00
|
|
|
L<nodels(1)|nodels.1>
|