gnt-group.rst 5.32 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 27
| **add**
| [--node-parameters=*NDPARAMS*]
28
| [--alloc-policy=*POLICY*]
29
| {*group*}
30 31

Creates a new group with the given name. The node group will be
32
initially empty; to add nodes to it, use ``gnt-group assign-nodes``.
33

34 35 36 37
The ``--node-parameters`` option allows you to set default node
parameters for nodes in the group. Please see **ganeti**(7) for more
information about supported key=value pairs.

38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
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.

55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
ASSIGN-NODES
~~~~~~~~~~~~

| **assign-nodes**
| [--force]
| {*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``.
70

71 72 73 74 75
MODIFY
~~~~~~

| **modify**
| [--node-parameters=*NDPARAMS*]
76
| [--alloc-policy=*POLICY*]
77 78 79 80
| {*group*}

Modifies some parameters from the node group.

81 82
The ``--node-parameters`` and ``--alloc-policy`` optiosn are documented
in the **add** command above.
83

84 85 86 87 88
REMOVE
~~~~~~

| **remove** {*group*}

89 90
Deletes the indicated node group, which must be empty. There must always be at
least one group, so the last group cannot be removed.
91

92 93 94
LIST
~~~~

95
| **list** [--no-headers] [--separator=*SEPARATOR*] [-v]
96
| [-o *[+]FIELD,...*] [--filter] [group...]
97 98 99 100 101 102 103 104

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.

105 106 107
The ``-v`` option activates verbose mode, which changes the display of
special field states (see **ganeti(7)**).

108 109
The ``-o`` option takes a comma-separated list of output fields.
If the value of the option starts with the character ``+``, the new
Iustin Pop's avatar
Iustin Pop committed
110
fields will be added to the default list. This allows one to quickly
111 112 113 114 115
see the default list plus a few other fields, instead of retyping
the entire list of fields.

The available fields and their meaning are:

116
@QUERY_FIELDS_GROUP@
117

118 119 120 121 122
If exactly one argument is given and it appears to be a query filter
(see **ganeti(7)**), the query result is filtered accordingly. For
ambiguous cases (e.g. a single field name as a filter) the ``--filter``
(``-F``) option forces the argument to be treated as a filter.

123 124
If no group names are given, then all groups are included. Otherwise,
only the named groups will be listed.
125

126 127 128 129 130 131 132
LIST-FIELDS
~~~~~~~~~~~

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

List available fields for node groups.

133 134 135 136 137 138
RENAME
~~~~~~

| **rename** {*oldname*} {*newname*}

Renames a given group from *oldname* to *newname*.
139

140

141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157
EVACUATE
~~~~~~~~

**evacuate** [--iallocator *NAME*] [--to *GROUP*...] {*group*}

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.

Example::

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


158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195
TAGS
~~~~

ADD-TAGS
^^^^^^^^

**add-tags** [--from *file*] {*groupname*} {*tag*...}

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
^^^^^^^^^^^

**remove-tags** [--from *file*] {*groupname*} {*tag*...}

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.

196 197 198 199 200
.. vim: set textwidth=72 :
.. Local Variables:
.. mode: rst
.. fill-column: 72
.. End: