gnt-group.rst 8.34 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
gnt-group(8) Ganeti | Version @GANETI_VERSION@
==============================================

Name
----

gnt-group - Ganeti node-group administration

Synopsis
--------

**gnt-group** {command} [arguments...]

DESCRIPTION
-----------

The **gnt-group** command is used for node group administration in
the Ganeti system.

COMMANDS
--------

23 24 25
ADD
~~~

26
| **add** [\--submit] [\--print-job-id]
Iustin Pop's avatar
Iustin Pop committed
27 28 29
| [\--node-parameters=*NDPARAMS*]
| [\--alloc-policy=*POLICY*]
| [{-D|\--disk-parameters} *disk-template*:*disk-param*=*value*[,*disk-param*=*value*...]]
30
| [\--ipolicy-bounds-specs *bound_ispecs*]
31
| [\--ipolicy-disk-templates *template* [,*template*...]]
32 33
| [\--ipolicy-spindle-ratio *ratio*]
| [\--ipolicy-vcpu-ratio *ratio*]
Iustin Pop's avatar
Iustin Pop committed
34 35
| [\--disk-state *diskstate*]
| [\--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 44
information about supported key=value pairs and their corresponding
options.
45

46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
The ``--alloc-policy`` option allows you to set an allocation policy for
the group at creation time. Possible values are:

unallocable
    nodes in the group should not be candidates for instance allocation,
    and the operation (e.g., instance creation) should fail if only
    groups in this state could be found to satisfy the requirements.

last_resort
    nodes in the group should not be used for instance allocations,
    unless this would be the only way to have the operation succeed.

preferred
    nodes in the group can be used freely for allocation of instances
    (this is the default). Note that prioritization among groups in this
    state will be deferred to the iallocator plugin that's being used.

63 64
The ``-D (--disk-parameters)`` option allows you to set the disk
parameters for the node group; please see the section about
65
**gnt-cluster add** in **gnt-cluster**\(8) for more information about
66 67
disk parameters

68 69
The ``--ipolicy-...`` options specify instance policies on the node
group, and are documented in the **gnt-cluster**\(8) man page.
Agata Murawska's avatar
Agata Murawska committed
70

71
See **ganeti**\(7) for a description of ``--submit`` and other common
72 73
options.

74 75 76 77
ASSIGN-NODES
~~~~~~~~~~~~

| **assign-nodes**
78
| [\--force] [\--submit] [\--print-job-id]
79 80 81 82 83 84 85 86 87 88
| {*group*} {*node*...}

Assigns one or more nodes to the specified group, moving them from their
original group (or groups).

By default, this command will refuse to proceed if the move would split
between groups any instance that was not previously split (a split
instance is an instance with a mirrored disk template, e.g. DRBD, that
has the primary and secondary nodes in different node groups). You can
force the operation with ``--force``.
89

90
See **ganeti**\(7) for a description of ``--submit`` and other common
91 92
options.

93 94 95
MODIFY
~~~~~~

96
| **modify** [\--submit] [\--print-job-id]
Iustin Pop's avatar
Iustin Pop committed
97 98 99 100 101
| [\--node-parameters=*NDPARAMS*]
| [\--alloc-policy=*POLICY*]
| [\--hypervisor-state *hvstate*]
| [{-D|\--disk-parameters} *disk-template*:*disk-param*=*value*[,*disk-param*=*value*...]]
| [\--disk-state *diskstate*]
102
| [\--ipolicy-bounds-specs *bound_ispecs*]
103
| [\--ipolicy-disk-templates *template* [,*template*...]]
104 105
| [\--ipolicy-spindle-ratio *ratio*]
| [\--ipolicy-vcpu-ratio *ratio*]
106 107 108 109
| {*group*}

Modifies some parameters from the node group.

110 111
The ``--node-parameters`` and ``--alloc-policy`` options are documented
in the **add** command above. ``--hypervisor-state`` as well as
112
``--disk-state`` are documented in detail in **ganeti**\(7).
113

Agata Murawska's avatar
Agata Murawska committed
114
The ``--node-parameters``, ``--alloc-policy``, ``-D
115 116 117
(--disk-parameters)`` options are documented in the **add** command
above.

118 119
The ``--ipolicy-...`` options specify instance policies on the node
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 123
options.

124 125 126
REMOVE
~~~~~~

127
| **remove** [\--submit] [\--print-job-id] {*group*}
128

129 130
Deletes the indicated node group, which must be empty. There must always be at
least one group, so the last group cannot be removed.
131

132
See **ganeti**\(7) for a description of ``--submit`` and other common
133 134
options.

135 136 137
LIST
~~~~

Iustin Pop's avatar
Iustin Pop committed
138 139
| **list** [\--no-headers] [\--separator=*SEPARATOR*] [-v]
| [-o *[+]FIELD,...*] [\--filter] [group...]
140 141 142 143 144 145 146 147

Lists all existing node groups in the cluster.

The ``--no-headers`` option will skip the initial header line. The
``--separator`` option takes an argument which denotes what will be
used between the output fields. Both these options are to help
scripting.

148
The ``-v`` option activates verbose mode, which changes the display of
149
special field states (see **ganeti**\(7)).
150

151 152
The ``-o`` option takes a comma-separated list of output fields.
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 155 156 157 158
see the default list plus a few other fields, instead of retyping
the entire list of fields.

The available fields and their meaning are:

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 164 165
ambiguous cases (e.g. a single field name as a filter) the ``--filter``
(``-F``) option forces the argument to be treated as a filter.

166 167
If no group names are given, then all groups are included. Otherwise,
only the named groups will be listed.
168

169 170 171 172 173 174 175
LIST-FIELDS
~~~~~~~~~~~

**list-fields** [field...]

List available fields for node groups.

176 177 178
RENAME
~~~~~~

179
| **rename** [\--submit] [\--print-job-id] {*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 185
options.

186

187 188 189
EVACUATE
~~~~~~~~

190
| **evacuate** [\--submit] [\--print-job-id] [\--sequential] [\--force-failover]
191
| [\--iallocator *NAME*] [\--to *GROUP*...] {*group*}
192 193 194 195 196 197 198 199

This command will move all instances out of the given node group.
Instances are placed in a new group by an iallocator, either given on
the command line or as a cluster default.

If no specific destination groups are specified using ``--to``, all
groups except the evacuated group are considered.

200 201 202 203
The moves of the individual instances are handled as separate jobs
to allow for maximal parallelism. If the ``--sequential`` option is
given, the moves of the individual instances will be executed sequentially.
This can be usefull if the link between the groups is vulnerable to
204 205 206
congestion. If the ``--force-failover`` option is given, no migrations
will be made. This might be necessary if the group being evacuated is
too different from the other groups in the cluster.
207

208
See **ganeti**\(7) for a description of ``--submit`` and other common
209 210
options.

211 212 213 214 215
Example::

    # gnt-group evacuate -I hail --to rack4 rack1


216
Tags
217 218 219 220 221
~~~~

ADD-TAGS
^^^^^^^^

Iustin Pop's avatar
Iustin Pop committed
222
**add-tags** [\--from *file*] {*groupname*} {*tag*...}
223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242

Add tags to the given node group. If any of the tags contains invalid
characters, the entire operation will abort.

If the ``--from`` option is given, the list of tags will be extended
with the contents of that file (each line becomes a tag). In this case,
there is not need to pass tags on the command line (if you do, both
sources will be used). A file name of ``-`` will be interpreted as
stdin.

LIST-TAGS
^^^^^^^^^

**list-tags** {*groupname*}

List the tags of the given node group.

REMOVE-TAGS
^^^^^^^^^^^

Iustin Pop's avatar
Iustin Pop committed
243
**remove-tags** [\--from *file*] {*groupname*} {*tag*...}
244 245 246 247 248 249 250 251 252 253

Remove tags from the given node group. If any of the tags are not
existing on the node, the entire operation will abort.

If the ``--from`` option is given, the list of tags to be removed will
be extended with the contents of that file (each line becomes a tag). In
this case, there is not need to pass tags on the command line (if you
do, tags from both sources will be removed). A file name of ``-`` will
be interpreted as stdin.

254 255 256
INFO
~~~~

257
**info** [*group*...]
258 259 260

Shows config information for all (or given) groups.

261 262 263 264 265 266 267 268 269 270 271 272 273
SHOW-ISPECS-CMD
~~~~~~~~~~~~~~~

**show-ispecs-cmd** [\--include-defaults] [*group*...]

Shows the command line that can be used to recreate the given groups (or
all groups, if none is given) with the same options relative to specs in
the instance policies.

If ``--include-defaults`` is specified, include also the default values
(i.e. the cluster-level settings), and not only the configuration items
that a group overrides.

274

275 276 277 278 279
.. vim: set textwidth=72 :
.. Local Variables:
.. mode: rst
.. fill-column: 72
.. End: