Make build_chroot compatible with Squeeze
[ganeti-local] / man / gnt-group.rst
1 gnt-group(8) Ganeti | Version @GANETI_VERSION@
2 ==============================================
3
4 Name
5 ----
6
7 gnt-group - Ganeti node-group administration
8
9 Synopsis
10 --------
11
12 **gnt-group** {command} [arguments...]
13
14 DESCRIPTION
15 -----------
16
17 The **gnt-group** command is used for node group administration in
18 the Ganeti system.
19
20 COMMANDS
21 --------
22
23 ADD
24 ~~~
25
26 | **add** [\--submit]
27 | [\--node-parameters=*NDPARAMS*]
28 | [\--alloc-policy=*POLICY*]
29 | [{-D|\--disk-parameters} *disk-template*:*disk-param*=*value*[,*disk-param*=*value*...]]
30 | [\--ipolicy-bounds-specs *bound_ispecs*]
31 | [\--ipolicy-disk-templates *template* [,*template*...]]
32 | [\--ipolicy-spindle-ratio *ratio*]
33 | [\--ipolicy-vcpu-ratio *ratio*]
34 | [\--disk-state *diskstate*]
35 | [\--hypervisor-state *hvstate*]
36 | {*group*}
37
38 Creates a new group with the given name. The node group will be
39 initially empty; to add nodes to it, use ``gnt-group assign-nodes``.
40
41 The ``--node-parameters`` option allows you to set default node
42 parameters for nodes in the group. Please see **ganeti**\(7) for more
43 information about supported key=value pairs and their corresponding
44 options.
45
46 The ``--alloc-policy`` option allows you to set an allocation policy for
47 the group at creation time. Possible values are:
48
49 unallocable
50     nodes in the group should not be candidates for instance allocation,
51     and the operation (e.g., instance creation) should fail if only
52     groups in this state could be found to satisfy the requirements.
53
54 last_resort
55     nodes in the group should not be used for instance allocations,
56     unless this would be the only way to have the operation succeed.
57
58 preferred
59     nodes in the group can be used freely for allocation of instances
60     (this is the default). Note that prioritization among groups in this
61     state will be deferred to the iallocator plugin that's being used.
62
63 The ``-D (--disk-parameters)`` option allows you to set the disk
64 parameters for the node group; please see the section about
65 **gnt-cluster add** in **gnt-cluster**\(8) for more information about
66 disk parameters
67
68 The ``--ipolicy-...`` options specify instance policies on the node
69 group, and are documented in the **gnt-cluster**\(8) man page.
70
71 See **ganeti**\(7) for a description of ``--submit`` and other common
72 options.
73
74 ASSIGN-NODES
75 ~~~~~~~~~~~~
76
77 | **assign-nodes**
78 | [\--force] [\--submit]
79 | {*group*} {*node*...}
80
81 Assigns one or more nodes to the specified group, moving them from their
82 original group (or groups).
83
84 By default, this command will refuse to proceed if the move would split
85 between groups any instance that was not previously split (a split
86 instance is an instance with a mirrored disk template, e.g. DRBD, that
87 has the primary and secondary nodes in different node groups). You can
88 force the operation with ``--force``.
89
90 See **ganeti**\(7) for a description of ``--submit`` and other common
91 options.
92
93 MODIFY
94 ~~~~~~
95
96 | **modify** [\--submit]
97 | [\--node-parameters=*NDPARAMS*]
98 | [\--alloc-policy=*POLICY*]
99 | [\--hypervisor-state *hvstate*]
100 | [{-D|\--disk-parameters} *disk-template*:*disk-param*=*value*[,*disk-param*=*value*...]]
101 | [\--disk-state *diskstate*]
102 | [\--ipolicy-bounds-specs *bound_ispecs*]
103 | [\--ipolicy-disk-templates *template* [,*template*...]]
104 | [\--ipolicy-spindle-ratio *ratio*]
105 | [\--ipolicy-vcpu-ratio *ratio*]
106 | {*group*}
107
108 Modifies some parameters from the node group.
109
110 The ``--node-parameters`` and ``--alloc-policy`` options are documented
111 in the **add** command above. ``--hypervisor-state`` as well as
112 ``--disk-state`` are documented in detail in **ganeti**\(7).
113
114 The ``--node-parameters``, ``--alloc-policy``, ``-D
115 (--disk-parameters)`` options are documented in the **add** command
116 above.
117
118 The ``--ipolicy-...`` options specify instance policies on the node
119 group, and are documented in the **gnt-cluster**\(8) man page.
120
121 See **ganeti**\(7) for a description of ``--submit`` and other common
122 options.
123
124 REMOVE
125 ~~~~~~
126
127 | **remove** [\--submit] {*group*}
128
129 Deletes the indicated node group, which must be empty. There must always be at
130 least one group, so the last group cannot be removed.
131
132 See **ganeti**\(7) for a description of ``--submit`` and other common
133 options.
134
135 LIST
136 ~~~~
137
138 | **list** [\--no-headers] [\--separator=*SEPARATOR*] [-v]
139 | [-o *[+]FIELD,...*] [\--filter] [group...]
140
141 Lists all existing node groups in the cluster.
142
143 The ``--no-headers`` option will skip the initial header line. The
144 ``--separator`` option takes an argument which denotes what will be
145 used between the output fields. Both these options are to help
146 scripting.
147
148 The ``-v`` option activates verbose mode, which changes the display of
149 special field states (see **ganeti**\(7)).
150
151 The ``-o`` option takes a comma-separated list of output fields.
152 If the value of the option starts with the character ``+``, the new
153 fields will be added to the default list. This allows one to quickly
154 see the default list plus a few other fields, instead of retyping
155 the entire list of fields.
156
157 The available fields and their meaning are:
158
159 @QUERY_FIELDS_GROUP@
160
161 If exactly one argument is given and it appears to be a query filter
162 (see **ganeti**\(7)), the query result is filtered accordingly. For
163 ambiguous cases (e.g. a single field name as a filter) the ``--filter``
164 (``-F``) option forces the argument to be treated as a filter.
165
166 If no group names are given, then all groups are included. Otherwise,
167 only the named groups will be listed.
168
169 LIST-FIELDS
170 ~~~~~~~~~~~
171
172 **list-fields** [field...]
173
174 List available fields for node groups.
175
176 RENAME
177 ~~~~~~
178
179 | **rename** [\--submit] {*oldname*} {*newname*}
180
181 Renames a given group from *oldname* to *newname*.
182
183 See **ganeti**\(7) for a description of ``--submit`` and other common
184 options.
185
186
187 EVACUATE
188 ~~~~~~~~
189
190 **evacuate** [\--submit] [\--iallocator *NAME*] [\--to *GROUP*...] {*group*}
191
192 This command will move all instances out of the given node group.
193 Instances are placed in a new group by an iallocator, either given on
194 the command line or as a cluster default.
195
196 If no specific destination groups are specified using ``--to``, all
197 groups except the evacuated group are considered.
198
199 See **ganeti**\(7) for a description of ``--submit`` and other common
200 options.
201
202 Example::
203
204     # gnt-group evacuate -I hail --to rack4 rack1
205
206
207 Tags
208 ~~~~
209
210 ADD-TAGS
211 ^^^^^^^^
212
213 **add-tags** [\--from *file*] {*groupname*} {*tag*...}
214
215 Add tags to the given node group. If any of the tags contains invalid
216 characters, the entire operation will abort.
217
218 If the ``--from`` option is given, the list of tags will be extended
219 with the contents of that file (each line becomes a tag). In this case,
220 there is not need to pass tags on the command line (if you do, both
221 sources will be used). A file name of ``-`` will be interpreted as
222 stdin.
223
224 LIST-TAGS
225 ^^^^^^^^^
226
227 **list-tags** {*groupname*}
228
229 List the tags of the given node group.
230
231 REMOVE-TAGS
232 ^^^^^^^^^^^
233
234 **remove-tags** [\--from *file*] {*groupname*} {*tag*...}
235
236 Remove tags from the given node group. If any of the tags are not
237 existing on the node, the entire operation will abort.
238
239 If the ``--from`` option is given, the list of tags to be removed will
240 be extended with the contents of that file (each line becomes a tag). In
241 this case, there is not need to pass tags on the command line (if you
242 do, tags from both sources will be removed). A file name of ``-`` will
243 be interpreted as stdin.
244
245 INFO
246 ~~~~
247
248 **info** [*group*...]
249
250 Shows config information for all (or given) groups.
251
252 SHOW-ISPECS-CMD
253 ~~~~~~~~~~~~~~~
254
255 **show-ispecs-cmd** [\--include-defaults] [*group*...]
256
257 Shows the command line that can be used to recreate the given groups (or
258 all groups, if none is given) with the same options relative to specs in
259 the instance policies.
260
261 If ``--include-defaults`` is specified, include also the default values
262 (i.e. the cluster-level settings), and not only the configuration items
263 that a group overrides.
264
265
266 .. vim: set textwidth=72 :
267 .. Local Variables:
268 .. mode: rst
269 .. fill-column: 72
270 .. End: