Statistics
| Branch: | Tag: | Revision:

root / man / gnt-group.rst @ a46b1883

History | View | Annotate | Download (6 kB)

1 667dbd6b Adeodato Simo
gnt-group(8) Ganeti | Version @GANETI_VERSION@
2 667dbd6b Adeodato Simo
==============================================
3 667dbd6b Adeodato Simo
4 667dbd6b Adeodato Simo
Name
5 667dbd6b Adeodato Simo
----
6 667dbd6b Adeodato Simo
7 667dbd6b Adeodato Simo
gnt-group - Ganeti node-group administration
8 667dbd6b Adeodato Simo
9 667dbd6b Adeodato Simo
Synopsis
10 667dbd6b Adeodato Simo
--------
11 667dbd6b Adeodato Simo
12 667dbd6b Adeodato Simo
**gnt-group** {command} [arguments...]
13 667dbd6b Adeodato Simo
14 667dbd6b Adeodato Simo
DESCRIPTION
15 667dbd6b Adeodato Simo
-----------
16 667dbd6b Adeodato Simo
17 667dbd6b Adeodato Simo
The **gnt-group** command is used for node group administration in
18 667dbd6b Adeodato Simo
the Ganeti system.
19 667dbd6b Adeodato Simo
20 667dbd6b Adeodato Simo
COMMANDS
21 667dbd6b Adeodato Simo
--------
22 667dbd6b Adeodato Simo
23 66e884e1 Adeodato Simo
ADD
24 66e884e1 Adeodato Simo
~~~
25 66e884e1 Adeodato Simo
26 483be60d Adeodato Simo
| **add**
27 483be60d Adeodato Simo
| [--node-parameters=*NDPARAMS*]
28 90e99856 Adeodato Simo
| [--alloc-policy=*POLICY*]
29 a46b1883 Andrea Spadaccini
| [{-D|--disk-parameters} *disk-template*:*disk-param*=*value* [,*disk-param*=*value*...]]
30 483be60d Adeodato Simo
| {*group*}
31 66e884e1 Adeodato Simo
32 66e884e1 Adeodato Simo
Creates a new group with the given name. The node group will be
33 919852da Adeodato Simo
initially empty; to add nodes to it, use ``gnt-group assign-nodes``.
34 66e884e1 Adeodato Simo
35 483be60d Adeodato Simo
The ``--node-parameters`` option allows you to set default node
36 483be60d Adeodato Simo
parameters for nodes in the group. Please see **ganeti**(7) for more
37 483be60d Adeodato Simo
information about supported key=value pairs.
38 483be60d Adeodato Simo
39 90e99856 Adeodato Simo
The ``--alloc-policy`` option allows you to set an allocation policy for
40 90e99856 Adeodato Simo
the group at creation time. Possible values are:
41 90e99856 Adeodato Simo
42 90e99856 Adeodato Simo
unallocable
43 90e99856 Adeodato Simo
    nodes in the group should not be candidates for instance allocation,
44 90e99856 Adeodato Simo
    and the operation (e.g., instance creation) should fail if only
45 90e99856 Adeodato Simo
    groups in this state could be found to satisfy the requirements.
46 90e99856 Adeodato Simo
47 90e99856 Adeodato Simo
last_resort
48 90e99856 Adeodato Simo
    nodes in the group should not be used for instance allocations,
49 90e99856 Adeodato Simo
    unless this would be the only way to have the operation succeed.
50 90e99856 Adeodato Simo
51 90e99856 Adeodato Simo
preferred
52 90e99856 Adeodato Simo
    nodes in the group can be used freely for allocation of instances
53 90e99856 Adeodato Simo
    (this is the default). Note that prioritization among groups in this
54 90e99856 Adeodato Simo
    state will be deferred to the iallocator plugin that's being used.
55 90e99856 Adeodato Simo
56 a46b1883 Andrea Spadaccini
The ``-D (--disk-parameters)`` option allows you to set the disk
57 a46b1883 Andrea Spadaccini
parameters for the node group; please see the section about
58 a46b1883 Andrea Spadaccini
**gnt-cluster add** in **gnt-cluster**(8) for more information about
59 a46b1883 Andrea Spadaccini
disk parameters
60 a46b1883 Andrea Spadaccini
61 919852da Adeodato Simo
ASSIGN-NODES
62 919852da Adeodato Simo
~~~~~~~~~~~~
63 919852da Adeodato Simo
64 919852da Adeodato Simo
| **assign-nodes**
65 919852da Adeodato Simo
| [--force]
66 919852da Adeodato Simo
| {*group*} {*node*...}
67 919852da Adeodato Simo
68 919852da Adeodato Simo
Assigns one or more nodes to the specified group, moving them from their
69 919852da Adeodato Simo
original group (or groups).
70 919852da Adeodato Simo
71 919852da Adeodato Simo
By default, this command will refuse to proceed if the move would split
72 919852da Adeodato Simo
between groups any instance that was not previously split (a split
73 919852da Adeodato Simo
instance is an instance with a mirrored disk template, e.g. DRBD, that
74 919852da Adeodato Simo
has the primary and secondary nodes in different node groups). You can
75 919852da Adeodato Simo
force the operation with ``--force``.
76 90e99856 Adeodato Simo
77 4da7909a Adeodato Simo
MODIFY
78 4da7909a Adeodato Simo
~~~~~~
79 4da7909a Adeodato Simo
80 4da7909a Adeodato Simo
| **modify**
81 4da7909a Adeodato Simo
| [--node-parameters=*NDPARAMS*]
82 90e99856 Adeodato Simo
| [--alloc-policy=*POLICY*]
83 a8282327 René Nussbaumer
| [--hypervisor-state *hvstate*]
84 a46b1883 Andrea Spadaccini
| [{-D|--disk-parameters} *disk-template*:*disk-param*=*value* [,*disk-param*=*value*...]]
85 a8282327 René Nussbaumer
| [--disk-state *diskstate*]
86 4da7909a Adeodato Simo
| {*group*}
87 4da7909a Adeodato Simo
88 4da7909a Adeodato Simo
Modifies some parameters from the node group.
89 4da7909a Adeodato Simo
90 a8282327 René Nussbaumer
The ``--node-parameters`` and ``--alloc-policy`` options are documented
91 a8282327 René Nussbaumer
in the **add** command above. ``--hypervisor-state`` as well as
92 a8282327 René Nussbaumer
``--disk-state`` are documented in detail in **ganeti**(7).
93 4da7909a Adeodato Simo
94 a46b1883 Andrea Spadaccini
The ``--node-parameters``, ``--alloc-policy`` and ``-D
95 a46b1883 Andrea Spadaccini
(--disk-parameters)`` options are documented in the **add** command
96 a46b1883 Andrea Spadaccini
above.
97 a46b1883 Andrea Spadaccini
98 66e884e1 Adeodato Simo
REMOVE
99 66e884e1 Adeodato Simo
~~~~~~
100 66e884e1 Adeodato Simo
101 66e884e1 Adeodato Simo
| **remove** {*group*}
102 66e884e1 Adeodato Simo
103 a7c5085d Stephen Shirley
Deletes the indicated node group, which must be empty. There must always be at
104 a7c5085d Stephen Shirley
least one group, so the last group cannot be removed.
105 66e884e1 Adeodato Simo
106 667dbd6b Adeodato Simo
LIST
107 667dbd6b Adeodato Simo
~~~~
108 667dbd6b Adeodato Simo
109 f0b1bafe Iustin Pop
| **list** [--no-headers] [--separator=*SEPARATOR*] [-v]
110 1b1a08e8 Michael Hanselmann
| [-o *[+]FIELD,...*] [--filter] [group...]
111 667dbd6b Adeodato Simo
112 667dbd6b Adeodato Simo
Lists all existing node groups in the cluster.
113 667dbd6b Adeodato Simo
114 667dbd6b Adeodato Simo
The ``--no-headers`` option will skip the initial header line. The
115 667dbd6b Adeodato Simo
``--separator`` option takes an argument which denotes what will be
116 667dbd6b Adeodato Simo
used between the output fields. Both these options are to help
117 667dbd6b Adeodato Simo
scripting.
118 667dbd6b Adeodato Simo
119 f0b1bafe Iustin Pop
The ``-v`` option activates verbose mode, which changes the display of
120 f0b1bafe Iustin Pop
special field states (see **ganeti(7)**).
121 f0b1bafe Iustin Pop
122 667dbd6b Adeodato Simo
The ``-o`` option takes a comma-separated list of output fields.
123 667dbd6b Adeodato Simo
If the value of the option starts with the character ``+``, the new
124 f7b769b1 Iustin Pop
fields will be added to the default list. This allows one to quickly
125 667dbd6b Adeodato Simo
see the default list plus a few other fields, instead of retyping
126 667dbd6b Adeodato Simo
the entire list of fields.
127 667dbd6b Adeodato Simo
128 667dbd6b Adeodato Simo
The available fields and their meaning are:
129 667dbd6b Adeodato Simo
130 fcdb582d Michael Hanselmann
@QUERY_FIELDS_GROUP@
131 4edc512c Adeodato Simo
132 1b1a08e8 Michael Hanselmann
If exactly one argument is given and it appears to be a query filter
133 1b1a08e8 Michael Hanselmann
(see **ganeti(7)**), the query result is filtered accordingly. For
134 1b1a08e8 Michael Hanselmann
ambiguous cases (e.g. a single field name as a filter) the ``--filter``
135 1b1a08e8 Michael Hanselmann
(``-F``) option forces the argument to be treated as a filter.
136 1b1a08e8 Michael Hanselmann
137 667dbd6b Adeodato Simo
If no group names are given, then all groups are included. Otherwise,
138 667dbd6b Adeodato Simo
only the named groups will be listed.
139 66e884e1 Adeodato Simo
140 ca4ac9c9 Adeodato Simo
LIST-FIELDS
141 ca4ac9c9 Adeodato Simo
~~~~~~~~~~~
142 ca4ac9c9 Adeodato Simo
143 ca4ac9c9 Adeodato Simo
**list-fields** [field...]
144 ca4ac9c9 Adeodato Simo
145 ca4ac9c9 Adeodato Simo
List available fields for node groups.
146 ca4ac9c9 Adeodato Simo
147 66e884e1 Adeodato Simo
RENAME
148 66e884e1 Adeodato Simo
~~~~~~
149 66e884e1 Adeodato Simo
150 66e884e1 Adeodato Simo
| **rename** {*oldname*} {*newname*}
151 66e884e1 Adeodato Simo
152 66e884e1 Adeodato Simo
Renames a given group from *oldname* to *newname*.
153 9ff4f2c0 Michael Hanselmann
154 819cbfe5 Michael Hanselmann
155 f6eb380d Michael Hanselmann
EVACUATE
156 f6eb380d Michael Hanselmann
~~~~~~~~
157 f6eb380d Michael Hanselmann
158 f6eb380d Michael Hanselmann
**evacuate** [--iallocator *NAME*] [--to *GROUP*...] {*group*}
159 f6eb380d Michael Hanselmann
160 f6eb380d Michael Hanselmann
This command will move all instances out of the given node group.
161 f6eb380d Michael Hanselmann
Instances are placed in a new group by an iallocator, either given on
162 f6eb380d Michael Hanselmann
the command line or as a cluster default.
163 f6eb380d Michael Hanselmann
164 f6eb380d Michael Hanselmann
If no specific destination groups are specified using ``--to``, all
165 f6eb380d Michael Hanselmann
groups except the evacuated group are considered.
166 f6eb380d Michael Hanselmann
167 f6eb380d Michael Hanselmann
Example::
168 f6eb380d Michael Hanselmann
169 f6eb380d Michael Hanselmann
    # gnt-group evacuate -I hail --to rack4 rack1
170 f6eb380d Michael Hanselmann
171 f6eb380d Michael Hanselmann
172 819cbfe5 Michael Hanselmann
TAGS
173 819cbfe5 Michael Hanselmann
~~~~
174 819cbfe5 Michael Hanselmann
175 819cbfe5 Michael Hanselmann
ADD-TAGS
176 819cbfe5 Michael Hanselmann
^^^^^^^^
177 819cbfe5 Michael Hanselmann
178 819cbfe5 Michael Hanselmann
**add-tags** [--from *file*] {*groupname*} {*tag*...}
179 819cbfe5 Michael Hanselmann
180 819cbfe5 Michael Hanselmann
Add tags to the given node group. If any of the tags contains invalid
181 819cbfe5 Michael Hanselmann
characters, the entire operation will abort.
182 819cbfe5 Michael Hanselmann
183 819cbfe5 Michael Hanselmann
If the ``--from`` option is given, the list of tags will be extended
184 819cbfe5 Michael Hanselmann
with the contents of that file (each line becomes a tag). In this case,
185 819cbfe5 Michael Hanselmann
there is not need to pass tags on the command line (if you do, both
186 819cbfe5 Michael Hanselmann
sources will be used). A file name of ``-`` will be interpreted as
187 819cbfe5 Michael Hanselmann
stdin.
188 819cbfe5 Michael Hanselmann
189 819cbfe5 Michael Hanselmann
LIST-TAGS
190 819cbfe5 Michael Hanselmann
^^^^^^^^^
191 819cbfe5 Michael Hanselmann
192 819cbfe5 Michael Hanselmann
**list-tags** {*groupname*}
193 819cbfe5 Michael Hanselmann
194 819cbfe5 Michael Hanselmann
List the tags of the given node group.
195 819cbfe5 Michael Hanselmann
196 819cbfe5 Michael Hanselmann
REMOVE-TAGS
197 819cbfe5 Michael Hanselmann
^^^^^^^^^^^
198 819cbfe5 Michael Hanselmann
199 819cbfe5 Michael Hanselmann
**remove-tags** [--from *file*] {*groupname*} {*tag*...}
200 819cbfe5 Michael Hanselmann
201 819cbfe5 Michael Hanselmann
Remove tags from the given node group. If any of the tags are not
202 819cbfe5 Michael Hanselmann
existing on the node, the entire operation will abort.
203 819cbfe5 Michael Hanselmann
204 819cbfe5 Michael Hanselmann
If the ``--from`` option is given, the list of tags to be removed will
205 819cbfe5 Michael Hanselmann
be extended with the contents of that file (each line becomes a tag). In
206 819cbfe5 Michael Hanselmann
this case, there is not need to pass tags on the command line (if you
207 819cbfe5 Michael Hanselmann
do, tags from both sources will be removed). A file name of ``-`` will
208 819cbfe5 Michael Hanselmann
be interpreted as stdin.
209 819cbfe5 Michael Hanselmann
210 9ff4f2c0 Michael Hanselmann
.. vim: set textwidth=72 :
211 9ff4f2c0 Michael Hanselmann
.. Local Variables:
212 9ff4f2c0 Michael Hanselmann
.. mode: rst
213 9ff4f2c0 Michael Hanselmann
.. fill-column: 72
214 9ff4f2c0 Michael Hanselmann
.. End: