Statistics
| Branch: | Tag: | Revision:

root / man / gnt-group.rst @ a8282327

History | View | Annotate | Download (5.5 kB)

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**
27
| [--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
The ``--node-parameters`` option allows you to set default node
35
parameters for nodes in the group. Please see **ganeti**(7) for more
36
information about supported key=value pairs.
37

    
38
The ``--alloc-policy`` option allows you to set an allocation policy for
39
the group at creation time. Possible values are:
40

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

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

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

    
55
ASSIGN-NODES
56
~~~~~~~~~~~~
57

    
58
| **assign-nodes**
59
| [--force]
60
| {*group*} {*node*...}
61

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

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

    
71
MODIFY
72
~~~~~~
73

    
74
| **modify**
75
| [--node-parameters=*NDPARAMS*]
76
| [--alloc-policy=*POLICY*]
77
| [--hypervisor-state *hvstate*]
78
| [--disk-state *diskstate*]
79
| {*group*}
80

    
81
Modifies some parameters from the node group.
82

    
83
The ``--node-parameters`` and ``--alloc-policy`` options are documented
84
in the **add** command above. ``--hypervisor-state`` as well as
85
``--disk-state`` are documented in detail in **ganeti**(7).
86

    
87
REMOVE
88
~~~~~~
89

    
90
| **remove** {*group*}
91

    
92
Deletes the indicated node group, which must be empty. There must always be at
93
least one group, so the last group cannot be removed.
94

    
95
LIST
96
~~~~
97

    
98
| **list** [--no-headers] [--separator=*SEPARATOR*] [-v]
99
| [-o *[+]FIELD,...*] [--filter] [group...]
100

    
101
Lists all existing node groups in the cluster.
102

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

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

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

    
117
The available fields and their meaning are:
118

    
119
@QUERY_FIELDS_GROUP@
120

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

    
126
If no group names are given, then all groups are included. Otherwise,
127
only the named groups will be listed.
128

    
129
LIST-FIELDS
130
~~~~~~~~~~~
131

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

    
134
List available fields for node groups.
135

    
136
RENAME
137
~~~~~~
138

    
139
| **rename** {*oldname*} {*newname*}
140

    
141
Renames a given group from *oldname* to *newname*.
142

    
143

    
144
EVACUATE
145
~~~~~~~~
146

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

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

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

    
156
Example::
157

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

    
160

    
161
TAGS
162
~~~~
163

    
164
ADD-TAGS
165
^^^^^^^^
166

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

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

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

    
178
LIST-TAGS
179
^^^^^^^^^
180

    
181
**list-tags** {*groupname*}
182

    
183
List the tags of the given node group.
184

    
185
REMOVE-TAGS
186
^^^^^^^^^^^
187

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

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

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

    
199
.. vim: set textwidth=72 :
200
.. Local Variables:
201
.. mode: rst
202
.. fill-column: 72
203
.. End: