Statistics
| Branch: | Tag: | Revision:

root / man / gnt-group.rst @ a46b1883

History | View | Annotate | Download (6 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
| [{-D|--disk-parameters} *disk-template*:*disk-param*=*value* [,*disk-param*=*value*...]]
30
| {*group*}
31

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

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

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

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

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

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

    
56
The ``-D (--disk-parameters)`` option allows you to set the disk
57
parameters for the node group; please see the section about
58
**gnt-cluster add** in **gnt-cluster**(8) for more information about
59
disk parameters
60

    
61
ASSIGN-NODES
62
~~~~~~~~~~~~
63

    
64
| **assign-nodes**
65
| [--force]
66
| {*group*} {*node*...}
67

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

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

    
77
MODIFY
78
~~~~~~
79

    
80
| **modify**
81
| [--node-parameters=*NDPARAMS*]
82
| [--alloc-policy=*POLICY*]
83
| [--hypervisor-state *hvstate*]
84
| [{-D|--disk-parameters} *disk-template*:*disk-param*=*value* [,*disk-param*=*value*...]]
85
| [--disk-state *diskstate*]
86
| {*group*}
87

    
88
Modifies some parameters from the node group.
89

    
90
The ``--node-parameters`` and ``--alloc-policy`` options are documented
91
in the **add** command above. ``--hypervisor-state`` as well as
92
``--disk-state`` are documented in detail in **ganeti**(7).
93

    
94
The ``--node-parameters``, ``--alloc-policy`` and ``-D
95
(--disk-parameters)`` options are documented in the **add** command
96
above.
97

    
98
REMOVE
99
~~~~~~
100

    
101
| **remove** {*group*}
102

    
103
Deletes the indicated node group, which must be empty. There must always be at
104
least one group, so the last group cannot be removed.
105

    
106
LIST
107
~~~~
108

    
109
| **list** [--no-headers] [--separator=*SEPARATOR*] [-v]
110
| [-o *[+]FIELD,...*] [--filter] [group...]
111

    
112
Lists all existing node groups in the cluster.
113

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

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

    
122
The ``-o`` option takes a comma-separated list of output fields.
123
If the value of the option starts with the character ``+``, the new
124
fields will be added to the default list. This allows one to quickly
125
see the default list plus a few other fields, instead of retyping
126
the entire list of fields.
127

    
128
The available fields and their meaning are:
129

    
130
@QUERY_FIELDS_GROUP@
131

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

    
137
If no group names are given, then all groups are included. Otherwise,
138
only the named groups will be listed.
139

    
140
LIST-FIELDS
141
~~~~~~~~~~~
142

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

    
145
List available fields for node groups.
146

    
147
RENAME
148
~~~~~~
149

    
150
| **rename** {*oldname*} {*newname*}
151

    
152
Renames a given group from *oldname* to *newname*.
153

    
154

    
155
EVACUATE
156
~~~~~~~~
157

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

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

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

    
167
Example::
168

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

    
171

    
172
TAGS
173
~~~~
174

    
175
ADD-TAGS
176
^^^^^^^^
177

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

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

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

    
189
LIST-TAGS
190
^^^^^^^^^
191

    
192
**list-tags** {*groupname*}
193

    
194
List the tags of the given node group.
195

    
196
REMOVE-TAGS
197
^^^^^^^^^^^
198

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

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

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

    
210
.. vim: set textwidth=72 :
211
.. Local Variables:
212
.. mode: rst
213
.. fill-column: 72
214
.. End: