Statistics
| Branch: | Tag: | Revision:

root / man / gnt-cluster.rst @ a46b1883

History | View | Annotate | Download (27 kB)

1 3cb9e1fe Iustin Pop
gnt-cluster(8) Ganeti | Version @GANETI_VERSION@
2 3cb9e1fe Iustin Pop
================================================
3 3cb9e1fe Iustin Pop
4 3cb9e1fe Iustin Pop
Name
5 3cb9e1fe Iustin Pop
----
6 3cb9e1fe Iustin Pop
7 3cb9e1fe Iustin Pop
gnt-cluster - Ganeti administration, cluster-wide
8 3cb9e1fe Iustin Pop
9 3cb9e1fe Iustin Pop
Synopsis
10 3cb9e1fe Iustin Pop
--------
11 3cb9e1fe Iustin Pop
12 3cb9e1fe Iustin Pop
**gnt-cluster** {command} [arguments...]
13 3cb9e1fe Iustin Pop
14 3cb9e1fe Iustin Pop
DESCRIPTION
15 3cb9e1fe Iustin Pop
-----------
16 3cb9e1fe Iustin Pop
17 3cb9e1fe Iustin Pop
The **gnt-cluster** is used for cluster-wide administration in the
18 3cb9e1fe Iustin Pop
Ganeti system.
19 3cb9e1fe Iustin Pop
20 3cb9e1fe Iustin Pop
COMMANDS
21 3cb9e1fe Iustin Pop
--------
22 3cb9e1fe Iustin Pop
23 fb926117 Andrea Spadaccini
ACTIVATE-MASTER-IP
24 fb926117 Andrea Spadaccini
~~~~~~~~~~~~~~~~~~
25 fb926117 Andrea Spadaccini
26 fb926117 Andrea Spadaccini
**activate-master-ip**
27 fb926117 Andrea Spadaccini
28 fb926117 Andrea Spadaccini
Activates the master IP on the master node.
29 fb926117 Andrea Spadaccini
30 3cb9e1fe Iustin Pop
ADD-TAGS
31 3cb9e1fe Iustin Pop
~~~~~~~~
32 3cb9e1fe Iustin Pop
33 3cb9e1fe Iustin Pop
**add-tags** [--from *file*] {*tag*...}
34 3cb9e1fe Iustin Pop
35 3cb9e1fe Iustin Pop
Add tags to the cluster. If any of the tags contains invalid
36 3cb9e1fe Iustin Pop
characters, the entire operation will abort.
37 3cb9e1fe Iustin Pop
38 3cb9e1fe Iustin Pop
If the ``--from`` option is given, the list of tags will be
39 3cb9e1fe Iustin Pop
extended with the contents of that file (each line becomes a tag).
40 3cb9e1fe Iustin Pop
In this case, there is not need to pass tags on the command line
41 3cb9e1fe Iustin Pop
(if you do, both sources will be used). A file name of - will be
42 3cb9e1fe Iustin Pop
interpreted as stdin.
43 3cb9e1fe Iustin Pop
44 3cb9e1fe Iustin Pop
COMMAND
45 3cb9e1fe Iustin Pop
~~~~~~~
46 3cb9e1fe Iustin Pop
47 b6e88032 Michael Hanselmann
**command** [-n *node*] [-g *group*] {*command*}
48 3cb9e1fe Iustin Pop
49 3cb9e1fe Iustin Pop
Executes a command on all nodes. If the option ``-n`` is not given,
50 3cb9e1fe Iustin Pop
the command will be executed on all nodes, otherwise it will be
51 3cb9e1fe Iustin Pop
executed only on the node(s) specified. Use the option multiple
52 3cb9e1fe Iustin Pop
times for running it on multiple nodes, like::
53 3cb9e1fe Iustin Pop
54 3cb9e1fe Iustin Pop
    # gnt-cluster command -n node1.example.com -n node2.example.com date
55 3cb9e1fe Iustin Pop
56 b6e88032 Michael Hanselmann
The ``-g`` option can be used to run a command only on a specific node
57 b6e88032 Michael Hanselmann
group, e.g.::
58 b6e88032 Michael Hanselmann
59 b6e88032 Michael Hanselmann
    # gnt-cluster command -g default date
60 b6e88032 Michael Hanselmann
61 3cb9e1fe Iustin Pop
The command is executed serially on the selected nodes. If the
62 3cb9e1fe Iustin Pop
master node is present in the list, the command will be executed
63 3cb9e1fe Iustin Pop
last on the master. Regarding the other nodes, the execution order
64 3cb9e1fe Iustin Pop
is somewhat alphabetic, so that node2.example.com will be earlier
65 3cb9e1fe Iustin Pop
than node10.example.com but after node1.example.com.
66 3cb9e1fe Iustin Pop
67 3cb9e1fe Iustin Pop
So given the node names node1, node2, node3, node10, node11, with
68 3cb9e1fe Iustin Pop
node3 being the master, the order will be: node1, node2, node10,
69 3cb9e1fe Iustin Pop
node11, node3.
70 3cb9e1fe Iustin Pop
71 3cb9e1fe Iustin Pop
The command is constructed by concatenating all other command line
72 3cb9e1fe Iustin Pop
arguments. For example, to list the contents of the /etc directory
73 3cb9e1fe Iustin Pop
on all nodes, run::
74 3cb9e1fe Iustin Pop
75 3cb9e1fe Iustin Pop
    # gnt-cluster command ls -l /etc
76 3cb9e1fe Iustin Pop
77 3cb9e1fe Iustin Pop
and the command which will be executed will be ``ls -l /etc``.
78 3cb9e1fe Iustin Pop
79 3cb9e1fe Iustin Pop
COPYFILE
80 3cb9e1fe Iustin Pop
~~~~~~~~
81 3cb9e1fe Iustin Pop
82 b6e88032 Michael Hanselmann
| **copyfile** [--use-replication-network] [-n *node*] [-g *group*]
83 b6e88032 Michael Hanselmann
| {*file*}
84 3cb9e1fe Iustin Pop
85 3cb9e1fe Iustin Pop
Copies a file to all or to some nodes. The argument specifies the
86 3cb9e1fe Iustin Pop
source file (on the current system), the ``-n`` argument specifies
87 3cb9e1fe Iustin Pop
the target node, or nodes if the option is given multiple times. If
88 b6e88032 Michael Hanselmann
``-n`` is not given at all, the file will be copied to all nodes. The
89 b6e88032 Michael Hanselmann
``-g`` option can be used to only select nodes in a specific node group.
90 3cb9e1fe Iustin Pop
Passing the ``--use-replication-network`` option will cause the
91 3cb9e1fe Iustin Pop
copy to be done over the replication network (only matters if the
92 3cb9e1fe Iustin Pop
primary/secondary IPs are different). Example::
93 3cb9e1fe Iustin Pop
94 3cb9e1fe Iustin Pop
    # gnt-cluster -n node1.example.com -n node2.example.com copyfile /tmp/test
95 3cb9e1fe Iustin Pop
96 3cb9e1fe Iustin Pop
This will copy the file /tmp/test from the current node to the two
97 3cb9e1fe Iustin Pop
named nodes.
98 3cb9e1fe Iustin Pop
99 fb926117 Andrea Spadaccini
DEACTIVATE-MASTER-IP
100 fb926117 Andrea Spadaccini
~~~~~~~~~~~~~~~~~~~~
101 fb926117 Andrea Spadaccini
102 fb926117 Andrea Spadaccini
**deactivate-master-ip** [--yes]
103 fb926117 Andrea Spadaccini
104 fb926117 Andrea Spadaccini
Deactivates the master IP on the master node.
105 fb926117 Andrea Spadaccini
106 fb926117 Andrea Spadaccini
This should be run only locally or on a connection to the node ip
107 fb926117 Andrea Spadaccini
directly, as a connection to the master ip will be broken by this
108 fb926117 Andrea Spadaccini
operation. Because of this risk it will require user confirmation
109 fb926117 Andrea Spadaccini
unless the ``--yes`` option is passed.
110 fb926117 Andrea Spadaccini
111 3cb9e1fe Iustin Pop
DESTROY
112 3cb9e1fe Iustin Pop
~~~~~~~
113 3cb9e1fe Iustin Pop
114 3cb9e1fe Iustin Pop
**destroy** {--yes-do-it}
115 3cb9e1fe Iustin Pop
116 3cb9e1fe Iustin Pop
Remove all configuration files related to the cluster, so that a
117 3cb9e1fe Iustin Pop
**gnt-cluster init** can be done again afterwards.
118 3cb9e1fe Iustin Pop
119 3cb9e1fe Iustin Pop
Since this is a dangerous command, you are required to pass the
120 3cb9e1fe Iustin Pop
argument *--yes-do-it.*
121 3cb9e1fe Iustin Pop
122 66d1f035 René Nussbaumer
EPO
123 66d1f035 René Nussbaumer
~~~
124 66d1f035 René Nussbaumer
125 cfed3b9f René Nussbaumer
**epo** [--on] [--groups|--all] [--power-delay] *arguments*
126 cfed3b9f René Nussbaumer
127 cfed3b9f René Nussbaumer
Performs an emergency power-off on nodes given as arguments. If
128 cfed3b9f René Nussbaumer
``--groups`` is given, arguments are node groups. If ``--all`` is
129 cfed3b9f René Nussbaumer
provided, the whole cluster will be shut down.
130 cfed3b9f René Nussbaumer
131 cfed3b9f René Nussbaumer
The ``--on`` flag recovers the cluster after an emergency power-off.
132 cfed3b9f René Nussbaumer
When powering on the cluster you can use ``--power-delay`` to define the
133 cfed3b9f René Nussbaumer
time in seconds (fractions allowed) waited between powering on
134 cfed3b9f René Nussbaumer
individual nodes.
135 cfed3b9f René Nussbaumer
136 cfed3b9f René Nussbaumer
Please note that the master node will not be turned down or up
137 cfed3b9f René Nussbaumer
automatically.  It will just be left in a state, where you can manully
138 cfed3b9f René Nussbaumer
perform the shutdown of that one node. If the master is in the list of
139 cfed3b9f René Nussbaumer
affected nodes and this is not a complete cluster emergency power-off
140 cfed3b9f René Nussbaumer
(e.g. using ``--all``), you're required to do a master failover to
141 cfed3b9f René Nussbaumer
another node not affected.
142 66d1f035 René Nussbaumer
143 3cb9e1fe Iustin Pop
GETMASTER
144 3cb9e1fe Iustin Pop
~~~~~~~~~
145 3cb9e1fe Iustin Pop
146 3cb9e1fe Iustin Pop
**getmaster**
147 3cb9e1fe Iustin Pop
148 3cb9e1fe Iustin Pop
Displays the current master node.
149 3cb9e1fe Iustin Pop
150 3cb9e1fe Iustin Pop
INFO
151 3cb9e1fe Iustin Pop
~~~~
152 3cb9e1fe Iustin Pop
153 3cb9e1fe Iustin Pop
**info** [--roman]
154 3cb9e1fe Iustin Pop
155 3cb9e1fe Iustin Pop
Shows runtime cluster information: cluster name, architecture (32
156 3cb9e1fe Iustin Pop
or 64 bit), master node, node list and instance list.
157 3cb9e1fe Iustin Pop
158 3cb9e1fe Iustin Pop
Passing the ``--roman`` option gnt-cluster info will try to print
159 3cb9e1fe Iustin Pop
its integer fields in a latin friendly way. This allows further
160 3cb9e1fe Iustin Pop
diffusion of Ganeti among ancient cultures.
161 3cb9e1fe Iustin Pop
162 3cb9e1fe Iustin Pop
INIT
163 3cb9e1fe Iustin Pop
~~~~
164 3cb9e1fe Iustin Pop
165 3cb9e1fe Iustin Pop
| **init**
166 0a68e0ff Iustin Pop
| [{-s|--secondary-ip} *secondary\_ip*]
167 3cb9e1fe Iustin Pop
| [--vg-name *vg-name*]
168 3cb9e1fe Iustin Pop
| [--master-netdev *interface-name*]
169 5a8648eb Andrea Spadaccini
| [--master-netmask *netmask*]
170 bf689b7a Andrea Spadaccini
| [--use-external-mip-script {yes \| no}]
171 0a68e0ff Iustin Pop
| [{-m|--mac-prefix} *mac-prefix*]
172 3cb9e1fe Iustin Pop
| [--no-lvm-storage]
173 3cb9e1fe Iustin Pop
| [--no-etc-hosts]
174 3cb9e1fe Iustin Pop
| [--no-ssh-init]
175 3cb9e1fe Iustin Pop
| [--file-storage-dir *dir*]
176 3cb9e1fe Iustin Pop
| [--enabled-hypervisors *hypervisors*]
177 0a68e0ff Iustin Pop
| [{-H|--hypervisor-parameters} *hypervisor*:*hv-param*=*value*[,*hv-param*=*value*...]]
178 0a68e0ff Iustin Pop
| [{-B|--backend-parameters} *be-param*=*value* [,*be-param*=*value*...]]
179 0a68e0ff Iustin Pop
| [{-N|--nic-parameters} *nic-param*=*value* [,*nic-param*=*value*...]]
180 a46b1883 Andrea Spadaccini
| [{-D|--disk-parameters} *disk-template*:*disk-param*=*value* [,*disk-param*=*value*...]]
181 3cb9e1fe Iustin Pop
| [--maintain-node-health {yes \| no}]
182 3cb9e1fe Iustin Pop
| [--uid-pool *user-id pool definition*]
183 0a68e0ff Iustin Pop
| [{-I|--default-iallocator} *default instance allocator*]
184 3cb9e1fe Iustin Pop
| [--primary-ip-version *version*]
185 3cb9e1fe Iustin Pop
| [--prealloc-wipe-disks {yes \| no}]
186 6204ee71 René Nussbaumer
| [--node-parameters *ndparams*]
187 0a68e0ff Iustin Pop
| [{-C|--candidate-pool-size} *candidate\_pool\_size*]
188 3cb9e1fe Iustin Pop
| {*clustername*}
189 3cb9e1fe Iustin Pop
190 3cb9e1fe Iustin Pop
This commands is only run once initially on the first node of the
191 3cb9e1fe Iustin Pop
cluster. It will initialize the cluster configuration, setup the
192 3cb9e1fe Iustin Pop
ssh-keys, start the daemons on the master node, etc. in order to have
193 3cb9e1fe Iustin Pop
a working one-node cluster.
194 3cb9e1fe Iustin Pop
195 3cb9e1fe Iustin Pop
Note that the *clustername* is not any random name. It has to be
196 3cb9e1fe Iustin Pop
resolvable to an IP address using DNS, and it is best if you give the
197 3cb9e1fe Iustin Pop
fully-qualified domain name. This hostname must resolve to an IP
198 3cb9e1fe Iustin Pop
address reserved exclusively for this purpose, i.e. not already in
199 3cb9e1fe Iustin Pop
use.
200 3cb9e1fe Iustin Pop
201 3cb9e1fe Iustin Pop
The cluster can run in two modes: single-home or dual-homed. In the
202 0a68e0ff Iustin Pop
first case, all traffic (both public traffic, inter-node traffic and
203 0a68e0ff Iustin Pop
data replication traffic) goes over the same interface. In the
204 3cb9e1fe Iustin Pop
dual-homed case, the data replication traffic goes over the second
205 0a68e0ff Iustin Pop
network. The ``-s (--secondary-ip)`` option here marks the cluster as
206 0a68e0ff Iustin Pop
dual-homed and its parameter represents this node's address on the
207 0a68e0ff Iustin Pop
second network.  If you initialise the cluster with ``-s``, all nodes
208 0a68e0ff Iustin Pop
added must have a secondary IP as well.
209 3cb9e1fe Iustin Pop
210 3cb9e1fe Iustin Pop
Note that for Ganeti it doesn't matter if the secondary network is
211 3cb9e1fe Iustin Pop
actually a separate physical network, or is done using tunneling,
212 3cb9e1fe Iustin Pop
etc. For performance reasons, it's recommended to use a separate
213 3cb9e1fe Iustin Pop
network, of course.
214 3cb9e1fe Iustin Pop
215 3cb9e1fe Iustin Pop
The ``--vg-name`` option will let you specify a volume group
216 3cb9e1fe Iustin Pop
different than "xenvg" for Ganeti to use when creating instance
217 3cb9e1fe Iustin Pop
disks. This volume group must have the same name on all nodes. Once
218 3cb9e1fe Iustin Pop
the cluster is initialized this can be altered by using the
219 3cb9e1fe Iustin Pop
**modify** command. If you don't want to use lvm storage at all use
220 3cb9e1fe Iustin Pop
the ``--no-lvm-storage`` option. Once the cluster is initialized
221 3cb9e1fe Iustin Pop
you can change this setup with the **modify** command.
222 3cb9e1fe Iustin Pop
223 3cb9e1fe Iustin Pop
The ``--master-netdev`` option is useful for specifying a different
224 3cb9e1fe Iustin Pop
interface on which the master will activate its IP address. It's
225 3cb9e1fe Iustin Pop
important that all nodes have this interface because you'll need it
226 3cb9e1fe Iustin Pop
for a master failover.
227 3cb9e1fe Iustin Pop
228 5a8648eb Andrea Spadaccini
The ``--master-netmask`` option allows to specify a netmask for the
229 5a8648eb Andrea Spadaccini
master IP. The netmask must be specified as an integer, and will be
230 5a8648eb Andrea Spadaccini
interpreted as a CIDR netmask. The default value is 32 for an IPv4
231 5a8648eb Andrea Spadaccini
address and 128 for an IPv6 address.
232 5a8648eb Andrea Spadaccini
233 bf689b7a Andrea Spadaccini
The ``--use-external-mip-script`` options allows to specify
234 bf689b7a Andrea Spadaccini
whether to use an user-supplied master IP address setup script, whose
235 bf689b7a Andrea Spadaccini
location is ``/etc/ganeti/scripts/master-ip-setup``. If the option value
236 bf689b7a Andrea Spadaccini
is set to False, the default script, whose location is
237 bf689b7a Andrea Spadaccini
``/usr/local/lib/ganeti/tools/master-ip-setup``, will be executed.
238 bf689b7a Andrea Spadaccini
239 0a68e0ff Iustin Pop
The ``-m (--mac-prefix)`` option will let you specify a three byte
240 0a68e0ff Iustin Pop
prefix under which the virtual MAC addresses of your instances will be
241 0a68e0ff Iustin Pop
generated. The prefix must be specified in the format ``XX:XX:XX`` and
242 0a68e0ff Iustin Pop
the default is ``aa:00:00``.
243 3cb9e1fe Iustin Pop
244 3cb9e1fe Iustin Pop
The ``--no-lvm-storage`` option allows you to initialize the
245 3cb9e1fe Iustin Pop
cluster without lvm support. This means that only instances using
246 3cb9e1fe Iustin Pop
files as storage backend will be possible to create. Once the
247 3cb9e1fe Iustin Pop
cluster is initialized you can change this setup with the
248 3cb9e1fe Iustin Pop
**modify** command.
249 3cb9e1fe Iustin Pop
250 3cb9e1fe Iustin Pop
The ``--no-etc-hosts`` option allows you to initialize the cluster
251 3cb9e1fe Iustin Pop
without modifying the /etc/hosts file.
252 3cb9e1fe Iustin Pop
253 3cb9e1fe Iustin Pop
The ``--no-ssh-init`` option allows you to initialize the cluster
254 3cb9e1fe Iustin Pop
without creating or distributing SSH key pairs.
255 3cb9e1fe Iustin Pop
256 3cb9e1fe Iustin Pop
The ``--file-storage-dir`` option allows you set the directory to
257 3cb9e1fe Iustin Pop
use for storing the instance disk files when using file storage as
258 3cb9e1fe Iustin Pop
backend for instance disks.
259 3cb9e1fe Iustin Pop
260 3cb9e1fe Iustin Pop
The ``--prealloc-wipe-disks`` sets a cluster wide configuration
261 3cb9e1fe Iustin Pop
value for wiping disks prior to allocation. This increases security
262 3cb9e1fe Iustin Pop
on instance level as the instance can't access untouched data from
263 3cb9e1fe Iustin Pop
it's underlying storage.
264 3cb9e1fe Iustin Pop
265 3cb9e1fe Iustin Pop
The ``--enabled-hypervisors`` option allows you to set the list of
266 3cb9e1fe Iustin Pop
hypervisors that will be enabled for this cluster. Instance
267 3cb9e1fe Iustin Pop
hypervisors can only be chosen from the list of enabled
268 3cb9e1fe Iustin Pop
hypervisors, and the first entry of this list will be used by
269 3cb9e1fe Iustin Pop
default. Currently, the following hypervisors are available:
270 3cb9e1fe Iustin Pop
271 3cb9e1fe Iustin Pop
xen-pvm
272 3cb9e1fe Iustin Pop
    Xen PVM hypervisor
273 3cb9e1fe Iustin Pop
274 3cb9e1fe Iustin Pop
xen-hvm
275 3cb9e1fe Iustin Pop
    Xen HVM hypervisor
276 3cb9e1fe Iustin Pop
277 3cb9e1fe Iustin Pop
kvm
278 3cb9e1fe Iustin Pop
    Linux KVM hypervisor
279 3cb9e1fe Iustin Pop
280 3cb9e1fe Iustin Pop
chroot
281 3cb9e1fe Iustin Pop
    a simple chroot manager that starts chroot based on a script at the
282 3cb9e1fe Iustin Pop
    root of the filesystem holding the chroot
283 3cb9e1fe Iustin Pop
284 3cb9e1fe Iustin Pop
fake
285 3cb9e1fe Iustin Pop
    fake hypervisor for development/testing
286 3cb9e1fe Iustin Pop
287 3cb9e1fe Iustin Pop
Either a single hypervisor name or a comma-separated list of
288 3cb9e1fe Iustin Pop
hypervisor names can be specified. If this option is not specified,
289 3cb9e1fe Iustin Pop
only the xen-pvm hypervisor is enabled by default.
290 3cb9e1fe Iustin Pop
291 0a68e0ff Iustin Pop
The ``-H (--hypervisor-parameters)`` option allows you to set default
292 3cb9e1fe Iustin Pop
hypervisor specific parameters for the cluster. The format of this
293 3cb9e1fe Iustin Pop
option is the name of the hypervisor, followed by a colon and a
294 0a68e0ff Iustin Pop
comma-separated list of key=value pairs. The keys available for each
295 0a68e0ff Iustin Pop
hypervisors are detailed in the gnt-instance(8) man page, in the
296 0a68e0ff Iustin Pop
**add** command plus the following parameters which are only
297 3cb9e1fe Iustin Pop
configurable globally (at cluster level):
298 3cb9e1fe Iustin Pop
299 3cb9e1fe Iustin Pop
migration\_port
300 3cb9e1fe Iustin Pop
    Valid for the Xen PVM and KVM hypervisors.
301 3cb9e1fe Iustin Pop
302 3cb9e1fe Iustin Pop
    This options specifies the TCP port to use for live-migration. For
303 3cb9e1fe Iustin Pop
    Xen, the same port should be configured on all nodes in the
304 3cb9e1fe Iustin Pop
    ``/etc/xen/xend-config.sxp`` file, under the key
305 3cb9e1fe Iustin Pop
    "xend-relocation-port".
306 3cb9e1fe Iustin Pop
307 3cb9e1fe Iustin Pop
migration\_bandwidth
308 3cb9e1fe Iustin Pop
    Valid for the KVM hypervisor.
309 3cb9e1fe Iustin Pop
310 3cb9e1fe Iustin Pop
    This option specifies the maximum bandwidth that KVM will use for
311 3cb9e1fe Iustin Pop
    instance live migrations. The value is in MiB/s.
312 3cb9e1fe Iustin Pop
313 3cb9e1fe Iustin Pop
    This option is only effective with kvm versions >= 78 and qemu-kvm
314 3cb9e1fe Iustin Pop
    versions >= 0.10.0.
315 3cb9e1fe Iustin Pop
316 0a68e0ff Iustin Pop
The ``-B (--backend-parameters)`` option allows you to set the default
317 3cb9e1fe Iustin Pop
backend parameters for the cluster. The parameter format is a
318 0a68e0ff Iustin Pop
comma-separated list of key=value pairs with the following supported
319 0a68e0ff Iustin Pop
keys:
320 3cb9e1fe Iustin Pop
321 3cb9e1fe Iustin Pop
vcpus
322 3cb9e1fe Iustin Pop
    Number of VCPUs to set for an instance by default, must be an
323 3cb9e1fe Iustin Pop
    integer, will be set to 1 if no specified.
324 3cb9e1fe Iustin Pop
325 90bb3fe1 Guido Trotter
maxmem
326 90bb3fe1 Guido Trotter
    Maximum amount of memory to allocate for an instance by default, can
327 90bb3fe1 Guido Trotter
    be either an integer or an integer followed by a unit (M for
328 90bb3fe1 Guido Trotter
    mebibytes and G for gibibytes are supported), will be set to 128M if
329 90bb3fe1 Guido Trotter
    not specified.
330 90bb3fe1 Guido Trotter
331 90bb3fe1 Guido Trotter
minmem
332 90bb3fe1 Guido Trotter
    Minimum amount of memory to allocate for an instance by default, can
333 90bb3fe1 Guido Trotter
    be either an integer or an integer followed by a unit (M for
334 90bb3fe1 Guido Trotter
    mebibytes and G for gibibytes are supported), will be set to 128M if
335 90bb3fe1 Guido Trotter
    not specified.
336 3cb9e1fe Iustin Pop
337 3cb9e1fe Iustin Pop
auto\_balance
338 3cb9e1fe Iustin Pop
    Value of the auto\_balance flag for instances to use by default,
339 3cb9e1fe Iustin Pop
    will be set to true if not specified.
340 3cb9e1fe Iustin Pop
341 11dc66f3 Bernardo Dal Seno
always\_failover
342 11dc66f3 Bernardo Dal Seno
    Default value for the ``always\_failover`` flag for instances; if
343 11dc66f3 Bernardo Dal Seno
    not set, ``False`` is used.
344 11dc66f3 Bernardo Dal Seno
345 3cb9e1fe Iustin Pop
346 0a68e0ff Iustin Pop
The ``-N (--nic-parameters)`` option allows you to set the default nic
347 0a68e0ff Iustin Pop
parameters for the cluster. The parameter format is a comma-separated
348 0a68e0ff Iustin Pop
list of key=value pairs with the following supported keys:
349 3cb9e1fe Iustin Pop
350 3cb9e1fe Iustin Pop
mode
351 3cb9e1fe Iustin Pop
    The default nic mode, 'routed' or 'bridged'.
352 3cb9e1fe Iustin Pop
353 3cb9e1fe Iustin Pop
link
354 3cb9e1fe Iustin Pop
    In bridged mode the default NIC bridge. In routed mode it
355 3cb9e1fe Iustin Pop
    represents an hypervisor-vif-script dependent value to allow
356 3cb9e1fe Iustin Pop
    different instance groups. For example under the KVM default
357 3cb9e1fe Iustin Pop
    network script it is interpreted as a routing table number or
358 3cb9e1fe Iustin Pop
    name.
359 3cb9e1fe Iustin Pop
360 a46b1883 Andrea Spadaccini
The ``-D (--disk-parameters)`` option allows you to set the default disk
361 a46b1883 Andrea Spadaccini
template parameters at cluster level. The format used for this option is
362 a46b1883 Andrea Spadaccini
similar to the one use by the  ``-H`` option: the disk template name
363 a46b1883 Andrea Spadaccini
must be specified first, followed by a colon and by a comma-separated
364 a46b1883 Andrea Spadaccini
list of key-value pairs. These parameters can only be specified at
365 a46b1883 Andrea Spadaccini
cluster and node group level; the cluster-level parameter are inherited
366 a46b1883 Andrea Spadaccini
by the node group at the moment of its creation, and can be further
367 a46b1883 Andrea Spadaccini
modified at node group level using the **gnt-group**(8) command. 
368 a46b1883 Andrea Spadaccini
369 a46b1883 Andrea Spadaccini
List of disk parameters available for the **drbd** template:
370 a46b1883 Andrea Spadaccini
371 a46b1883 Andrea Spadaccini
resync-rate
372 a46b1883 Andrea Spadaccini
    Re-synchronization rate, expressed in KiB/s
373 a46b1883 Andrea Spadaccini
374 a46b1883 Andrea Spadaccini
data-stripes
375 a46b1883 Andrea Spadaccini
    Number of stripes to use for data LVs
376 a46b1883 Andrea Spadaccini
377 a46b1883 Andrea Spadaccini
meta-stripes
378 a46b1883 Andrea Spadaccini
    Number of stripes to use for meta LVs
379 a46b1883 Andrea Spadaccini
380 a46b1883 Andrea Spadaccini
disk-barriers
381 a46b1883 Andrea Spadaccini
    What kind of barriers to **disable** for disks. It can either assume
382 a46b1883 Andrea Spadaccini
    the value "n", meaning no barrier disabled, or a non-empty string
383 a46b1883 Andrea Spadaccini
    containing a subset of the characters "bfd". "b" means disable disk
384 a46b1883 Andrea Spadaccini
    barriers, "f" means disable disk flushes, "d" disables disk drains
385 a46b1883 Andrea Spadaccini
386 a46b1883 Andrea Spadaccini
meta-barriers
387 a46b1883 Andrea Spadaccini
    Boolean value indicating whether the meta barriers should be
388 a46b1883 Andrea Spadaccini
    disabled (True) or not (False).
389 a46b1883 Andrea Spadaccini
390 a46b1883 Andrea Spadaccini
metavg
391 a46b1883 Andrea Spadaccini
    String containing the name of the default LVM volume group for DRBD
392 a46b1883 Andrea Spadaccini
    metadata. By default, it is set to ``xenvg``. It can be overridden
393 a46b1883 Andrea Spadaccini
    during the instance creation process by using the ``metavg`` key of
394 a46b1883 Andrea Spadaccini
    the ``--disk`` parameter.
395 a46b1883 Andrea Spadaccini
396 a46b1883 Andrea Spadaccini
disk-custom
397 a46b1883 Andrea Spadaccini
    String containing additional parameters to be appended to the
398 a46b1883 Andrea Spadaccini
    arguments list of ``drbdsetup disk``.
399 a46b1883 Andrea Spadaccini
400 a46b1883 Andrea Spadaccini
net-custom
401 a46b1883 Andrea Spadaccini
    String containing additional parameters to be appended to the
402 a46b1883 Andrea Spadaccini
    arguments list of ``drbdsetup net``.
403 a46b1883 Andrea Spadaccini
404 a46b1883 Andrea Spadaccini
List of parameters available for the **plain** template:
405 a46b1883 Andrea Spadaccini
406 a46b1883 Andrea Spadaccini
stripes
407 a46b1883 Andrea Spadaccini
    Number of stripes to use for new LVs
408 a46b1883 Andrea Spadaccini
409 f7b769b1 Iustin Pop
The option ``--maintain-node-health`` allows one to enable/disable
410 3cb9e1fe Iustin Pop
automatic maintenance actions on nodes. Currently these include
411 3cb9e1fe Iustin Pop
automatic shutdown of instances and deactivation of DRBD devices on
412 3cb9e1fe Iustin Pop
offline nodes; in the future it might be extended to automatic
413 d29036c1 Iustin Pop
removal of unknown LVM volumes, etc. Note that this option is only
414 d29036c1 Iustin Pop
useful if the use of ``ganeti-confd`` was enabled at compilation.
415 3cb9e1fe Iustin Pop
416 3cb9e1fe Iustin Pop
The ``--uid-pool`` option initializes the user-id pool. The
417 3cb9e1fe Iustin Pop
*user-id pool definition* can contain a list of user-ids and/or a
418 3cb9e1fe Iustin Pop
list of user-id ranges. The parameter format is a comma-separated
419 3cb9e1fe Iustin Pop
list of numeric user-ids or user-id ranges. The ranges are defined
420 3cb9e1fe Iustin Pop
by a lower and higher boundary, separated by a dash. The boundaries
421 3cb9e1fe Iustin Pop
are inclusive. If the ``--uid-pool`` option is not supplied, the
422 3cb9e1fe Iustin Pop
user-id pool is initialized to an empty list. An empty list means
423 3cb9e1fe Iustin Pop
that the user-id pool feature is disabled.
424 3cb9e1fe Iustin Pop
425 3cb9e1fe Iustin Pop
The ``-I (--default-iallocator)`` option specifies the default
426 d1e9c98d Iustin Pop
instance allocator. The instance allocator will be used for operations
427 d1e9c98d Iustin Pop
like instance creation, instance and node migration, etc. when no
428 d1e9c98d Iustin Pop
manual override is specified. If this option is not specified and
429 d1e9c98d Iustin Pop
htools was not enabled at build time, the default instance allocator
430 d1e9c98d Iustin Pop
will be blank, which means that relevant operations will require the
431 d1e9c98d Iustin Pop
administrator to manually specify either an instance allocator, or a
432 d1e9c98d Iustin Pop
set of nodes. If the option is not specified but htools was enabled,
433 d1e9c98d Iustin Pop
the default iallocator will be **hail**(1) (assuming it can be found
434 d1e9c98d Iustin Pop
on disk). The default iallocator can be changed later using the
435 d1e9c98d Iustin Pop
**modify** command.
436 3cb9e1fe Iustin Pop
437 3cb9e1fe Iustin Pop
The ``--primary-ip-version`` option specifies the IP version used
438 3cb9e1fe Iustin Pop
for the primary address. Possible values are 4 and 6 for IPv4 and
439 3cb9e1fe Iustin Pop
IPv6, respectively. This option is used when resolving node names
440 3cb9e1fe Iustin Pop
and the cluster name.
441 3cb9e1fe Iustin Pop
442 6204ee71 René Nussbaumer
The ``--node-parameters`` option allows you to set default node
443 6204ee71 René Nussbaumer
parameters for the cluster. Please see **ganeti**(7) for more
444 6204ee71 René Nussbaumer
information about supported key=value pairs.
445 6204ee71 René Nussbaumer
446 0a68e0ff Iustin Pop
The ``-C (--candidate-pool-size)`` option specifies the
447 0a68e0ff Iustin Pop
``candidate_pool_size`` cluster parameter. This is the number of nodes
448 0a68e0ff Iustin Pop
that the master will try to keep as master\_candidates. For more
449 0a68e0ff Iustin Pop
details about this role and other node roles, see the ganeti(7).
450 0a68e0ff Iustin Pop
451 3cb9e1fe Iustin Pop
LIST-TAGS
452 3cb9e1fe Iustin Pop
~~~~~~~~~
453 3cb9e1fe Iustin Pop
454 3cb9e1fe Iustin Pop
**list-tags**
455 3cb9e1fe Iustin Pop
456 3cb9e1fe Iustin Pop
List the tags of the cluster.
457 3cb9e1fe Iustin Pop
458 3cb9e1fe Iustin Pop
MASTER-FAILOVER
459 3cb9e1fe Iustin Pop
~~~~~~~~~~~~~~~
460 3cb9e1fe Iustin Pop
461 3cb9e1fe Iustin Pop
**master-failover** [--no-voting]
462 3cb9e1fe Iustin Pop
463 3cb9e1fe Iustin Pop
Failover the master role to the current node.
464 3cb9e1fe Iustin Pop
465 3cb9e1fe Iustin Pop
The ``--no-voting`` option skips the remote node agreement checks.
466 3cb9e1fe Iustin Pop
This is dangerous, but necessary in some cases (for example failing
467 3cb9e1fe Iustin Pop
over the master role in a 2 node cluster with the original master
468 3cb9e1fe Iustin Pop
down). If the original master then comes up, it won't be able to
469 3cb9e1fe Iustin Pop
start its master daemon because it won't have enough votes, but so
470 3cb9e1fe Iustin Pop
won't the new master, if the master daemon ever needs a restart.
471 3cb9e1fe Iustin Pop
You can pass ``--no-voting`` to **ganeti-masterd** on the new
472 3cb9e1fe Iustin Pop
master to solve this problem, and run **gnt-cluster redist-conf**
473 3cb9e1fe Iustin Pop
to make sure the cluster is consistent again.
474 3cb9e1fe Iustin Pop
475 3cb9e1fe Iustin Pop
MASTER-PING
476 3cb9e1fe Iustin Pop
~~~~~~~~~~~
477 3cb9e1fe Iustin Pop
478 3cb9e1fe Iustin Pop
**master-ping**
479 3cb9e1fe Iustin Pop
480 3cb9e1fe Iustin Pop
Checks if the master daemon is alive.
481 3cb9e1fe Iustin Pop
482 3cb9e1fe Iustin Pop
If the master daemon is alive and can respond to a basic query (the
483 3cb9e1fe Iustin Pop
equivalent of **gnt-cluster info**), then the exit code of the
484 3cb9e1fe Iustin Pop
command will be 0. If the master daemon is not alive (either due to
485 3cb9e1fe Iustin Pop
a crash or because this is not the master node), the exit code will
486 3cb9e1fe Iustin Pop
be 1.
487 3cb9e1fe Iustin Pop
488 3cb9e1fe Iustin Pop
MODIFY
489 3cb9e1fe Iustin Pop
~~~~~~
490 3cb9e1fe Iustin Pop
491 3cb9e1fe Iustin Pop
| **modify**
492 3cb9e1fe Iustin Pop
| [--vg-name *vg-name*]
493 3cb9e1fe Iustin Pop
| [--no-lvm-storage]
494 3cb9e1fe Iustin Pop
| [--enabled-hypervisors *hypervisors*]
495 0a68e0ff Iustin Pop
| [{-H|--hypervisor-parameters} *hypervisor*:*hv-param*=*value*[,*hv-param*=*value*...]]
496 0a68e0ff Iustin Pop
| [{-B|--backend-parameters} *be-param*=*value* [,*be-param*=*value*...]]
497 0a68e0ff Iustin Pop
| [{-N|--nic-parameters} *nic-param*=*value* [,*nic-param*=*value*...]]
498 a46b1883 Andrea Spadaccini
| [{-D|--disk-parameters} *disk-template*:*disk-param*=*value* [,*disk-param*=*value*...]]
499 3cb9e1fe Iustin Pop
| [--uid-pool *user-id pool definition*]
500 3cb9e1fe Iustin Pop
| [--add-uids *user-id pool definition*]
501 3cb9e1fe Iustin Pop
| [--remove-uids *user-id pool definition*]
502 0a68e0ff Iustin Pop
| [{-C|--candidate-pool-size} *candidate\_pool\_size*]
503 3cb9e1fe Iustin Pop
| [--maintain-node-health {yes \| no}]
504 3cb9e1fe Iustin Pop
| [--prealloc-wipe-disks {yes \| no}]
505 0a68e0ff Iustin Pop
| [{-I|--default-iallocator} *default instance allocator*]
506 3cb9e1fe Iustin Pop
| [--reserved-lvs=*NAMES*]
507 6204ee71 René Nussbaumer
| [--node-parameters *ndparams*]
508 38f9d2cf Guido Trotter
| [--master-netdev *interface-name*]
509 5a8648eb Andrea Spadaccini
| [--master-netmask *netmask*]
510 bf689b7a Andrea Spadaccini
| [--use-external-mip-script {yes \| no}]
511 2da9f556 René Nussbaumer
| [--hypervisor-state *hvstate*]
512 2da9f556 René Nussbaumer
| [--disk-state *diskstate*]
513 3cb9e1fe Iustin Pop
514 3cb9e1fe Iustin Pop
Modify the options for the cluster.
515 3cb9e1fe Iustin Pop
516 6204ee71 René Nussbaumer
The ``--vg-name``, ``--no-lvm-storarge``, ``--enabled-hypervisors``,
517 0a68e0ff Iustin Pop
``-H (--hypervisor-parameters)``, ``-B (--backend-parameters)``,
518 a46b1883 Andrea Spadaccini
``-D (--disk-parameters)``, ``--nic-parameters``, ``-C
519 a46b1883 Andrea Spadaccini
(--candidate-pool-size)``, ``--maintain-node-health``,
520 a46b1883 Andrea Spadaccini
``--prealloc-wipe-disks``, ``--uid-pool``, ``--node-parameters``,
521 a46b1883 Andrea Spadaccini
``--master-netdev``, ``--master-netmask`` and
522 a46b1883 Andrea Spadaccini
``--use-external-mip-script`` options are described in the **init**
523 a46b1883 Andrea Spadaccini
command.
524 3cb9e1fe Iustin Pop
525 2da9f556 René Nussbaumer
The ``--hypervisor-state`` and ``--disk-state`` options are described in
526 2da9f556 René Nussbaumer
detail in **ganeti**(7).
527 2da9f556 René Nussbaumer
528 3cb9e1fe Iustin Pop
The ``--add-uids`` and ``--remove-uids`` options can be used to
529 3cb9e1fe Iustin Pop
modify the user-id pool by adding/removing a list of user-ids or
530 3cb9e1fe Iustin Pop
user-id ranges.
531 3cb9e1fe Iustin Pop
532 3cb9e1fe Iustin Pop
The option ``--reserved-lvs`` specifies a list (comma-separated) of
533 3cb9e1fe Iustin Pop
logical volume group names (regular expressions) that will be
534 3cb9e1fe Iustin Pop
ignored by the cluster verify operation. This is useful if the
535 3cb9e1fe Iustin Pop
volume group used for Ganeti is shared with the system for other
536 3cb9e1fe Iustin Pop
uses. Note that it's not recommended to create and mark as ignored
537 3cb9e1fe Iustin Pop
logical volume names which match Ganeti's own name format (starting
538 3cb9e1fe Iustin Pop
with UUID and then .diskN), as this option only skips the
539 3cb9e1fe Iustin Pop
verification, but not the actual use of the names given.
540 3cb9e1fe Iustin Pop
541 3cb9e1fe Iustin Pop
To remove all reserved logical volumes, pass in an empty argument
542 3cb9e1fe Iustin Pop
to the option, as in ``--reserved-lvs=`` or ``--reserved-lvs ''``.
543 3cb9e1fe Iustin Pop
544 0a68e0ff Iustin Pop
The ``-I (--default-iallocator)`` is described in the **init**
545 0a68e0ff Iustin Pop
command. To clear the default iallocator, just pass an empty string
546 0a68e0ff Iustin Pop
('').
547 3cb9e1fe Iustin Pop
548 3cb9e1fe Iustin Pop
QUEUE
549 3cb9e1fe Iustin Pop
~~~~~
550 3cb9e1fe Iustin Pop
551 3cb9e1fe Iustin Pop
**queue** {drain | undrain | info}
552 3cb9e1fe Iustin Pop
553 3cb9e1fe Iustin Pop
Change job queue properties.
554 3cb9e1fe Iustin Pop
555 3cb9e1fe Iustin Pop
The ``drain`` option sets the drain flag on the job queue. No new
556 3cb9e1fe Iustin Pop
jobs will be accepted, but jobs already in the queue will be
557 3cb9e1fe Iustin Pop
processed.
558 3cb9e1fe Iustin Pop
559 3cb9e1fe Iustin Pop
The ``undrain`` will unset the drain flag on the job queue. New
560 3cb9e1fe Iustin Pop
jobs will be accepted.
561 3cb9e1fe Iustin Pop
562 3cb9e1fe Iustin Pop
The ``info`` option shows the properties of the job queue.
563 3cb9e1fe Iustin Pop
564 3cb9e1fe Iustin Pop
WATCHER
565 3cb9e1fe Iustin Pop
~~~~~~~
566 3cb9e1fe Iustin Pop
567 3cb9e1fe Iustin Pop
**watcher** {pause *duration* | continue | info}
568 3cb9e1fe Iustin Pop
569 3cb9e1fe Iustin Pop
Make the watcher pause or let it continue.
570 3cb9e1fe Iustin Pop
571 3cb9e1fe Iustin Pop
The ``pause`` option causes the watcher to pause for *duration*
572 3cb9e1fe Iustin Pop
seconds.
573 3cb9e1fe Iustin Pop
574 3cb9e1fe Iustin Pop
The ``continue`` option will let the watcher continue.
575 3cb9e1fe Iustin Pop
576 3cb9e1fe Iustin Pop
The ``info`` option shows whether the watcher is currently paused.
577 3cb9e1fe Iustin Pop
578 3cb9e1fe Iustin Pop
redist-conf
579 3cb9e1fe Iustin Pop
~~~~~~~~~~~
580 3cb9e1fe Iustin Pop
581 3cb9e1fe Iustin Pop
**redist-conf** [--submit]
582 3cb9e1fe Iustin Pop
583 3cb9e1fe Iustin Pop
This command forces a full push of configuration files from the
584 3cb9e1fe Iustin Pop
master node to the other nodes in the cluster. This is normally not
585 3cb9e1fe Iustin Pop
needed, but can be run if the **verify** complains about
586 3cb9e1fe Iustin Pop
configuration mismatches.
587 3cb9e1fe Iustin Pop
588 3cb9e1fe Iustin Pop
The ``--submit`` option is used to send the job to the master
589 3cb9e1fe Iustin Pop
daemon but not wait for its completion. The job ID will be shown so
590 3cb9e1fe Iustin Pop
that it can be examined via **gnt-job info**.
591 3cb9e1fe Iustin Pop
592 3cb9e1fe Iustin Pop
REMOVE-TAGS
593 3cb9e1fe Iustin Pop
~~~~~~~~~~~
594 3cb9e1fe Iustin Pop
595 3cb9e1fe Iustin Pop
**remove-tags** [--from *file*] {*tag*...}
596 3cb9e1fe Iustin Pop
597 3cb9e1fe Iustin Pop
Remove tags from the cluster. If any of the tags are not existing
598 3cb9e1fe Iustin Pop
on the cluster, the entire operation will abort.
599 3cb9e1fe Iustin Pop
600 3cb9e1fe Iustin Pop
If the ``--from`` option is given, the list of tags to be removed will
601 3cb9e1fe Iustin Pop
be extended with the contents of that file (each line becomes a tag).
602 3cb9e1fe Iustin Pop
In this case, there is not need to pass tags on the command line (if
603 3cb9e1fe Iustin Pop
you do, tags from both sources will be removed). A file name of - will
604 3cb9e1fe Iustin Pop
be interpreted as stdin.
605 3cb9e1fe Iustin Pop
606 3cb9e1fe Iustin Pop
RENAME
607 3cb9e1fe Iustin Pop
~~~~~~
608 3cb9e1fe Iustin Pop
609 3cb9e1fe Iustin Pop
**rename** [-f] {*name*}
610 3cb9e1fe Iustin Pop
611 3cb9e1fe Iustin Pop
Renames the cluster and in the process updates the master IP
612 3cb9e1fe Iustin Pop
address to the one the new name resolves to. At least one of either
613 3cb9e1fe Iustin Pop
the name or the IP address must be different, otherwise the
614 3cb9e1fe Iustin Pop
operation will be aborted.
615 3cb9e1fe Iustin Pop
616 3cb9e1fe Iustin Pop
Note that since this command can be dangerous (especially when run
617 3cb9e1fe Iustin Pop
over SSH), the command will require confirmation unless run with
618 3cb9e1fe Iustin Pop
the ``-f`` option.
619 3cb9e1fe Iustin Pop
620 3cb9e1fe Iustin Pop
RENEW-CRYPTO
621 3cb9e1fe Iustin Pop
~~~~~~~~~~~~
622 3cb9e1fe Iustin Pop
623 3cb9e1fe Iustin Pop
| **renew-crypto** [-f]
624 3cb9e1fe Iustin Pop
| [--new-cluster-certificate] [--new-confd-hmac-key]
625 3cb9e1fe Iustin Pop
| [--new-rapi-certificate] [--rapi-certificate *rapi-cert*]
626 b8a10435 Andrea Spadaccini
| [--new-spice-certificate | --spice-certificate *spice-cert*
627 b8a10435 Andrea Spadaccini
| -- spice-ca-certificate *spice-ca-cert*]
628 3cb9e1fe Iustin Pop
| [--new-cluster-domain-secret] [--cluster-domain-secret *filename*]
629 3cb9e1fe Iustin Pop
630 3cb9e1fe Iustin Pop
This command will stop all Ganeti daemons in the cluster and start
631 3cb9e1fe Iustin Pop
them again once the new certificates and keys are replicated. The
632 3cb9e1fe Iustin Pop
options ``--new-cluster-certificate`` and ``--new-confd-hmac-key``
633 3cb9e1fe Iustin Pop
can be used to regenerate the cluster-internal SSL certificate
634 3cb9e1fe Iustin Pop
respective the HMAC key used by ganeti-confd(8).
635 3cb9e1fe Iustin Pop
636 3cb9e1fe Iustin Pop
To generate a new self-signed RAPI certificate (used by
637 3cb9e1fe Iustin Pop
ganeti-rapi(8)) specify ``--new-rapi-certificate``. If you want to
638 3cb9e1fe Iustin Pop
use your own certificate, e.g. one signed by a certificate
639 3cb9e1fe Iustin Pop
authority (CA), pass its filename to ``--rapi-certificate``.
640 3cb9e1fe Iustin Pop
641 b8a10435 Andrea Spadaccini
To generate a new self-signed SPICE certificate, used by SPICE
642 b8a10435 Andrea Spadaccini
connections to the KVM hypervisor, specify the
643 b8a10435 Andrea Spadaccini
``--new-spice-certificate`` option. If you want to provide a
644 b8a10435 Andrea Spadaccini
certificate, pass its filename to ``--spice-certificate`` and pass the
645 b8a10435 Andrea Spadaccini
signing CA certificate to ``--spice-ca-certificate``.
646 b8a10435 Andrea Spadaccini
647 3cb9e1fe Iustin Pop
``--new-cluster-domain-secret`` generates a new, random cluster
648 3cb9e1fe Iustin Pop
domain secret. ``--cluster-domain-secret`` reads the secret from a
649 3cb9e1fe Iustin Pop
file. The cluster domain secret is used to sign information
650 3cb9e1fe Iustin Pop
exchanged between separate clusters via a third party.
651 3cb9e1fe Iustin Pop
652 3cb9e1fe Iustin Pop
REPAIR-DISK-SIZES
653 3cb9e1fe Iustin Pop
~~~~~~~~~~~~~~~~~
654 3cb9e1fe Iustin Pop
655 3cb9e1fe Iustin Pop
**repair-disk-sizes** [instance...]
656 3cb9e1fe Iustin Pop
657 3cb9e1fe Iustin Pop
This command checks that the recorded size of the given instance's
658 3cb9e1fe Iustin Pop
disks matches the actual size and updates any mismatches found.
659 3cb9e1fe Iustin Pop
This is needed if the Ganeti configuration is no longer consistent
660 3cb9e1fe Iustin Pop
with reality, as it will impact some disk operations. If no
661 3cb9e1fe Iustin Pop
arguments are given, all instances will be checked.
662 3cb9e1fe Iustin Pop
663 3cb9e1fe Iustin Pop
Note that only active disks can be checked by this command; in case
664 3cb9e1fe Iustin Pop
a disk cannot be activated it's advised to use
665 3cb9e1fe Iustin Pop
**gnt-instance activate-disks --ignore-size ...** to force
666 3cb9e1fe Iustin Pop
activation without regard to the current size.
667 3cb9e1fe Iustin Pop
668 3cb9e1fe Iustin Pop
When the all disk sizes are consistent, the command will return no
669 3cb9e1fe Iustin Pop
output. Otherwise it will log details about the inconsistencies in
670 3cb9e1fe Iustin Pop
the configuration.
671 3cb9e1fe Iustin Pop
672 3cb9e1fe Iustin Pop
SEARCH-TAGS
673 3cb9e1fe Iustin Pop
~~~~~~~~~~~
674 3cb9e1fe Iustin Pop
675 3cb9e1fe Iustin Pop
**search-tags** {*pattern*}
676 3cb9e1fe Iustin Pop
677 3cb9e1fe Iustin Pop
Searches the tags on all objects in the cluster (the cluster
678 3cb9e1fe Iustin Pop
itself, the nodes and the instances) for a given pattern. The
679 3cb9e1fe Iustin Pop
pattern is interpreted as a regular expression and a search will be
680 3cb9e1fe Iustin Pop
done on it (i.e. the given pattern is not anchored to the beggining
681 3cb9e1fe Iustin Pop
of the string; if you want that, prefix the pattern with ^).
682 3cb9e1fe Iustin Pop
683 3cb9e1fe Iustin Pop
If no tags are matching the pattern, the exit code of the command
684 3cb9e1fe Iustin Pop
will be one. If there is at least one match, the exit code will be
685 3cb9e1fe Iustin Pop
zero. Each match is listed on one line, the object and the tag
686 3cb9e1fe Iustin Pop
separated by a space. The cluster will be listed as /cluster, a
687 3cb9e1fe Iustin Pop
node will be listed as /nodes/*name*, and an instance as
688 3cb9e1fe Iustin Pop
/instances/*name*. Example:
689 3cb9e1fe Iustin Pop
690 3cb9e1fe Iustin Pop
::
691 3cb9e1fe Iustin Pop
692 3cb9e1fe Iustin Pop
    # gnt-cluster search-tags time
693 3cb9e1fe Iustin Pop
    /cluster ctime:2007-09-01
694 3cb9e1fe Iustin Pop
    /nodes/node1.example.com mtime:2007-10-04
695 3cb9e1fe Iustin Pop
696 3cb9e1fe Iustin Pop
VERIFY
697 3cb9e1fe Iustin Pop
~~~~~~
698 3cb9e1fe Iustin Pop
699 830fc5da Andrea Spadaccini
| **verify** [--no-nplus1-mem] [--node-group *nodegroup*]
700 830fc5da Andrea Spadaccini
| [--error-codes] [{-I|--ignore-errors} *errorcode*]
701 830fc5da Andrea Spadaccini
| [{-I|--ignore-errors} *errorcode*...]
702 3cb9e1fe Iustin Pop
703 3cb9e1fe Iustin Pop
Verify correctness of cluster configuration. This is safe with
704 3cb9e1fe Iustin Pop
respect to running instances, and incurs no downtime of the
705 3cb9e1fe Iustin Pop
instances.
706 3cb9e1fe Iustin Pop
707 3cb9e1fe Iustin Pop
If the ``--no-nplus1-mem`` option is given, Ganeti won't check
708 3cb9e1fe Iustin Pop
whether if it loses a node it can restart all the instances on
709 3cb9e1fe Iustin Pop
their secondaries (and report an error otherwise).
710 3cb9e1fe Iustin Pop
711 40167d65 Adeodato Simo
With ``--node-group``, restrict the verification to those nodes and
712 40167d65 Adeodato Simo
instances that live in the named group. This will not verify global
713 40167d65 Adeodato Simo
settings, but will allow to perform verification of a group while other
714 40167d65 Adeodato Simo
operations are ongoing in other groups.
715 40167d65 Adeodato Simo
716 830fc5da Andrea Spadaccini
The ``--error-codes`` option outputs each error in the following
717 830fc5da Andrea Spadaccini
parseable format: *ftype*:*ecode*:*edomain*:*name*:*msg*.
718 830fc5da Andrea Spadaccini
These fields have the following meaning:
719 830fc5da Andrea Spadaccini
720 830fc5da Andrea Spadaccini
ftype
721 830fc5da Andrea Spadaccini
    Failure type. Can be *WARNING* or *ERROR*.
722 830fc5da Andrea Spadaccini
723 830fc5da Andrea Spadaccini
ecode
724 830fc5da Andrea Spadaccini
    Error code of the failure. See below for a list of error codes.
725 830fc5da Andrea Spadaccini
726 830fc5da Andrea Spadaccini
edomain
727 830fc5da Andrea Spadaccini
    Can be *cluster*, *node* or *instance*.
728 830fc5da Andrea Spadaccini
729 830fc5da Andrea Spadaccini
name
730 830fc5da Andrea Spadaccini
    Contains the name of the item that is affected from the failure.
731 830fc5da Andrea Spadaccini
732 830fc5da Andrea Spadaccini
msg
733 830fc5da Andrea Spadaccini
    Contains a descriptive error message about the error
734 830fc5da Andrea Spadaccini
735 830fc5da Andrea Spadaccini
``gnt-cluster verify`` will have a non-zero exit code if at least one of
736 830fc5da Andrea Spadaccini
the failures that are found are of type *ERROR*.
737 830fc5da Andrea Spadaccini
738 830fc5da Andrea Spadaccini
The ``--ignore-errors`` option can be used to change this behaviour,
739 830fc5da Andrea Spadaccini
because it demotes the error represented by the error code received as a
740 830fc5da Andrea Spadaccini
parameter to a warning. The option must be repeated for each error that
741 830fc5da Andrea Spadaccini
should be ignored (e.g.: ``-I ENODEVERSION -I ENODEORPHANLV``). The
742 830fc5da Andrea Spadaccini
``--error-codes`` option can be used to determine the error code of a
743 830fc5da Andrea Spadaccini
given error.
744 830fc5da Andrea Spadaccini
745 830fc5da Andrea Spadaccini
List of error codes:
746 830fc5da Andrea Spadaccini
747 830fc5da Andrea Spadaccini
@CONSTANTS_ECODES@
748 830fc5da Andrea Spadaccini
749 3cb9e1fe Iustin Pop
VERIFY-DISKS
750 3cb9e1fe Iustin Pop
~~~~~~~~~~~~
751 3cb9e1fe Iustin Pop
752 3cb9e1fe Iustin Pop
**verify-disks**
753 3cb9e1fe Iustin Pop
754 3cb9e1fe Iustin Pop
The command checks which instances have degraded DRBD disks and
755 3cb9e1fe Iustin Pop
activates the disks of those instances.
756 3cb9e1fe Iustin Pop
757 3cb9e1fe Iustin Pop
This command is run from the **ganeti-watcher** tool, which also
758 3cb9e1fe Iustin Pop
has a different, complementary algorithm for doing this check.
759 3cb9e1fe Iustin Pop
Together, these two should ensure that DRBD disks are kept
760 3cb9e1fe Iustin Pop
consistent.
761 3cb9e1fe Iustin Pop
762 3cb9e1fe Iustin Pop
VERSION
763 3cb9e1fe Iustin Pop
~~~~~~~
764 3cb9e1fe Iustin Pop
765 3cb9e1fe Iustin Pop
**version**
766 3cb9e1fe Iustin Pop
767 3cb9e1fe Iustin Pop
Show the cluster version.
768 9ff4f2c0 Michael Hanselmann
769 9ff4f2c0 Michael Hanselmann
.. vim: set textwidth=72 :
770 9ff4f2c0 Michael Hanselmann
.. Local Variables:
771 9ff4f2c0 Michael Hanselmann
.. mode: rst
772 9ff4f2c0 Michael Hanselmann
.. fill-column: 72
773 9ff4f2c0 Michael Hanselmann
.. End: