Statistics
| Branch: | Tag: | Revision:

root / man / gnt-cluster.rst @ e8f936b0

History | View | Annotate | Download (30.3 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. If the option ``-n`` is not given,
50
the command will be executed on all nodes, otherwise it will be
51
executed only on the node(s) specified. Use the option multiple
52
times for running it on multiple nodes, like::
53

    
54
    # gnt-cluster command -n node1.example.com -n node2.example.com date
55

    
56
The ``-g`` option can be used to run a command only on a specific node
57
group, e.g.::
58

    
59
    # gnt-cluster command -g default date
60

    
61
The ``-M`` option can be used to prepend the node name to all output
62
lines.
63

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

    
70
So given the node names node1, node2, node3, node10, node11, with
71
node3 being the master, the order will be: node1, node2, node10,
72
node11, node3.
73

    
74
The command is constructed by concatenating all other command line
75
arguments. For example, to list the contents of the /etc directory
76
on all nodes, run::
77

    
78
    # gnt-cluster command ls -l /etc
79

    
80
and the command which will be executed will be ``ls -l /etc``.
81

    
82
COPYFILE
83
~~~~~~~~
84

    
85
| **copyfile** [\--use-replication-network] [-n *node*] [-g *group*]
86
| {*file*}
87

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

    
97
    # gnt-cluster -n node1.example.com -n node2.example.com copyfile /tmp/test
98

    
99
This will copy the file /tmp/test from the current node to the two
100
named nodes.
101

    
102
DEACTIVATE-MASTER-IP
103
~~~~~~~~~~~~~~~~~~~~
104

    
105
**deactivate-master-ip** [\--yes]
106

    
107
Deactivates the master IP on the master node.
108

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

    
114
DESTROY
115
~~~~~~~
116

    
117
**destroy** {\--yes-do-it}
118

    
119
Remove all configuration files related to the cluster, so that a
120
**gnt-cluster init** can be done again afterwards.
121

    
122
Since this is a dangerous command, you are required to pass the
123
argument *\--yes-do-it.*
124

    
125
EPO
126
~~~
127

    
128
**epo** [\--on] [\--groups|\--all] [\--power-delay] *arguments*
129

    
130
Performs an emergency power-off on nodes given as arguments. If
131
``--groups`` is given, arguments are node groups. If ``--all`` is
132
provided, the whole cluster will be shut down.
133

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

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

    
146
GETMASTER
147
~~~~~~~~~
148

    
149
**getmaster**
150

    
151
Displays the current master node.
152

    
153
INFO
154
~~~~
155

    
156
**info** [\--roman]
157

    
158
Shows runtime cluster information: cluster name, architecture (32
159
or 64 bit), master node, node list and instance list.
160

    
161
Passing the ``--roman`` option gnt-cluster info will try to print
162
its integer fields in a latin friendly way. This allows further
163
diffusion of Ganeti among ancient cultures.
164

    
165
INIT
166
~~~~
167

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

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

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

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

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

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

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

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

    
244
The ``--use-external-mip-script`` options allows to specify
245
whether to use an user-supplied master IP address setup script, whose
246
location is ``/etc/ganeti/scripts/master-ip-setup``. If the option value
247
is set to False, the default script, whose location is
248
``/usr/local/lib/ganeti/tools/master-ip-setup``, will be executed.
249

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

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

    
261
The ``--no-etc-hosts`` option allows you to initialize the cluster
262
without modifying the /etc/hosts file.
263

    
264
The ``--no-ssh-init`` option allows you to initialize the cluster
265
without creating or distributing SSH key pairs.
266

    
267
The ``--file-storage-dir`` option allows you set the directory to
268
use for storing the instance disk files when using file storage as
269
backend for instance disks.
270

    
271
The ``--prealloc-wipe-disks`` sets a cluster wide configuration
272
value for wiping disks prior to allocation. This increases security
273
on instance level as the instance can't access untouched data from
274
it's underlying storage.
275

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

    
282
xen-pvm
283
    Xen PVM hypervisor
284

    
285
xen-hvm
286
    Xen HVM hypervisor
287

    
288
kvm
289
    Linux KVM hypervisor
290

    
291
chroot
292
    a simple chroot manager that starts chroot based on a script at the
293
    root of the filesystem holding the chroot
294

    
295
fake
296
    fake hypervisor for development/testing
297

    
298
Either a single hypervisor name or a comma-separated list of
299
hypervisor names can be specified. If this option is not specified,
300
only the xen-pvm hypervisor is enabled by default.
301

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

    
310
migration\_port
311
    Valid for the Xen PVM and KVM hypervisors.
312

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

    
318
migration\_bandwidth
319
    Valid for the KVM hypervisor.
320

    
321
    This option specifies the maximum bandwidth that KVM will use for
322
    instance live migrations. The value is in MiB/s.
323

    
324
    This option is only effective with kvm versions >= 78 and qemu-kvm
325
    versions >= 0.10.0.
326

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

    
332
vcpus
333
    Number of VCPUs to set for an instance by default, must be an
334
    integer, will be set to 1 if no specified.
335

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

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

    
348
auto\_balance
349
    Value of the auto\_balance flag for instances to use by default,
350
    will be set to true if not specified.
351

    
352
always\_failover
353
    Default value for the ``always\_failover`` flag for instances; if
354
    not set, ``False`` is used.
355

    
356

    
357
The ``-N (--nic-parameters)`` option allows you to set the default nic
358
parameters for the cluster. The parameter format is a comma-separated
359
list of key=value pairs with the following supported keys:
360

    
361
mode
362
    The default nic mode, 'routed' or 'bridged'.
363

    
364
link
365
    In bridged mode the default NIC bridge. In routed mode it
366
    represents an hypervisor-vif-script dependent value to allow
367
    different instance groups. For example under the KVM default
368
    network script it is interpreted as a routing table number or
369
    name.
370

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

    
380
The following is the list of disk parameters available for the **drbd**
381
template, with measurement units specified in square brackets at the end
382
of the description (when applicable):
383

    
384
resync-rate
385
    Static re-synchronization rate. [KiB/s]
386

    
387
data-stripes
388
    Number of stripes to use for data LVs.
389

    
390
meta-stripes
391
    Number of stripes to use for meta LVs.
392

    
393
disk-barriers
394
    What kind of barriers to **disable** for disks. It can either assume
395
    the value "n", meaning no barrier disabled, or a non-empty string
396
    containing a subset of the characters "bfd". "b" means disable disk
397
    barriers, "f" means disable disk flushes, "d" disables disk drains.
398

    
399
meta-barriers
400
    Boolean value indicating whether the meta barriers should be
401
    disabled (True) or not (False).
402

    
403
metavg
404
    String containing the name of the default LVM volume group for DRBD
405
    metadata. By default, it is set to ``xenvg``. It can be overridden
406
    during the instance creation process by using the ``metavg`` key of
407
    the ``--disk`` parameter.
408

    
409
disk-custom
410
    String containing additional parameters to be appended to the
411
    arguments list of ``drbdsetup disk``.
412

    
413
net-custom
414
    String containing additional parameters to be appended to the
415
    arguments list of ``drbdsetup net``.
416

    
417
dynamic-resync
418
    Boolean indicating whether to use the dynamic resync speed
419
    controller or not. If enabled, c-plan-ahead must be non-zero and all
420
    the c-* parameters will be used by DRBD. Otherwise, the value of
421
    resync-rate will be used as a static resync speed.
422

    
423
c-plan-ahead
424
    Agility factor of the dynamic resync speed controller. (the higher,
425
    the slower the algorithm will adapt the resync speed). A value of 0
426
    (that is the default) disables the controller. [ds]
427

    
428
c-fill-target
429
    Maximum amount of in-flight resync data for the dynamic resync speed
430
    controller. [sectors]
431

    
432
c-delay-target
433
    Maximum estimated peer response latency for the dynamic resync speed
434
    controller. [ds]
435

    
436
c-min-rate
437
    Minimum resync speed for the dynamic resync speed controller. [KiB/s]
438

    
439
c-max-rate
440
    Upper bound on resync speed for the dynamic resync speed controller.
441
    [KiB/s]
442

    
443
List of parameters available for the **plain** template:
444

    
445
stripes
446
    Number of stripes to use for new LVs.
447

    
448
List of parameters available for the **rbd** template:
449

    
450
pool
451
    The RADOS cluster pool, inside which all rbd volumes will reside.
452
    When a new RADOS cluster is deployed, the default pool to put rbd
453
    volumes (Images in RADOS terminology) is 'rbd'.
454

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

    
462
The ``--uid-pool`` option initializes the user-id pool. The
463
*user-id pool definition* can contain a list of user-ids and/or a
464
list of user-id ranges. The parameter format is a comma-separated
465
list of numeric user-ids or user-id ranges. The ranges are defined
466
by a lower and higher boundary, separated by a dash. The boundaries
467
are inclusive. If the ``--uid-pool`` option is not supplied, the
468
user-id pool is initialized to an empty list. An empty list means
469
that the user-id pool feature is disabled.
470

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

    
483
The ``--primary-ip-version`` option specifies the IP version used
484
for the primary address. Possible values are 4 and 6 for IPv4 and
485
IPv6, respectively. This option is used when resolving node names
486
and the cluster name.
487

    
488
The ``--node-parameters`` option allows you to set default node
489
parameters for the cluster. Please see **ganeti**(7) for more
490
information about supported key=value pairs.
491

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

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

    
506
- ``--specs-cpu-count`` limits the number of VCPUs that can be used by an
507
  instance.
508
- ``--specs-disk-count`` limits the number of disks
509
- ``--specs-disk-size`` limits the disk size for every disk used
510
- ``--specs-mem-size`` limits the amount of memory available
511
- ``--specs-nic-count`` sets limits on the number of NICs used
512
- ``--ipol-disk-templates`` limits the allowed disk templates
513

    
514
For details about how to use ``--hypervisor-state`` and ``--disk-state``
515
have a look at **ganeti**(7).
516

    
517
LIST-TAGS
518
~~~~~~~~~
519

    
520
**list-tags**
521

    
522
List the tags of the cluster.
523

    
524
MASTER-FAILOVER
525
~~~~~~~~~~~~~~~
526

    
527
**master-failover** [\--no-voting]
528

    
529
Failover the master role to the current node.
530

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

    
541
MASTER-PING
542
~~~~~~~~~~~
543

    
544
**master-ping**
545

    
546
Checks if the master daemon is alive.
547

    
548
If the master daemon is alive and can respond to a basic query (the
549
equivalent of **gnt-cluster info**), then the exit code of the
550
command will be 0. If the master daemon is not alive (either due to
551
a crash or because this is not the master node), the exit code will
552
be 1.
553

    
554
MODIFY
555
~~~~~~
556

    
557
| **modify**
558
| [\--vg-name *vg-name*]
559
| [\--no-lvm-storage]
560
| [\--enabled-hypervisors *hypervisors*]
561
| [{-H|\--hypervisor-parameters} *hypervisor*:*hv-param*=*value*[,*hv-param*=*value*...]]
562
| [{-B|\--backend-parameters} *be-param*=*value*[,*be-param*=*value*...]]
563
| [{-N|\--nic-parameters} *nic-param*=*value*[,*nic-param*=*value*...]]
564
| [{-D|\--disk-parameters} *disk-template*:*disk-param*=*value*[,*disk-param*=*value*...]]
565
| [\--uid-pool *user-id pool definition*]
566
| [\--add-uids *user-id pool definition*]
567
| [\--remove-uids *user-id pool definition*]
568
| [{-C|\--candidate-pool-size} *candidate\_pool\_size*]
569
| [\--maintain-node-health {yes \| no}]
570
| [\--prealloc-wipe-disks {yes \| no}]
571
| [{-I|\--default-iallocator} *default instance allocator*]
572
| [\--reserved-lvs=*NAMES*]
573
| [\--node-parameters *ndparams*]
574
| [\--master-netdev *interface-name*]
575
| [\--master-netmask *netmask*]
576
| [\--use-external-mip-script {yes \| no}]
577
| [\--hypervisor-state *hvstate*]
578
| [\--disk-state *diskstate*]
579
| [\--specs-cpu-count *spec-param*=*value* [,*spec-param*=*value*...]]
580
| [\--specs-disk-count *spec-param*=*value* [,*spec-param*=*value*...]]
581
| [\--specs-disk-size *spec-param*=*value* [,*spec-param*=*value*...]]
582
| [\--specs-mem-size *spec-param*=*value* [,*spec-param*=*value*...]]
583
| [\--specs-nic-count *spec-param*=*value* [,*spec-param*=*value*...]]
584
| [\--ipol-disk-templates *template* [,*template*...]]
585

    
586

    
587
Modify the options for the cluster.
588

    
589
The ``--vg-name``, ``--no-lvm-storarge``, ``--enabled-hypervisors``,
590
``-H (--hypervisor-parameters)``, ``-B (--backend-parameters)``,
591
``-D (--disk-parameters)``, ``--nic-parameters``, ``-C
592
(--candidate-pool-size)``, ``--maintain-node-health``,
593
``--prealloc-wipe-disks``, ``--uid-pool``, ``--node-parameters``,
594
``--master-netdev``, ``--master-netmask`` and
595
``--use-external-mip-script`` options are described in the **init**
596
command.
597

    
598
The ``--hypervisor-state`` and ``--disk-state`` options are described in
599
detail in **ganeti**(7).
600

    
601
The ``--add-uids`` and ``--remove-uids`` options can be used to
602
modify the user-id pool by adding/removing a list of user-ids or
603
user-id ranges.
604

    
605
The option ``--reserved-lvs`` specifies a list (comma-separated) of
606
logical volume group names (regular expressions) that will be
607
ignored by the cluster verify operation. This is useful if the
608
volume group used for Ganeti is shared with the system for other
609
uses. Note that it's not recommended to create and mark as ignored
610
logical volume names which match Ganeti's own name format (starting
611
with UUID and then .diskN), as this option only skips the
612
verification, but not the actual use of the names given.
613

    
614
To remove all reserved logical volumes, pass in an empty argument
615
to the option, as in ``--reserved-lvs=`` or ``--reserved-lvs ''``.
616

    
617
The ``-I (--default-iallocator)`` is described in the **init**
618
command. To clear the default iallocator, just pass an empty string
619
('').
620

    
621
The ``--specs-...`` and ``--ipol-disk-templates`` options are described
622
in the **init** command.
623

    
624
QUEUE
625
~~~~~
626

    
627
**queue** {drain | undrain | info}
628

    
629
Change job queue properties.
630

    
631
The ``drain`` option sets the drain flag on the job queue. No new
632
jobs will be accepted, but jobs already in the queue will be
633
processed.
634

    
635
The ``undrain`` will unset the drain flag on the job queue. New
636
jobs will be accepted.
637

    
638
The ``info`` option shows the properties of the job queue.
639

    
640
WATCHER
641
~~~~~~~
642

    
643
**watcher** {pause *duration* | continue | info}
644

    
645
Make the watcher pause or let it continue.
646

    
647
The ``pause`` option causes the watcher to pause for *duration*
648
seconds.
649

    
650
The ``continue`` option will let the watcher continue.
651

    
652
The ``info`` option shows whether the watcher is currently paused.
653

    
654
redist-conf
655
~~~~~~~~~~~
656

    
657
**redist-conf** [\--submit]
658

    
659
This command forces a full push of configuration files from the
660
master node to the other nodes in the cluster. This is normally not
661
needed, but can be run if the **verify** complains about
662
configuration mismatches.
663

    
664
The ``--submit`` option is used to send the job to the master
665
daemon but not wait for its completion. The job ID will be shown so
666
that it can be examined via **gnt-job info**.
667

    
668
REMOVE-TAGS
669
~~~~~~~~~~~
670

    
671
**remove-tags** [\--from *file*] {*tag*...}
672

    
673
Remove tags from the cluster. If any of the tags are not existing
674
on the cluster, the entire operation will abort.
675

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

    
682
RENAME
683
~~~~~~
684

    
685
**rename** [-f] {*name*}
686

    
687
Renames the cluster and in the process updates the master IP
688
address to the one the new name resolves to. At least one of either
689
the name or the IP address must be different, otherwise the
690
operation will be aborted.
691

    
692
Note that since this command can be dangerous (especially when run
693
over SSH), the command will require confirmation unless run with
694
the ``-f`` option.
695

    
696
RENEW-CRYPTO
697
~~~~~~~~~~~~
698

    
699
| **renew-crypto** [-f]
700
| [\--new-cluster-certificate] [\--new-confd-hmac-key]
701
| [\--new-rapi-certificate] [\--rapi-certificate *rapi-cert*]
702
| [\--new-spice-certificate | \--spice-certificate *spice-cert*
703
| \--spice-ca-certificate *spice-ca-cert*]
704
| [\--new-cluster-domain-secret] [\--cluster-domain-secret *filename*]
705

    
706
This command will stop all Ganeti daemons in the cluster and start
707
them again once the new certificates and keys are replicated. The
708
options ``--new-cluster-certificate`` and ``--new-confd-hmac-key``
709
can be used to regenerate the cluster-internal SSL certificate
710
respective the HMAC key used by ganeti-confd(8).
711

    
712
To generate a new self-signed RAPI certificate (used by
713
ganeti-rapi(8)) specify ``--new-rapi-certificate``. If you want to
714
use your own certificate, e.g. one signed by a certificate
715
authority (CA), pass its filename to ``--rapi-certificate``.
716

    
717
To generate a new self-signed SPICE certificate, used by SPICE
718
connections to the KVM hypervisor, specify the
719
``--new-spice-certificate`` option. If you want to provide a
720
certificate, pass its filename to ``--spice-certificate`` and pass the
721
signing CA certificate to ``--spice-ca-certificate``.
722

    
723
``--new-cluster-domain-secret`` generates a new, random cluster
724
domain secret. ``--cluster-domain-secret`` reads the secret from a
725
file. The cluster domain secret is used to sign information
726
exchanged between separate clusters via a third party.
727

    
728
REPAIR-DISK-SIZES
729
~~~~~~~~~~~~~~~~~
730

    
731
**repair-disk-sizes** [instance...]
732

    
733
This command checks that the recorded size of the given instance's
734
disks matches the actual size and updates any mismatches found.
735
This is needed if the Ganeti configuration is no longer consistent
736
with reality, as it will impact some disk operations. If no
737
arguments are given, all instances will be checked.
738

    
739
Note that only active disks can be checked by this command; in case
740
a disk cannot be activated it's advised to use
741
**gnt-instance activate-disks \--ignore-size ...** to force
742
activation without regard to the current size.
743

    
744
When the all disk sizes are consistent, the command will return no
745
output. Otherwise it will log details about the inconsistencies in
746
the configuration.
747

    
748
SEARCH-TAGS
749
~~~~~~~~~~~
750

    
751
**search-tags** {*pattern*}
752

    
753
Searches the tags on all objects in the cluster (the cluster
754
itself, the nodes and the instances) for a given pattern. The
755
pattern is interpreted as a regular expression and a search will be
756
done on it (i.e. the given pattern is not anchored to the beggining
757
of the string; if you want that, prefix the pattern with ^).
758

    
759
If no tags are matching the pattern, the exit code of the command
760
will be one. If there is at least one match, the exit code will be
761
zero. Each match is listed on one line, the object and the tag
762
separated by a space. The cluster will be listed as /cluster, a
763
node will be listed as /nodes/*name*, and an instance as
764
/instances/*name*. Example:
765

    
766
::
767

    
768
    # gnt-cluster search-tags time
769
    /cluster ctime:2007-09-01
770
    /nodes/node1.example.com mtime:2007-10-04
771

    
772
VERIFY
773
~~~~~~
774

    
775
| **verify** [\--no-nplus1-mem] [\--node-group *nodegroup*]
776
| [\--error-codes] [{-I|\--ignore-errors} *errorcode*]
777
| [{-I|\--ignore-errors} *errorcode*...]
778

    
779
Verify correctness of cluster configuration. This is safe with
780
respect to running instances, and incurs no downtime of the
781
instances.
782

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

    
787
With ``--node-group``, restrict the verification to those nodes and
788
instances that live in the named group. This will not verify global
789
settings, but will allow to perform verification of a group while other
790
operations are ongoing in other groups.
791

    
792
The ``--error-codes`` option outputs each error in the following
793
parseable format: *ftype*:*ecode*:*edomain*:*name*:*msg*.
794
These fields have the following meaning:
795

    
796
ftype
797
    Failure type. Can be *WARNING* or *ERROR*.
798

    
799
ecode
800
    Error code of the failure. See below for a list of error codes.
801

    
802
edomain
803
    Can be *cluster*, *node* or *instance*.
804

    
805
name
806
    Contains the name of the item that is affected from the failure.
807

    
808
msg
809
    Contains a descriptive error message about the error
810

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

    
814
The ``--ignore-errors`` option can be used to change this behaviour,
815
because it demotes the error represented by the error code received as a
816
parameter to a warning. The option must be repeated for each error that
817
should be ignored (e.g.: ``-I ENODEVERSION -I ENODEORPHANLV``). The
818
``--error-codes`` option can be used to determine the error code of a
819
given error.
820

    
821
List of error codes:
822

    
823
@CONSTANTS_ECODES@
824

    
825
VERIFY-DISKS
826
~~~~~~~~~~~~
827

    
828
**verify-disks**
829

    
830
The command checks which instances have degraded DRBD disks and
831
activates the disks of those instances.
832

    
833
This command is run from the **ganeti-watcher** tool, which also
834
has a different, complementary algorithm for doing this check.
835
Together, these two should ensure that DRBD disks are kept
836
consistent.
837

    
838
VERSION
839
~~~~~~~
840

    
841
**version**
842

    
843
Show the cluster version.
844

    
845
.. vim: set textwidth=72 :
846
.. Local Variables:
847
.. mode: rst
848
.. fill-column: 72
849
.. End: