Statistics
| Branch: | Tag: | Revision:

root / man / gnt-cluster.rst @ 5914192c

History | View | Annotate | Download (31.8 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
COMMAND
31
~~~~~~~
32

    
33
**command** [-n *node*] [-g *group*] [-M] {*command*}
34

    
35
Executes a command on all nodes. This command is designed for simple
36
usage. For more complex use cases the commands **dsh**\(1) or **cssh**\(1)
37
should be used instead.
38

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

    
43
    # gnt-cluster command -n node1.example.com -n node2.example.com date
44

    
45
The ``-g`` option can be used to run a command only on a specific node
46
group, e.g.::
47

    
48
    # gnt-cluster command -g default date
49

    
50
The ``-M`` option can be used to prepend the node name to all output
51
lines. The ``--failure-only`` option hides successful commands, making
52
it easier to see failures.
53

    
54
The command is executed serially on the selected nodes. If the
55
master node is present in the list, the command will be executed
56
last on the master. Regarding the other nodes, the execution order
57
is somewhat alphabetic, so that node2.example.com will be earlier
58
than node10.example.com but after node1.example.com.
59

    
60
So given the node names node1, node2, node3, node10, node11, with
61
node3 being the master, the order will be: node1, node2, node10,
62
node11, node3.
63

    
64
The command is constructed by concatenating all other command line
65
arguments. For example, to list the contents of the /etc directory
66
on all nodes, run::
67

    
68
    # gnt-cluster command ls -l /etc
69

    
70
and the command which will be executed will be ``ls -l /etc``.
71

    
72
COPYFILE
73
~~~~~~~~
74

    
75
| **copyfile** [\--use-replication-network] [-n *node*] [-g *group*]
76
| {*file*}
77

    
78
Copies a file to all or to some nodes. The argument specifies the
79
source file (on the current system), the ``-n`` argument specifies
80
the target node, or nodes if the option is given multiple times. If
81
``-n`` is not given at all, the file will be copied to all nodes. The
82
``-g`` option can be used to only select nodes in a specific node group.
83
Passing the ``--use-replication-network`` option will cause the
84
copy to be done over the replication network (only matters if the
85
primary/secondary IPs are different). Example::
86

    
87
    # gnt-cluster -n node1.example.com -n node2.example.com copyfile /tmp/test
88

    
89
This will copy the file /tmp/test from the current node to the two
90
named nodes.
91

    
92
DEACTIVATE-MASTER-IP
93
~~~~~~~~~~~~~~~~~~~~
94

    
95
**deactivate-master-ip** [\--yes]
96

    
97
Deactivates the master IP on the master node.
98

    
99
This should be run only locally or on a connection to the node ip
100
directly, as a connection to the master ip will be broken by this
101
operation. Because of this risk it will require user confirmation
102
unless the ``--yes`` option is passed.
103

    
104
DESTROY
105
~~~~~~~
106

    
107
**destroy** {\--yes-do-it}
108

    
109
Remove all configuration files related to the cluster, so that a
110
**gnt-cluster init** can be done again afterwards.
111

    
112
Since this is a dangerous command, you are required to pass the
113
argument *\--yes-do-it.*
114

    
115
EPO
116
~~~
117

    
118
**epo** [\--on] [\--groups|\--all] [\--power-delay] *arguments*
119

    
120
Performs an emergency power-off on nodes given as arguments. If
121
``--groups`` is given, arguments are node groups. If ``--all`` is
122
provided, the whole cluster will be shut down.
123

    
124
The ``--on`` flag recovers the cluster after an emergency power-off.
125
When powering on the cluster you can use ``--power-delay`` to define the
126
time in seconds (fractions allowed) waited between powering on
127
individual nodes.
128

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

    
136
GETMASTER
137
~~~~~~~~~
138

    
139
**getmaster**
140

    
141
Displays the current master node.
142

    
143
INFO
144
~~~~
145

    
146
**info** [\--roman]
147

    
148
Shows runtime cluster information: cluster name, architecture (32
149
or 64 bit), master node, node list and instance list.
150

    
151
Passing the ``--roman`` option gnt-cluster info will try to print
152
its integer fields in a latin friendly way. This allows further
153
diffusion of Ganeti among ancient cultures.
154

    
155
INIT
156
~~~~
157

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

    
192
This commands is only run once initially on the first node of the
193
cluster. It will initialize the cluster configuration, setup the
194
ssh-keys, start the daemons on the master node, etc. in order to have
195
a working one-node cluster.
196

    
197
Note that the *clustername* is not any random name. It has to be
198
resolvable to an IP address using DNS, and it is best if you give the
199
fully-qualified domain name. This hostname must resolve to an IP
200
address reserved exclusively for this purpose, i.e. not already in
201
use.
202

    
203
The cluster can run in two modes: single-home or dual-homed. In the
204
first case, all traffic (both public traffic, inter-node traffic and
205
data replication traffic) goes over the same interface. In the
206
dual-homed case, the data replication traffic goes over the second
207
network. The ``-s (--secondary-ip)`` option here marks the cluster as
208
dual-homed and its parameter represents this node's address on the
209
second network.  If you initialise the cluster with ``-s``, all nodes
210
added must have a secondary IP as well.
211

    
212
Note that for Ganeti it doesn't matter if the secondary network is
213
actually a separate physical network, or is done using tunneling,
214
etc. For performance reasons, it's recommended to use a separate
215
network, of course.
216

    
217
The ``--vg-name`` option will let you specify a volume group
218
different than "xenvg" for Ganeti to use when creating instance
219
disks. This volume group must have the same name on all nodes. Once
220
the cluster is initialized this can be altered by using the
221
**modify** command. If you don't want to use lvm storage at all use
222
the ``--no-lvm-storage`` option. Once the cluster is initialized
223
you can change this setup with the **modify** command.
224

    
225
The ``--master-netdev`` option is useful for specifying a different
226
interface on which the master will activate its IP address. It's
227
important that all nodes have this interface because you'll need it
228
for a master failover.
229

    
230
The ``--master-netmask`` option allows to specify a netmask for the
231
master IP. The netmask must be specified as an integer, and will be
232
interpreted as a CIDR netmask. The default value is 32 for an IPv4
233
address and 128 for an IPv6 address.
234

    
235
The ``--use-external-mip-script`` option allows to specify whether to
236
use an user-supplied master IP address setup script, whose location is
237
``@SYSCONFDIR@/ganeti/scripts/master-ip-setup``. If the option value is
238
set to False, the default script (located at
239
``@PKGLIBDIR@/tools/master-ip-setup``) will be executed.
240

    
241
The ``-m (--mac-prefix)`` option will let you specify a three byte
242
prefix under which the virtual MAC addresses of your instances will be
243
generated. The prefix must be specified in the format ``XX:XX:XX`` and
244
the default is ``aa:00:00``.
245

    
246
The ``--no-lvm-storage`` option allows you to initialize the
247
cluster without lvm support. This means that only instances using
248
files as storage backend will be possible to create. Once the
249
cluster is initialized you can change this setup with the
250
**modify** command.
251

    
252
The ``--no-etc-hosts`` option allows you to initialize the cluster
253
without modifying the /etc/hosts file.
254

    
255
The ``--no-ssh-init`` option allows you to initialize the cluster
256
without creating or distributing SSH key pairs.
257

    
258
The ``--file-storage-dir`` option allows you set the directory to
259
use for storing the instance disk files when using file storage as
260
backend for instance disks.
261

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

    
267
The ``--enabled-hypervisors`` option allows you to set the list of
268
hypervisors that will be enabled for this cluster. Instance
269
hypervisors can only be chosen from the list of enabled
270
hypervisors, and the first entry of this list will be used by
271
default. Currently, the following hypervisors are available:
272

    
273
xen-pvm
274
    Xen PVM hypervisor
275

    
276
xen-hvm
277
    Xen HVM hypervisor
278

    
279
kvm
280
    Linux KVM hypervisor
281

    
282
chroot
283
    a simple chroot manager that starts chroot based on a script at the
284
    root of the filesystem holding the chroot
285

    
286
fake
287
    fake hypervisor for development/testing
288

    
289
Either a single hypervisor name or a comma-separated list of
290
hypervisor names can be specified. If this option is not specified,
291
only the xen-pvm hypervisor is enabled by default.
292

    
293
The ``-H (--hypervisor-parameters)`` option allows you to set default
294
hypervisor specific parameters for the cluster. The format of this
295
option is the name of the hypervisor, followed by a colon and a
296
comma-separated list of key=value pairs. The keys available for each
297
hypervisors are detailed in the **gnt-instance**\(8) man page, in the
298
**add** command plus the following parameters which are only
299
configurable globally (at cluster level):
300

    
301
migration\_port
302
    Valid for the Xen PVM and KVM hypervisors.
303

    
304
    This options specifies the TCP port to use for live-migration. For
305
    Xen, the same port should be configured on all nodes in the
306
    ``@XEN_CONFIG_DIR@/xend-config.sxp`` file, under the key
307
    "xend-relocation-port".
308

    
309
migration\_bandwidth
310
    Valid for the KVM hypervisor.
311

    
312
    This option specifies the maximum bandwidth that KVM will use for
313
    instance live migrations. The value is in MiB/s.
314

    
315
    This option is only effective with kvm versions >= 78 and qemu-kvm
316
    versions >= 0.10.0.
317

    
318
The ``-B (--backend-parameters)`` option allows you to set the default
319
backend parameters for the cluster. The parameter format is a
320
comma-separated list of key=value pairs with the following supported
321
keys:
322

    
323
vcpus
324
    Number of VCPUs to set for an instance by default, must be an
325
    integer, will be set to 1 if no specified.
326

    
327
maxmem
328
    Maximum amount of memory to allocate for an instance by default, can
329
    be either an integer or an integer followed by a unit (M for
330
    mebibytes and G for gibibytes are supported), will be set to 128M if
331
    not specified.
332

    
333
minmem
334
    Minimum amount of memory to allocate for an instance by default, can
335
    be either an integer or an integer followed by a unit (M for
336
    mebibytes and G for gibibytes are supported), will be set to 128M if
337
    not specified.
338

    
339
auto\_balance
340
    Value of the auto\_balance flag for instances to use by default,
341
    will be set to true if not specified.
342

    
343
always\_failover
344
    Default value for the ``always_failover`` flag for instances; if
345
    not set, ``False`` is used.
346

    
347

    
348
The ``-N (--nic-parameters)`` option allows you to set the default
349
network interface parameters for the cluster. The parameter format is a
350
comma-separated list of key=value pairs with the following supported
351
keys:
352

    
353
mode
354
    The default NIC mode, one of ``routed``, ``bridged`` or
355
    ``openvswitch``.
356

    
357
link
358
    In ``bridged`` or ``openvswitch`` mode the default interface where
359
    to attach NICs. In ``routed`` mode it represents an
360
    hypervisor-vif-script dependent value to allow different instance
361
    groups. For example under the KVM default network script it is
362
    interpreted as a routing table number or name. Openvswitch support
363
    is also hypervisor dependent and currently works for the default KVM
364
    network script. Under Xen a custom network script must be provided.
365

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

    
375
The following is the list of disk parameters available for the **drbd**
376
template, with measurement units specified in square brackets at the end
377
of the description (when applicable):
378

    
379
resync-rate
380
    Static re-synchronization rate. [KiB/s]
381

    
382
data-stripes
383
    Number of stripes to use for data LVs.
384

    
385
meta-stripes
386
    Number of stripes to use for meta LVs.
387

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

    
394
meta-barriers
395
    Boolean value indicating whether the meta barriers should be
396
    disabled (True) or not (False).
397

    
398
metavg
399
    String containing the name of the default LVM volume group for DRBD
400
    metadata. By default, it is set to ``xenvg``. It can be overridden
401
    during the instance creation process by using the ``metavg`` key of
402
    the ``--disk`` parameter.
403

    
404
disk-custom
405
    String containing additional parameters to be appended to the
406
    arguments list of ``drbdsetup disk``.
407

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

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

    
418
c-plan-ahead
419
    Agility factor of the dynamic resync speed controller. (the higher,
420
    the slower the algorithm will adapt the resync speed). A value of 0
421
    (that is the default) disables the controller. [ds]
422

    
423
c-fill-target
424
    Maximum amount of in-flight resync data for the dynamic resync speed
425
    controller. [sectors]
426

    
427
c-delay-target
428
    Maximum estimated peer response latency for the dynamic resync speed
429
    controller. [ds]
430

    
431
c-min-rate
432
    Minimum resync speed for the dynamic resync speed controller. [KiB/s]
433

    
434
c-max-rate
435
    Upper bound on resync speed for the dynamic resync speed controller.
436
    [KiB/s]
437

    
438
List of parameters available for the **plain** template:
439

    
440
stripes
441
    Number of stripes to use for new LVs.
442

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

    
445
pool
446
    The RADOS cluster pool, inside which all rbd volumes will reside.
447
    When a new RADOS cluster is deployed, the default pool to put rbd
448
    volumes (Images in RADOS terminology) is 'rbd'.
449

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

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

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

    
478
The ``--primary-ip-version`` option specifies the IP version used
479
for the primary address. Possible values are 4 and 6 for IPv4 and
480
IPv6, respectively. This option is used when resolving node names
481
and the cluster name.
482

    
483
The ``--node-parameters`` option allows you to set default node
484
parameters for the cluster. Please see **ganeti**\(7) for more
485
information about supported key=value pairs.
486

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

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

    
501
- ``--specs-cpu-count`` limits the number of VCPUs that can be used by an
502
  instance.
503
- ``--specs-disk-count`` limits the number of disks
504
- ``--specs-disk-size`` limits the disk size for every disk used
505
- ``--specs-mem-size`` limits the amount of memory available
506
- ``--specs-nic-count`` sets limits on the number of NICs used
507
- ``--ipolicy-disk-templates`` limits the allowed disk templates
508

    
509
For details about how to use ``--hypervisor-state`` and ``--disk-state``
510
have a look at **ganeti**\(7).
511

    
512
The ``--enabled-disk-templates`` option specifies a list of disk templates
513
that can be used by instances of the cluster. For the possible values in
514
this list, see **gnt-instance**\(8). Note that in contrast to the list of
515
disk templates in the ipolicy, this list is a hard restriction. It is not
516
possible to create instances with disk templates that are not enabled in
517
the cluster. It is also not possible to disable a disk template when there
518
are still instances using it.
519

    
520
MASTER-FAILOVER
521
~~~~~~~~~~~~~~~
522

    
523
**master-failover** [\--no-voting] [\--yes-do-it]
524

    
525
Failover the master role to the current node.
526

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

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

    
542
MASTER-PING
543
~~~~~~~~~~~
544

    
545
**master-ping**
546

    
547
Checks if the master daemon is alive.
548

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

    
555
MODIFY
556
~~~~~~
557

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

    
588

    
589
Modify the options for the cluster.
590

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

    
600
The ``--hypervisor-state`` and ``--disk-state`` options are described in
601
detail in **ganeti**\(7).
602

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

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

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

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

    
623
The ``--specs-...`` and ``--ipolicy-disk-templates`` options are
624
described in the **init** command.
625

    
626
See **ganeti**\(7) for a description of ``--submit`` and other common
627
options.
628

    
629
QUEUE
630
~~~~~
631

    
632
**queue** {drain | undrain | info}
633

    
634
Change job queue properties.
635

    
636
The ``drain`` option sets the drain flag on the job queue. No new
637
jobs will be accepted, but jobs already in the queue will be
638
processed.
639

    
640
The ``undrain`` will unset the drain flag on the job queue. New
641
jobs will be accepted.
642

    
643
The ``info`` option shows the properties of the job queue.
644

    
645
WATCHER
646
~~~~~~~
647

    
648
**watcher** {pause *duration* | continue | info}
649

    
650
Make the watcher pause or let it continue.
651

    
652
The ``pause`` option causes the watcher to pause for *duration*
653
seconds.
654

    
655
The ``continue`` option will let the watcher continue.
656

    
657
The ``info`` option shows whether the watcher is currently paused.
658

    
659
REDIST-CONF
660
~~~~~~~~~~~
661

    
662
**redist-conf** [\--submit]
663

    
664
This command forces a full push of configuration files from the
665
master node to the other nodes in the cluster. This is normally not
666
needed, but can be run if the **verify** complains about
667
configuration mismatches.
668

    
669
See **ganeti**\(7) for a description of ``--submit`` and other common
670
options.
671

    
672
RENAME
673
~~~~~~
674

    
675
**rename** [-f] {*name*}
676

    
677
Renames the cluster and in the process updates the master IP
678
address to the one the new name resolves to. At least one of either
679
the name or the IP address must be different, otherwise the
680
operation will be aborted.
681

    
682
Note that since this command can be dangerous (especially when run
683
over SSH), the command will require confirmation unless run with
684
the ``-f`` option.
685

    
686
RENEW-CRYPTO
687
~~~~~~~~~~~~
688

    
689
| **renew-crypto** [-f]
690
| [\--new-cluster-certificate] [\--new-confd-hmac-key]
691
| [\--new-rapi-certificate] [\--rapi-certificate *rapi-cert*]
692
| [\--new-spice-certificate | \--spice-certificate *spice-cert*
693
| \--spice-ca-certificate *spice-ca-cert*]
694
| [\--new-cluster-domain-secret] [\--cluster-domain-secret *filename*]
695

    
696
This command will stop all Ganeti daemons in the cluster and start
697
them again once the new certificates and keys are replicated. The
698
options ``--new-cluster-certificate`` and ``--new-confd-hmac-key``
699
can be used to regenerate the cluster-internal SSL certificate
700
respective the HMAC key used by **ganeti-confd**\(8).
701

    
702
To generate a new self-signed RAPI certificate (used by
703
**ganeti-rapi**\(8)) specify ``--new-rapi-certificate``. If you want to
704
use your own certificate, e.g. one signed by a certificate
705
authority (CA), pass its filename to ``--rapi-certificate``.
706

    
707
To generate a new self-signed SPICE certificate, used by SPICE
708
connections to the KVM hypervisor, specify the
709
``--new-spice-certificate`` option. If you want to provide a
710
certificate, pass its filename to ``--spice-certificate`` and pass the
711
signing CA certificate to ``--spice-ca-certificate``.
712

    
713
``--new-cluster-domain-secret`` generates a new, random cluster
714
domain secret. ``--cluster-domain-secret`` reads the secret from a
715
file. The cluster domain secret is used to sign information
716
exchanged between separate clusters via a third party.
717

    
718
REPAIR-DISK-SIZES
719
~~~~~~~~~~~~~~~~~
720

    
721
**repair-disk-sizes** [instance...]
722

    
723
This command checks that the recorded size of the given instance's
724
disks matches the actual size and updates any mismatches found.
725
This is needed if the Ganeti configuration is no longer consistent
726
with reality, as it will impact some disk operations. If no
727
arguments are given, all instances will be checked.
728

    
729
Note that only active disks can be checked by this command; in case
730
a disk cannot be activated it's advised to use
731
**gnt-instance activate-disks \--ignore-size ...** to force
732
activation without regard to the current size.
733

    
734
When the all disk sizes are consistent, the command will return no
735
output. Otherwise it will log details about the inconsistencies in
736
the configuration.
737

    
738
VERIFY
739
~~~~~~
740

    
741
| **verify** [\--no-nplus1-mem] [\--node-group *nodegroup*]
742
| [\--error-codes] [{-I|\--ignore-errors} *errorcode*]
743
| [{-I|\--ignore-errors} *errorcode*...]
744

    
745
Verify correctness of cluster configuration. This is safe with
746
respect to running instances, and incurs no downtime of the
747
instances.
748

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

    
753
With ``--node-group``, restrict the verification to those nodes and
754
instances that live in the named group. This will not verify global
755
settings, but will allow to perform verification of a group while other
756
operations are ongoing in other groups.
757

    
758
The ``--error-codes`` option outputs each error in the following
759
parseable format: *ftype*:*ecode*:*edomain*:*name*:*msg*.
760
These fields have the following meaning:
761

    
762
ftype
763
    Failure type. Can be *WARNING* or *ERROR*.
764

    
765
ecode
766
    Error code of the failure. See below for a list of error codes.
767

    
768
edomain
769
    Can be *cluster*, *node* or *instance*.
770

    
771
name
772
    Contains the name of the item that is affected from the failure.
773

    
774
msg
775
    Contains a descriptive error message about the error
776

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

    
780
The ``--ignore-errors`` option can be used to change this behaviour,
781
because it demotes the error represented by the error code received as a
782
parameter to a warning. The option must be repeated for each error that
783
should be ignored (e.g.: ``-I ENODEVERSION -I ENODEORPHANLV``). The
784
``--error-codes`` option can be used to determine the error code of a
785
given error.
786

    
787
List of error codes:
788

    
789
@CONSTANTS_ECODES@
790

    
791
VERIFY-DISKS
792
~~~~~~~~~~~~
793

    
794
**verify-disks**
795

    
796
The command checks which instances have degraded DRBD disks and
797
activates the disks of those instances.
798

    
799
This command is run from the **ganeti-watcher** tool, which also
800
has a different, complementary algorithm for doing this check.
801
Together, these two should ensure that DRBD disks are kept
802
consistent.
803

    
804
VERSION
805
~~~~~~~
806

    
807
**version**
808

    
809
Show the cluster version.
810

    
811
Tags
812
~~~~
813

    
814
ADD-TAGS
815
^^^^^^^^
816

    
817
**add-tags** [\--from *file*] {*tag*...}
818

    
819
Add tags to the cluster. If any of the tags contains invalid
820
characters, the entire operation will abort.
821

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

    
828
LIST-TAGS
829
^^^^^^^^^
830

    
831
**list-tags**
832

    
833
List the tags of the cluster.
834

    
835
REMOVE-TAGS
836
^^^^^^^^^^^
837

    
838
**remove-tags** [\--from *file*] {*tag*...}
839

    
840
Remove tags from the cluster. If any of the tags are not existing
841
on the cluster, the entire operation will abort.
842

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

    
849
SEARCH-TAGS
850
^^^^^^^^^^^
851

    
852
**search-tags** {*pattern*}
853

    
854
Searches the tags on all objects in the cluster (the cluster
855
itself, the nodes and the instances) for a given pattern. The
856
pattern is interpreted as a regular expression and a search will be
857
done on it (i.e. the given pattern is not anchored to the beggining
858
of the string; if you want that, prefix the pattern with ^).
859

    
860
If no tags are matching the pattern, the exit code of the command
861
will be one. If there is at least one match, the exit code will be
862
zero. Each match is listed on one line, the object and the tag
863
separated by a space. The cluster will be listed as /cluster, a
864
node will be listed as /nodes/*name*, and an instance as
865
/instances/*name*. Example:
866

    
867
::
868

    
869
    # gnt-cluster search-tags time
870
    /cluster ctime:2007-09-01
871
    /nodes/node1.example.com mtime:2007-10-04
872

    
873
.. vim: set textwidth=72 :
874
.. Local Variables:
875
.. mode: rst
876
.. fill-column: 72
877
.. End: