Statistics
| Branch: | Tag: | Revision:

root / man / gnt-cluster.rst @ 42653ebd

History | View | Annotate | Download (31.1 kB)

1
gnt-cluster(8) Ganeti | Version @GANETI_VERSION@
2
================================================
3

    
4
Name
5
----
6

    
7
gnt-cluster - Ganeti administration, cluster-wide
8

    
9
Synopsis
10
--------
11

    
12
**gnt-cluster** {command} [arguments...]
13

    
14
DESCRIPTION
15
-----------
16

    
17
The **gnt-cluster** is used for cluster-wide administration in the
18
Ganeti system.
19

    
20
COMMANDS
21
--------
22

    
23
ACTIVATE-MASTER-IP
24
~~~~~~~~~~~~~~~~~~
25

    
26
**activate-master-ip**
27

    
28
Activates the master IP on the master node.
29

    
30
ADD-TAGS
31
~~~~~~~~
32

    
33
**add-tags** [\--from *file*] {*tag*...}
34

    
35
Add tags to the cluster. If any of the tags contains invalid
36
characters, the entire operation will abort.
37

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

    
44
COMMAND
45
~~~~~~~
46

    
47
**command** [-n *node*] [-g *group*] [-M] {*command*}
48

    
49
Executes a command on all nodes. This command is designed for simple
50
usage. For more complex use cases the commands **dsh(1)** or **cssh(1)**
51
should be used instead.
52

    
53
If the option ``-n`` is not given, the command will be executed on all
54
nodes, otherwise it will be executed only on the node(s) specified. Use
55
the option multiple times for running it on multiple nodes, like::
56

    
57
    # gnt-cluster command -n node1.example.com -n node2.example.com date
58

    
59
The ``-g`` option can be used to run a command only on a specific node
60
group, e.g.::
61

    
62
    # gnt-cluster command -g default date
63

    
64
The ``-M`` option can be used to prepend the node name to all output
65
lines. The ``--failure-only`` option hides successful commands, making
66
it easier to see failures.
67

    
68
The command is executed serially on the selected nodes. If the
69
master node is present in the list, the command will be executed
70
last on the master. Regarding the other nodes, the execution order
71
is somewhat alphabetic, so that node2.example.com will be earlier
72
than node10.example.com but after node1.example.com.
73

    
74
So given the node names node1, node2, node3, node10, node11, with
75
node3 being the master, the order will be: node1, node2, node10,
76
node11, node3.
77

    
78
The command is constructed by concatenating all other command line
79
arguments. For example, to list the contents of the /etc directory
80
on all nodes, run::
81

    
82
    # gnt-cluster command ls -l /etc
83

    
84
and the command which will be executed will be ``ls -l /etc``.
85

    
86
COPYFILE
87
~~~~~~~~
88

    
89
| **copyfile** [\--use-replication-network] [-n *node*] [-g *group*]
90
| {*file*}
91

    
92
Copies a file to all or to some nodes. The argument specifies the
93
source file (on the current system), the ``-n`` argument specifies
94
the target node, or nodes if the option is given multiple times. If
95
``-n`` is not given at all, the file will be copied to all nodes. The
96
``-g`` option can be used to only select nodes in a specific node group.
97
Passing the ``--use-replication-network`` option will cause the
98
copy to be done over the replication network (only matters if the
99
primary/secondary IPs are different). Example::
100

    
101
    # gnt-cluster -n node1.example.com -n node2.example.com copyfile /tmp/test
102

    
103
This will copy the file /tmp/test from the current node to the two
104
named nodes.
105

    
106
DEACTIVATE-MASTER-IP
107
~~~~~~~~~~~~~~~~~~~~
108

    
109
**deactivate-master-ip** [\--yes]
110

    
111
Deactivates the master IP on the master node.
112

    
113
This should be run only locally or on a connection to the node ip
114
directly, as a connection to the master ip will be broken by this
115
operation. Because of this risk it will require user confirmation
116
unless the ``--yes`` option is passed.
117

    
118
DESTROY
119
~~~~~~~
120

    
121
**destroy** {\--yes-do-it}
122

    
123
Remove all configuration files related to the cluster, so that a
124
**gnt-cluster init** can be done again afterwards.
125

    
126
Since this is a dangerous command, you are required to pass the
127
argument *\--yes-do-it.*
128

    
129
EPO
130
~~~
131

    
132
**epo** [\--on] [\--groups|\--all] [\--power-delay] *arguments*
133

    
134
Performs an emergency power-off on nodes given as arguments. If
135
``--groups`` is given, arguments are node groups. If ``--all`` is
136
provided, the whole cluster will be shut down.
137

    
138
The ``--on`` flag recovers the cluster after an emergency power-off.
139
When powering on the cluster you can use ``--power-delay`` to define the
140
time in seconds (fractions allowed) waited between powering on
141
individual nodes.
142

    
143
Please note that the master node will not be turned down or up
144
automatically.  It will just be left in a state, where you can manully
145
perform the shutdown of that one node. If the master is in the list of
146
affected nodes and this is not a complete cluster emergency power-off
147
(e.g. using ``--all``), you're required to do a master failover to
148
another node not affected.
149

    
150
GETMASTER
151
~~~~~~~~~
152

    
153
**getmaster**
154

    
155
Displays the current master node.
156

    
157
INFO
158
~~~~
159

    
160
**info** [\--roman]
161

    
162
Shows runtime cluster information: cluster name, architecture (32
163
or 64 bit), master node, node list and instance list.
164

    
165
Passing the ``--roman`` option gnt-cluster info will try to print
166
its integer fields in a latin friendly way. This allows further
167
diffusion of Ganeti among ancient cultures.
168

    
169
INIT
170
~~~~
171

    
172
| **init**
173
| [{-s|\--secondary-ip} *secondary\_ip*]
174
| [\--vg-name *vg-name*]
175
| [\--master-netdev *interface-name*]
176
| [\--master-netmask *netmask*]
177
| [\--use-external-mip-script {yes \| no}]
178
| [{-m|\--mac-prefix} *mac-prefix*]
179
| [\--no-lvm-storage]
180
| [\--no-etc-hosts]
181
| [\--no-ssh-init]
182
| [\--file-storage-dir *dir*]
183
| [\--enabled-hypervisors *hypervisors*]
184
| [{-H|\--hypervisor-parameters} *hypervisor*:*hv-param*=*value*[,*hv-param*=*value*...]]
185
| [{-B|\--backend-parameters} *be-param*=*value*[,*be-param*=*value*...]]
186
| [{-N|\--nic-parameters} *nic-param*=*value*[,*nic-param*=*value*...]]
187
| [{-D|\--disk-parameters} *disk-template*:*disk-param*=*value*[,*disk-param*=*value*...]]
188
| [\--maintain-node-health {yes \| no}]
189
| [\--uid-pool *user-id pool definition*]
190
| [{-I|\--default-iallocator} *default instance allocator*]
191
| [\--primary-ip-version *version*]
192
| [\--prealloc-wipe-disks {yes \| no}]
193
| [\--node-parameters *ndparams*]
194
| [{-C|\--candidate-pool-size} *candidate\_pool\_size*]
195
| [\--specs-cpu-count *spec-param*=*value* [,*spec-param*=*value*...]]
196
| [\--specs-disk-count *spec-param*=*value* [,*spec-param*=*value*...]]
197
| [\--specs-disk-size *spec-param*=*value* [,*spec-param*=*value*...]]
198
| [\--specs-mem-size *spec-param*=*value* [,*spec-param*=*value*...]]
199
| [\--specs-nic-count *spec-param*=*value* [,*spec-param*=*value*...]]
200
| [\--ipol-disk-templates *template* [,*template*...]]
201
| [\--disk-state *diskstate*]
202
| [\--hypervisor-state *hvstate*]
203
| {*clustername*}
204

    
205
This commands is only run once initially on the first node of the
206
cluster. It will initialize the cluster configuration, setup the
207
ssh-keys, start the daemons on the master node, etc. in order to have
208
a working one-node cluster.
209

    
210
Note that the *clustername* is not any random name. It has to be
211
resolvable to an IP address using DNS, and it is best if you give the
212
fully-qualified domain name. This hostname must resolve to an IP
213
address reserved exclusively for this purpose, i.e. not already in
214
use.
215

    
216
The cluster can run in two modes: single-home or dual-homed. In the
217
first case, all traffic (both public traffic, inter-node traffic and
218
data replication traffic) goes over the same interface. In the
219
dual-homed case, the data replication traffic goes over the second
220
network. The ``-s (--secondary-ip)`` option here marks the cluster as
221
dual-homed and its parameter represents this node's address on the
222
second network.  If you initialise the cluster with ``-s``, all nodes
223
added must have a secondary IP as well.
224

    
225
Note that for Ganeti it doesn't matter if the secondary network is
226
actually a separate physical network, or is done using tunneling,
227
etc. For performance reasons, it's recommended to use a separate
228
network, of course.
229

    
230
The ``--vg-name`` option will let you specify a volume group
231
different than "xenvg" for Ganeti to use when creating instance
232
disks. This volume group must have the same name on all nodes. Once
233
the cluster is initialized this can be altered by using the
234
**modify** command. If you don't want to use lvm storage at all use
235
the ``--no-lvm-storage`` option. Once the cluster is initialized
236
you can change this setup with the **modify** command.
237

    
238
The ``--master-netdev`` option is useful for specifying a different
239
interface on which the master will activate its IP address. It's
240
important that all nodes have this interface because you'll need it
241
for a master failover.
242

    
243
The ``--master-netmask`` option allows to specify a netmask for the
244
master IP. The netmask must be specified as an integer, and will be
245
interpreted as a CIDR netmask. The default value is 32 for an IPv4
246
address and 128 for an IPv6 address.
247

    
248
The ``--use-external-mip-script`` option allows to specify whether to
249
use an user-supplied master IP address setup script, whose location is
250
``@SYSCONFDIR@/ganeti/scripts/master-ip-setup``. If the option value is
251
set to False, the default script (located at
252
``@PKGLIBDIR@/tools/master-ip-setup``) will be executed.
253

    
254
The ``-m (--mac-prefix)`` option will let you specify a three byte
255
prefix under which the virtual MAC addresses of your instances will be
256
generated. The prefix must be specified in the format ``XX:XX:XX`` and
257
the default is ``aa:00:00``.
258

    
259
The ``--no-lvm-storage`` option allows you to initialize the
260
cluster without lvm support. This means that only instances using
261
files as storage backend will be possible to create. Once the
262
cluster is initialized you can change this setup with the
263
**modify** command.
264

    
265
The ``--no-etc-hosts`` option allows you to initialize the cluster
266
without modifying the /etc/hosts file.
267

    
268
The ``--no-ssh-init`` option allows you to initialize the cluster
269
without creating or distributing SSH key pairs.
270

    
271
The ``--file-storage-dir`` option allows you set the directory to
272
use for storing the instance disk files when using file storage as
273
backend for instance disks.
274

    
275
The ``--prealloc-wipe-disks`` sets a cluster wide configuration value
276
for wiping disks prior to allocation and size changes (``gnt-instance
277
grow-disk``). This increases security on instance level as the instance
278
can't access untouched data from its underlying storage.
279

    
280
The ``--enabled-hypervisors`` option allows you to set the list of
281
hypervisors that will be enabled for this cluster. Instance
282
hypervisors can only be chosen from the list of enabled
283
hypervisors, and the first entry of this list will be used by
284
default. Currently, the following hypervisors are available:
285

    
286
xen-pvm
287
    Xen PVM hypervisor
288

    
289
xen-hvm
290
    Xen HVM hypervisor
291

    
292
kvm
293
    Linux KVM hypervisor
294

    
295
chroot
296
    a simple chroot manager that starts chroot based on a script at the
297
    root of the filesystem holding the chroot
298

    
299
fake
300
    fake hypervisor for development/testing
301

    
302
Either a single hypervisor name or a comma-separated list of
303
hypervisor names can be specified. If this option is not specified,
304
only the xen-pvm hypervisor is enabled by default.
305

    
306
The ``-H (--hypervisor-parameters)`` option allows you to set default
307
hypervisor specific parameters for the cluster. The format of this
308
option is the name of the hypervisor, followed by a colon and a
309
comma-separated list of key=value pairs. The keys available for each
310
hypervisors are detailed in the gnt-instance(8) man page, in the
311
**add** command plus the following parameters which are only
312
configurable globally (at cluster level):
313

    
314
migration\_port
315
    Valid for the Xen PVM and KVM hypervisors.
316

    
317
    This options specifies the TCP port to use for live-migration. For
318
    Xen, the same port should be configured on all nodes in the
319
    ``/etc/xen/xend-config.sxp`` file, under the key
320
    "xend-relocation-port".
321

    
322
migration\_bandwidth
323
    Valid for the KVM hypervisor.
324

    
325
    This option specifies the maximum bandwidth that KVM will use for
326
    instance live migrations. The value is in MiB/s.
327

    
328
    This option is only effective with kvm versions >= 78 and qemu-kvm
329
    versions >= 0.10.0.
330

    
331
The ``-B (--backend-parameters)`` option allows you to set the default
332
backend parameters for the cluster. The parameter format is a
333
comma-separated list of key=value pairs with the following supported
334
keys:
335

    
336
vcpus
337
    Number of VCPUs to set for an instance by default, must be an
338
    integer, will be set to 1 if no specified.
339

    
340
maxmem
341
    Maximum amount of memory to allocate for an instance by default, can
342
    be either an integer or an integer followed by a unit (M for
343
    mebibytes and G for gibibytes are supported), will be set to 128M if
344
    not specified.
345

    
346
minmem
347
    Minimum amount of memory to allocate for an instance by default, can
348
    be either an integer or an integer followed by a unit (M for
349
    mebibytes and G for gibibytes are supported), will be set to 128M if
350
    not specified.
351

    
352
auto\_balance
353
    Value of the auto\_balance flag for instances to use by default,
354
    will be set to true if not specified.
355

    
356
always\_failover
357
    Default value for the ``always\_failover`` flag for instances; if
358
    not set, ``False`` is used.
359

    
360

    
361
The ``-N (--nic-parameters)`` option allows you to set the default
362
network interface parameters for the cluster. The parameter format is a
363
comma-separated list of key=value pairs with the following supported
364
keys:
365

    
366
mode
367
    The default NIC mode, one of ``routed``, ``bridged`` or
368
    ``openvswitch``.
369

    
370
link
371
    In ``bridged`` or ``openvswitch`` mode the default interface where
372
    to attach NICs. In ``routed`` mode it represents an
373
    hypervisor-vif-script dependent value to allow different instance
374
    groups. For example under the KVM default network script it is
375
    interpreted as a routing table number or name. Openvswitch support
376
    is also hypervisor dependent and currently works for the default KVM
377
    network script. Under Xen a custom network script must be provided.
378

    
379
The ``-D (--disk-parameters)`` option allows you to set the default disk
380
template parameters at cluster level. The format used for this option is
381
similar to the one use by the  ``-H`` option: the disk template name
382
must be specified first, followed by a colon and by a comma-separated
383
list of key-value pairs. These parameters can only be specified at
384
cluster and node group level; the cluster-level parameter are inherited
385
by the node group at the moment of its creation, and can be further
386
modified at node group level using the **gnt-group**(8) command.
387

    
388
The following is the list of disk parameters available for the **drbd**
389
template, with measurement units specified in square brackets at the end
390
of the description (when applicable):
391

    
392
resync-rate
393
    Static re-synchronization rate. [KiB/s]
394

    
395
data-stripes
396
    Number of stripes to use for data LVs.
397

    
398
meta-stripes
399
    Number of stripes to use for meta LVs.
400

    
401
disk-barriers
402
    What kind of barriers to **disable** for disks. It can either assume
403
    the value "n", meaning no barrier disabled, or a non-empty string
404
    containing a subset of the characters "bfd". "b" means disable disk
405
    barriers, "f" means disable disk flushes, "d" disables disk drains.
406

    
407
meta-barriers
408
    Boolean value indicating whether the meta barriers should be
409
    disabled (True) or not (False).
410

    
411
metavg
412
    String containing the name of the default LVM volume group for DRBD
413
    metadata. By default, it is set to ``xenvg``. It can be overridden
414
    during the instance creation process by using the ``metavg`` key of
415
    the ``--disk`` parameter.
416

    
417
disk-custom
418
    String containing additional parameters to be appended to the
419
    arguments list of ``drbdsetup disk``.
420

    
421
net-custom
422
    String containing additional parameters to be appended to the
423
    arguments list of ``drbdsetup net``.
424

    
425
dynamic-resync
426
    Boolean indicating whether to use the dynamic resync speed
427
    controller or not. If enabled, c-plan-ahead must be non-zero and all
428
    the c-* parameters will be used by DRBD. Otherwise, the value of
429
    resync-rate will be used as a static resync speed.
430

    
431
c-plan-ahead
432
    Agility factor of the dynamic resync speed controller. (the higher,
433
    the slower the algorithm will adapt the resync speed). A value of 0
434
    (that is the default) disables the controller. [ds]
435

    
436
c-fill-target
437
    Maximum amount of in-flight resync data for the dynamic resync speed
438
    controller. [sectors]
439

    
440
c-delay-target
441
    Maximum estimated peer response latency for the dynamic resync speed
442
    controller. [ds]
443

    
444
c-min-rate
445
    Minimum resync speed for the dynamic resync speed controller. [KiB/s]
446

    
447
c-max-rate
448
    Upper bound on resync speed for the dynamic resync speed controller.
449
    [KiB/s]
450

    
451
List of parameters available for the **plain** template:
452

    
453
stripes
454
    Number of stripes to use for new LVs.
455

    
456
List of parameters available for the **rbd** template:
457

    
458
pool
459
    The RADOS cluster pool, inside which all rbd volumes will reside.
460
    When a new RADOS cluster is deployed, the default pool to put rbd
461
    volumes (Images in RADOS terminology) is 'rbd'.
462

    
463
The option ``--maintain-node-health`` allows one to enable/disable
464
automatic maintenance actions on nodes. Currently these include
465
automatic shutdown of instances and deactivation of DRBD devices on
466
offline nodes; in the future it might be extended to automatic
467
removal of unknown LVM volumes, etc. Note that this option is only
468
useful if the use of ``ganeti-confd`` was enabled at compilation.
469

    
470
The ``--uid-pool`` option initializes the user-id pool. The
471
*user-id pool definition* can contain a list of user-ids and/or a
472
list of user-id ranges. The parameter format is a comma-separated
473
list of numeric user-ids or user-id ranges. The ranges are defined
474
by a lower and higher boundary, separated by a dash. The boundaries
475
are inclusive. If the ``--uid-pool`` option is not supplied, the
476
user-id pool is initialized to an empty list. An empty list means
477
that the user-id pool feature is disabled.
478

    
479
The ``-I (--default-iallocator)`` option specifies the default
480
instance allocator. The instance allocator will be used for operations
481
like instance creation, instance and node migration, etc. when no
482
manual override is specified. If this option is not specified and
483
htools was not enabled at build time, the default instance allocator
484
will be blank, which means that relevant operations will require the
485
administrator to manually specify either an instance allocator, or a
486
set of nodes. If the option is not specified but htools was enabled,
487
the default iallocator will be **hail**(1) (assuming it can be found
488
on disk). The default iallocator can be changed later using the
489
**modify** command.
490

    
491
The ``--primary-ip-version`` option specifies the IP version used
492
for the primary address. Possible values are 4 and 6 for IPv4 and
493
IPv6, respectively. This option is used when resolving node names
494
and the cluster name.
495

    
496
The ``--node-parameters`` option allows you to set default node
497
parameters for the cluster. Please see **ganeti**(7) for more
498
information about supported key=value pairs.
499

    
500
The ``-C (--candidate-pool-size)`` option specifies the
501
``candidate_pool_size`` cluster parameter. This is the number of nodes
502
that the master will try to keep as master\_candidates. For more
503
details about this role and other node roles, see the ganeti(7).
504

    
505
The ``--specs-...`` and ``--ipol-disk-templates`` options specify
506
instance policy on the cluster. For the ``--specs-...`` options, each
507
option can have three values: ``min``, ``max`` and ``std``, which can
508
also be modified on group level (except for ``std``, which is defined
509
once for the entire cluster). Please note, that ``std`` values are not
510
the same as defaults set by ``--beparams``, but they are used for the
511
capacity calculations. The ``--ipol-disk-templates`` option takes a
512
comma-separated list of disk templates.
513

    
514
- ``--specs-cpu-count`` limits the number of VCPUs that can be used by an
515
  instance.
516
- ``--specs-disk-count`` limits the number of disks
517
- ``--specs-disk-size`` limits the disk size for every disk used
518
- ``--specs-mem-size`` limits the amount of memory available
519
- ``--specs-nic-count`` sets limits on the number of NICs used
520
- ``--ipol-disk-templates`` limits the allowed disk templates
521

    
522
For details about how to use ``--hypervisor-state`` and ``--disk-state``
523
have a look at **ganeti**(7).
524

    
525
LIST-TAGS
526
~~~~~~~~~
527

    
528
**list-tags**
529

    
530
List the tags of the cluster.
531

    
532
MASTER-FAILOVER
533
~~~~~~~~~~~~~~~
534

    
535
**master-failover** [\--no-voting] [\--yes-do-it]
536

    
537
Failover the master role to the current node.
538

    
539
The ``--no-voting`` option skips the remote node agreement checks.
540
This is dangerous, but necessary in some cases (for example failing
541
over the master role in a 2 node cluster with the original master
542
down). If the original master then comes up, it won't be able to
543
start its master daemon because it won't have enough votes, but so
544
won't the new master, if the master daemon ever needs a restart.
545
You can pass ``--no-voting`` to **ganeti-masterd** on the new
546
master to solve this problem, and run **gnt-cluster redist-conf**
547
to make sure the cluster is consistent again.
548

    
549
The option ``--yes-do-it`` is used together with ``--no-voting``, for
550
skipping the interactive checks. This is even more dangerous, and should
551
only be used in conjunction with other means (e.g. a HA suite) to
552
confirm that the operation is indeed safe.
553

    
554
MASTER-PING
555
~~~~~~~~~~~
556

    
557
**master-ping**
558

    
559
Checks if the master daemon is alive.
560

    
561
If the master daemon is alive and can respond to a basic query (the
562
equivalent of **gnt-cluster info**), then the exit code of the
563
command will be 0. If the master daemon is not alive (either due to
564
a crash or because this is not the master node), the exit code will
565
be 1.
566

    
567
MODIFY
568
~~~~~~
569

    
570
| **modify** [\--submit]
571
| [\--vg-name *vg-name*]
572
| [\--no-lvm-storage]
573
| [\--enabled-hypervisors *hypervisors*]
574
| [{-H|\--hypervisor-parameters} *hypervisor*:*hv-param*=*value*[,*hv-param*=*value*...]]
575
| [{-B|\--backend-parameters} *be-param*=*value*[,*be-param*=*value*...]]
576
| [{-N|\--nic-parameters} *nic-param*=*value*[,*nic-param*=*value*...]]
577
| [{-D|\--disk-parameters} *disk-template*:*disk-param*=*value*[,*disk-param*=*value*...]]
578
| [\--uid-pool *user-id pool definition*]
579
| [\--add-uids *user-id pool definition*]
580
| [\--remove-uids *user-id pool definition*]
581
| [{-C|\--candidate-pool-size} *candidate\_pool\_size*]
582
| [\--maintain-node-health {yes \| no}]
583
| [\--prealloc-wipe-disks {yes \| no}]
584
| [{-I|\--default-iallocator} *default instance allocator*]
585
| [\--reserved-lvs=*NAMES*]
586
| [\--node-parameters *ndparams*]
587
| [\--master-netdev *interface-name*]
588
| [\--master-netmask *netmask*]
589
| [\--use-external-mip-script {yes \| no}]
590
| [\--hypervisor-state *hvstate*]
591
| [\--disk-state *diskstate*]
592
| [\--specs-cpu-count *spec-param*=*value* [,*spec-param*=*value*...]]
593
| [\--specs-disk-count *spec-param*=*value* [,*spec-param*=*value*...]]
594
| [\--specs-disk-size *spec-param*=*value* [,*spec-param*=*value*...]]
595
| [\--specs-mem-size *spec-param*=*value* [,*spec-param*=*value*...]]
596
| [\--specs-nic-count *spec-param*=*value* [,*spec-param*=*value*...]]
597
| [\--ipol-disk-templates *template* [,*template*...]]
598

    
599

    
600
Modify the options for the cluster.
601

    
602
The ``--vg-name``, ``--no-lvm-storarge``, ``--enabled-hypervisors``,
603
``-H (--hypervisor-parameters)``, ``-B (--backend-parameters)``,
604
``-D (--disk-parameters)``, ``--nic-parameters``, ``-C
605
(--candidate-pool-size)``, ``--maintain-node-health``,
606
``--prealloc-wipe-disks``, ``--uid-pool``, ``--node-parameters``,
607
``--master-netdev``, ``--master-netmask`` and
608
``--use-external-mip-script`` options are described in the **init**
609
command.
610

    
611
The ``--hypervisor-state`` and ``--disk-state`` options are described in
612
detail in **ganeti(7)**.
613

    
614
The ``--add-uids`` and ``--remove-uids`` options can be used to
615
modify the user-id pool by adding/removing a list of user-ids or
616
user-id ranges.
617

    
618
The option ``--reserved-lvs`` specifies a list (comma-separated) of
619
logical volume group names (regular expressions) that will be
620
ignored by the cluster verify operation. This is useful if the
621
volume group used for Ganeti is shared with the system for other
622
uses. Note that it's not recommended to create and mark as ignored
623
logical volume names which match Ganeti's own name format (starting
624
with UUID and then .diskN), as this option only skips the
625
verification, but not the actual use of the names given.
626

    
627
To remove all reserved logical volumes, pass in an empty argument
628
to the option, as in ``--reserved-lvs=`` or ``--reserved-lvs ''``.
629

    
630
The ``-I (--default-iallocator)`` is described in the **init**
631
command. To clear the default iallocator, just pass an empty string
632
('').
633

    
634
The ``--specs-...`` and ``--ipol-disk-templates`` options are described
635
in the **init** command.
636

    
637
See **ganeti(7)** for a description of ``--submit`` and other common
638
options.
639

    
640
QUEUE
641
~~~~~
642

    
643
**queue** {drain | undrain | info}
644

    
645
Change job queue properties.
646

    
647
The ``drain`` option sets the drain flag on the job queue. No new
648
jobs will be accepted, but jobs already in the queue will be
649
processed.
650

    
651
The ``undrain`` will unset the drain flag on the job queue. New
652
jobs will be accepted.
653

    
654
The ``info`` option shows the properties of the job queue.
655

    
656
WATCHER
657
~~~~~~~
658

    
659
**watcher** {pause *duration* | continue | info}
660

    
661
Make the watcher pause or let it continue.
662

    
663
The ``pause`` option causes the watcher to pause for *duration*
664
seconds.
665

    
666
The ``continue`` option will let the watcher continue.
667

    
668
The ``info`` option shows whether the watcher is currently paused.
669

    
670
REDIST-CONF
671
~~~~~~~~~~~
672

    
673
**redist-conf** [\--submit]
674

    
675
This command forces a full push of configuration files from the
676
master node to the other nodes in the cluster. This is normally not
677
needed, but can be run if the **verify** complains about
678
configuration mismatches.
679

    
680
See **ganeti(7)** for a description of ``--submit`` and other common
681
options.
682

    
683
REMOVE-TAGS
684
~~~~~~~~~~~
685

    
686
**remove-tags** [\--from *file*] {*tag*...}
687

    
688
Remove tags from the cluster. If any of the tags are not existing
689
on the cluster, the entire operation will abort.
690

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

    
697
RENAME
698
~~~~~~
699

    
700
**rename** [-f] {*name*}
701

    
702
Renames the cluster and in the process updates the master IP
703
address to the one the new name resolves to. At least one of either
704
the name or the IP address must be different, otherwise the
705
operation will be aborted.
706

    
707
Note that since this command can be dangerous (especially when run
708
over SSH), the command will require confirmation unless run with
709
the ``-f`` option.
710

    
711
RENEW-CRYPTO
712
~~~~~~~~~~~~
713

    
714
| **renew-crypto** [-f]
715
| [\--new-cluster-certificate] [\--new-confd-hmac-key]
716
| [\--new-rapi-certificate] [\--rapi-certificate *rapi-cert*]
717
| [\--new-spice-certificate | \--spice-certificate *spice-cert*
718
| \--spice-ca-certificate *spice-ca-cert*]
719
| [\--new-cluster-domain-secret] [\--cluster-domain-secret *filename*]
720

    
721
This command will stop all Ganeti daemons in the cluster and start
722
them again once the new certificates and keys are replicated. The
723
options ``--new-cluster-certificate`` and ``--new-confd-hmac-key``
724
can be used to regenerate the cluster-internal SSL certificate
725
respective the HMAC key used by ganeti-confd(8).
726

    
727
To generate a new self-signed RAPI certificate (used by
728
ganeti-rapi(8)) specify ``--new-rapi-certificate``. If you want to
729
use your own certificate, e.g. one signed by a certificate
730
authority (CA), pass its filename to ``--rapi-certificate``.
731

    
732
To generate a new self-signed SPICE certificate, used by SPICE
733
connections to the KVM hypervisor, specify the
734
``--new-spice-certificate`` option. If you want to provide a
735
certificate, pass its filename to ``--spice-certificate`` and pass the
736
signing CA certificate to ``--spice-ca-certificate``.
737

    
738
``--new-cluster-domain-secret`` generates a new, random cluster
739
domain secret. ``--cluster-domain-secret`` reads the secret from a
740
file. The cluster domain secret is used to sign information
741
exchanged between separate clusters via a third party.
742

    
743
REPAIR-DISK-SIZES
744
~~~~~~~~~~~~~~~~~
745

    
746
**repair-disk-sizes** [instance...]
747

    
748
This command checks that the recorded size of the given instance's
749
disks matches the actual size and updates any mismatches found.
750
This is needed if the Ganeti configuration is no longer consistent
751
with reality, as it will impact some disk operations. If no
752
arguments are given, all instances will be checked.
753

    
754
Note that only active disks can be checked by this command; in case
755
a disk cannot be activated it's advised to use
756
**gnt-instance activate-disks \--ignore-size ...** to force
757
activation without regard to the current size.
758

    
759
When the all disk sizes are consistent, the command will return no
760
output. Otherwise it will log details about the inconsistencies in
761
the configuration.
762

    
763
SEARCH-TAGS
764
~~~~~~~~~~~
765

    
766
**search-tags** {*pattern*}
767

    
768
Searches the tags on all objects in the cluster (the cluster
769
itself, the nodes and the instances) for a given pattern. The
770
pattern is interpreted as a regular expression and a search will be
771
done on it (i.e. the given pattern is not anchored to the beggining
772
of the string; if you want that, prefix the pattern with ^).
773

    
774
If no tags are matching the pattern, the exit code of the command
775
will be one. If there is at least one match, the exit code will be
776
zero. Each match is listed on one line, the object and the tag
777
separated by a space. The cluster will be listed as /cluster, a
778
node will be listed as /nodes/*name*, and an instance as
779
/instances/*name*. Example:
780

    
781
::
782

    
783
    # gnt-cluster search-tags time
784
    /cluster ctime:2007-09-01
785
    /nodes/node1.example.com mtime:2007-10-04
786

    
787
VERIFY
788
~~~~~~
789

    
790
| **verify** [\--no-nplus1-mem] [\--node-group *nodegroup*]
791
| [\--error-codes] [{-I|\--ignore-errors} *errorcode*]
792
| [{-I|\--ignore-errors} *errorcode*...]
793

    
794
Verify correctness of cluster configuration. This is safe with
795
respect to running instances, and incurs no downtime of the
796
instances.
797

    
798
If the ``--no-nplus1-mem`` option is given, Ganeti won't check
799
whether if it loses a node it can restart all the instances on
800
their secondaries (and report an error otherwise).
801

    
802
With ``--node-group``, restrict the verification to those nodes and
803
instances that live in the named group. This will not verify global
804
settings, but will allow to perform verification of a group while other
805
operations are ongoing in other groups.
806

    
807
The ``--error-codes`` option outputs each error in the following
808
parseable format: *ftype*:*ecode*:*edomain*:*name*:*msg*.
809
These fields have the following meaning:
810

    
811
ftype
812
    Failure type. Can be *WARNING* or *ERROR*.
813

    
814
ecode
815
    Error code of the failure. See below for a list of error codes.
816

    
817
edomain
818
    Can be *cluster*, *node* or *instance*.
819

    
820
name
821
    Contains the name of the item that is affected from the failure.
822

    
823
msg
824
    Contains a descriptive error message about the error
825

    
826
``gnt-cluster verify`` will have a non-zero exit code if at least one of
827
the failures that are found are of type *ERROR*.
828

    
829
The ``--ignore-errors`` option can be used to change this behaviour,
830
because it demotes the error represented by the error code received as a
831
parameter to a warning. The option must be repeated for each error that
832
should be ignored (e.g.: ``-I ENODEVERSION -I ENODEORPHANLV``). The
833
``--error-codes`` option can be used to determine the error code of a
834
given error.
835

    
836
List of error codes:
837

    
838
@CONSTANTS_ECODES@
839

    
840
VERIFY-DISKS
841
~~~~~~~~~~~~
842

    
843
**verify-disks**
844

    
845
The command checks which instances have degraded DRBD disks and
846
activates the disks of those instances.
847

    
848
This command is run from the **ganeti-watcher** tool, which also
849
has a different, complementary algorithm for doing this check.
850
Together, these two should ensure that DRBD disks are kept
851
consistent.
852

    
853
VERSION
854
~~~~~~~
855

    
856
**version**
857

    
858
Show the cluster version.
859

    
860
.. vim: set textwidth=72 :
861
.. Local Variables:
862
.. mode: rst
863
.. fill-column: 72
864
.. End: