1 gnt-cluster(8) Ganeti | Version @GANETI_VERSION@
2 ================================================
7 gnt-cluster - Ganeti administration, cluster-wide
12 **gnt-cluster** {command} [arguments...]
17 The **gnt-cluster** is used for cluster-wide administration in the
26 **activate-master-ip**
28 Activates the master IP on the master node.
33 **add-tags** [--from *file*] {*tag*...}
35 Add tags to the cluster. If any of the tags contains invalid
36 characters, the entire operation will abort.
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
47 **command** [-n *node*] [-g *group*] {*command*}
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::
54 # gnt-cluster command -n node1.example.com -n node2.example.com date
56 The ``-g`` option can be used to run a command only on a specific node
59 # gnt-cluster command -g default date
61 The command is executed serially on the selected nodes. If the
62 master node is present in the list, the command will be executed
63 last on the master. Regarding the other nodes, the execution order
64 is somewhat alphabetic, so that node2.example.com will be earlier
65 than node10.example.com but after node1.example.com.
67 So given the node names node1, node2, node3, node10, node11, with
68 node3 being the master, the order will be: node1, node2, node10,
71 The command is constructed by concatenating all other command line
72 arguments. For example, to list the contents of the /etc directory
75 # gnt-cluster command ls -l /etc
77 and the command which will be executed will be ``ls -l /etc``.
82 | **copyfile** [--use-replication-network] [-n *node*] [-g *group*]
85 Copies a file to all or to some nodes. The argument specifies the
86 source file (on the current system), the ``-n`` argument specifies
87 the target node, or nodes if the option is given multiple times. If
88 ``-n`` is not given at all, the file will be copied to all nodes. The
89 ``-g`` option can be used to only select nodes in a specific node group.
90 Passing the ``--use-replication-network`` option will cause the
91 copy to be done over the replication network (only matters if the
92 primary/secondary IPs are different). Example::
94 # gnt-cluster -n node1.example.com -n node2.example.com copyfile /tmp/test
96 This will copy the file /tmp/test from the current node to the two
102 **deactivate-master-ip** [--yes]
104 Deactivates the master IP on the master node.
106 This should be run only locally or on a connection to the node ip
107 directly, as a connection to the master ip will be broken by this
108 operation. Because of this risk it will require user confirmation
109 unless the ``--yes`` option is passed.
114 **destroy** {--yes-do-it}
116 Remove all configuration files related to the cluster, so that a
117 **gnt-cluster init** can be done again afterwards.
119 Since this is a dangerous command, you are required to pass the
120 argument *--yes-do-it.*
125 **epo** [--on] [--groups|--all] [--power-delay] *arguments*
127 Performs an emergency power-off on nodes given as arguments. If
128 ``--groups`` is given, arguments are node groups. If ``--all`` is
129 provided, the whole cluster will be shut down.
131 The ``--on`` flag recovers the cluster after an emergency power-off.
132 When powering on the cluster you can use ``--power-delay`` to define the
133 time in seconds (fractions allowed) waited between powering on
136 Please note that the master node will not be turned down or up
137 automatically. It will just be left in a state, where you can manully
138 perform the shutdown of that one node. If the master is in the list of
139 affected nodes and this is not a complete cluster emergency power-off
140 (e.g. using ``--all``), you're required to do a master failover to
141 another node not affected.
148 Displays the current master node.
155 Shows runtime cluster information: cluster name, architecture (32
156 or 64 bit), master node, node list and instance list.
158 Passing the ``--roman`` option gnt-cluster info will try to print
159 its integer fields in a latin friendly way. This allows further
160 diffusion of Ganeti among ancient cultures.
166 | [{-s|--secondary-ip} *secondary\_ip*]
167 | [--vg-name *vg-name*]
168 | [--master-netdev *interface-name*]
169 | [--master-netmask *netmask*]
170 | [--use-external-mip-script {yes \| no}]
171 | [{-m|--mac-prefix} *mac-prefix*]
175 | [--file-storage-dir *dir*]
176 | [--enabled-hypervisors *hypervisors*]
177 | [{-H|--hypervisor-parameters} *hypervisor*:*hv-param*=*value*[,*hv-param*=*value*...]]
178 | [{-B|--backend-parameters} *be-param*=*value*[,*be-param*=*value*...]]
179 | [{-N|--nic-parameters} *nic-param*=*value*[,*nic-param*=*value*...]]
180 | [{-D|--disk-parameters} *disk-template*:*disk-param*=*value*[,*disk-param*=*value*...]]
181 | [--maintain-node-health {yes \| no}]
182 | [--uid-pool *user-id pool definition*]
183 | [{-I|--default-iallocator} *default instance allocator*]
184 | [--primary-ip-version *version*]
185 | [--prealloc-wipe-disks {yes \| no}]
186 | [--node-parameters *ndparams*]
187 | [{-C|--candidate-pool-size} *candidate\_pool\_size*]
188 | [--specs-cpu-count *spec-param*=*value* [,*spec-param*=*value*...]]
189 | [--specs-disk-count *spec-param*=*value* [,*spec-param*=*value*...]]
190 | [--specs-disk-size *spec-param*=*value* [,*spec-param*=*value*...]]
191 | [--specs-mem-size *spec-param*=*value* [,*spec-param*=*value*...]]
192 | [--specs-nic-count *spec-param*=*value* [,*spec-param*=*value*...]]
193 | [--specs-disk-templates *template* [,*template*...]]
194 | [--disk-state *diskstate*]
195 | [--hypervisor-state *hvstate*]
198 This commands is only run once initially on the first node of the
199 cluster. It will initialize the cluster configuration, setup the
200 ssh-keys, start the daemons on the master node, etc. in order to have
201 a working one-node cluster.
203 Note that the *clustername* is not any random name. It has to be
204 resolvable to an IP address using DNS, and it is best if you give the
205 fully-qualified domain name. This hostname must resolve to an IP
206 address reserved exclusively for this purpose, i.e. not already in
209 The cluster can run in two modes: single-home or dual-homed. In the
210 first case, all traffic (both public traffic, inter-node traffic and
211 data replication traffic) goes over the same interface. In the
212 dual-homed case, the data replication traffic goes over the second
213 network. The ``-s (--secondary-ip)`` option here marks the cluster as
214 dual-homed and its parameter represents this node's address on the
215 second network. If you initialise the cluster with ``-s``, all nodes
216 added must have a secondary IP as well.
218 Note that for Ganeti it doesn't matter if the secondary network is
219 actually a separate physical network, or is done using tunneling,
220 etc. For performance reasons, it's recommended to use a separate
223 The ``--vg-name`` option will let you specify a volume group
224 different than "xenvg" for Ganeti to use when creating instance
225 disks. This volume group must have the same name on all nodes. Once
226 the cluster is initialized this can be altered by using the
227 **modify** command. If you don't want to use lvm storage at all use
228 the ``--no-lvm-storage`` option. Once the cluster is initialized
229 you can change this setup with the **modify** command.
231 The ``--master-netdev`` option is useful for specifying a different
232 interface on which the master will activate its IP address. It's
233 important that all nodes have this interface because you'll need it
234 for a master failover.
236 The ``--master-netmask`` option allows to specify a netmask for the
237 master IP. The netmask must be specified as an integer, and will be
238 interpreted as a CIDR netmask. The default value is 32 for an IPv4
239 address and 128 for an IPv6 address.
241 The ``--use-external-mip-script`` options allows to specify
242 whether to use an user-supplied master IP address setup script, whose
243 location is ``/etc/ganeti/scripts/master-ip-setup``. If the option value
244 is set to False, the default script, whose location is
245 ``/usr/local/lib/ganeti/tools/master-ip-setup``, will be executed.
247 The ``-m (--mac-prefix)`` option will let you specify a three byte
248 prefix under which the virtual MAC addresses of your instances will be
249 generated. The prefix must be specified in the format ``XX:XX:XX`` and
250 the default is ``aa:00:00``.
252 The ``--no-lvm-storage`` option allows you to initialize the
253 cluster without lvm support. This means that only instances using
254 files as storage backend will be possible to create. Once the
255 cluster is initialized you can change this setup with the
258 The ``--no-etc-hosts`` option allows you to initialize the cluster
259 without modifying the /etc/hosts file.
261 The ``--no-ssh-init`` option allows you to initialize the cluster
262 without creating or distributing SSH key pairs.
264 The ``--file-storage-dir`` option allows you set the directory to
265 use for storing the instance disk files when using file storage as
266 backend for instance disks.
268 The ``--prealloc-wipe-disks`` sets a cluster wide configuration
269 value for wiping disks prior to allocation. This increases security
270 on instance level as the instance can't access untouched data from
271 it's underlying storage.
273 The ``--enabled-hypervisors`` option allows you to set the list of
274 hypervisors that will be enabled for this cluster. Instance
275 hypervisors can only be chosen from the list of enabled
276 hypervisors, and the first entry of this list will be used by
277 default. Currently, the following hypervisors are available:
289 a simple chroot manager that starts chroot based on a script at the
290 root of the filesystem holding the chroot
293 fake hypervisor for development/testing
295 Either a single hypervisor name or a comma-separated list of
296 hypervisor names can be specified. If this option is not specified,
297 only the xen-pvm hypervisor is enabled by default.
299 The ``-H (--hypervisor-parameters)`` option allows you to set default
300 hypervisor specific parameters for the cluster. The format of this
301 option is the name of the hypervisor, followed by a colon and a
302 comma-separated list of key=value pairs. The keys available for each
303 hypervisors are detailed in the gnt-instance(8) man page, in the
304 **add** command plus the following parameters which are only
305 configurable globally (at cluster level):
308 Valid for the Xen PVM and KVM hypervisors.
310 This options specifies the TCP port to use for live-migration. For
311 Xen, the same port should be configured on all nodes in the
312 ``/etc/xen/xend-config.sxp`` file, under the key
313 "xend-relocation-port".
316 Valid for the KVM hypervisor.
318 This option specifies the maximum bandwidth that KVM will use for
319 instance live migrations. The value is in MiB/s.
321 This option is only effective with kvm versions >= 78 and qemu-kvm
324 The ``-B (--backend-parameters)`` option allows you to set the default
325 backend parameters for the cluster. The parameter format is a
326 comma-separated list of key=value pairs with the following supported
330 Number of VCPUs to set for an instance by default, must be an
331 integer, will be set to 1 if no specified.
334 Maximum 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
340 Minimum amount of memory to allocate for an instance by default, can
341 be either an integer or an integer followed by a unit (M for
342 mebibytes and G for gibibytes are supported), will be set to 128M if
346 Value of the auto\_balance flag for instances to use by default,
347 will be set to true if not specified.
350 Default value for the ``always\_failover`` flag for instances; if
351 not set, ``False`` is used.
354 The ``-N (--nic-parameters)`` option allows you to set the default nic
355 parameters for the cluster. The parameter format is a comma-separated
356 list of key=value pairs with the following supported keys:
359 The default nic mode, 'routed' or 'bridged'.
362 In bridged mode the default NIC bridge. In routed mode it
363 represents an hypervisor-vif-script dependent value to allow
364 different instance groups. For example under the KVM default
365 network script it is interpreted as a routing table number or
368 The ``-D (--disk-parameters)`` option allows you to set the default disk
369 template parameters at cluster level. The format used for this option is
370 similar to the one use by the ``-H`` option: the disk template name
371 must be specified first, followed by a colon and by a comma-separated
372 list of key-value pairs. These parameters can only be specified at
373 cluster and node group level; the cluster-level parameter are inherited
374 by the node group at the moment of its creation, and can be further
375 modified at node group level using the **gnt-group**(8) command.
377 The following is the list of disk parameters available for the **drbd**
378 template, with measurement units specified in square brackets at the end
379 of the description (when applicable):
382 Static re-synchronization rate. [KiB/s]
385 Number of stripes to use for data LVs.
388 Number of stripes to use for meta LVs.
391 What kind of barriers to **disable** for disks. It can either assume
392 the value "n", meaning no barrier disabled, or a non-empty string
393 containing a subset of the characters "bfd". "b" means disable disk
394 barriers, "f" means disable disk flushes, "d" disables disk drains.
397 Boolean value indicating whether the meta barriers should be
398 disabled (True) or not (False).
401 String containing the name of the default LVM volume group for DRBD
402 metadata. By default, it is set to ``xenvg``. It can be overridden
403 during the instance creation process by using the ``metavg`` key of
404 the ``--disk`` parameter.
407 String containing additional parameters to be appended to the
408 arguments list of ``drbdsetup disk``.
411 String containing additional parameters to be appended to the
412 arguments list of ``drbdsetup net``.
415 Boolean indicating whether to use the dynamic resync speed
416 controller or not. If enabled, c-plan-ahead must be non-zero and all
417 the c-* parameters will be used by DRBD. Otherwise, the value of
418 resync-rate will be used as a static resync speed.
421 Agility factor of the dynamic resync speed controller. (the higher,
422 the slower the algorithm will adapt the resync speed). A value of 0
423 (that is the default) disables the controller. [ds]
426 Maximum amount of in-flight resync data for the dynamic resync speed
427 controller. [sectors]
430 Maximum estimated peer response latency for the dynamic resync speed
434 Minimum resync speed for the dynamic resync speed controller. [KiB/s]
437 Upper bound on resync speed for the dynamic resync speed controller.
440 List of parameters available for the **plain** template:
443 Number of stripes to use for new LVs.
445 The option ``--maintain-node-health`` allows one to enable/disable
446 automatic maintenance actions on nodes. Currently these include
447 automatic shutdown of instances and deactivation of DRBD devices on
448 offline nodes; in the future it might be extended to automatic
449 removal of unknown LVM volumes, etc. Note that this option is only
450 useful if the use of ``ganeti-confd`` was enabled at compilation.
452 The ``--uid-pool`` option initializes the user-id pool. The
453 *user-id pool definition* can contain a list of user-ids and/or a
454 list of user-id ranges. The parameter format is a comma-separated
455 list of numeric user-ids or user-id ranges. The ranges are defined
456 by a lower and higher boundary, separated by a dash. The boundaries
457 are inclusive. If the ``--uid-pool`` option is not supplied, the
458 user-id pool is initialized to an empty list. An empty list means
459 that the user-id pool feature is disabled.
461 The ``-I (--default-iallocator)`` option specifies the default
462 instance allocator. The instance allocator will be used for operations
463 like instance creation, instance and node migration, etc. when no
464 manual override is specified. If this option is not specified and
465 htools was not enabled at build time, the default instance allocator
466 will be blank, which means that relevant operations will require the
467 administrator to manually specify either an instance allocator, or a
468 set of nodes. If the option is not specified but htools was enabled,
469 the default iallocator will be **hail**(1) (assuming it can be found
470 on disk). The default iallocator can be changed later using the
473 The ``--primary-ip-version`` option specifies the IP version used
474 for the primary address. Possible values are 4 and 6 for IPv4 and
475 IPv6, respectively. This option is used when resolving node names
476 and the cluster name.
478 The ``--node-parameters`` option allows you to set default node
479 parameters for the cluster. Please see **ganeti**(7) for more
480 information about supported key=value pairs.
482 The ``-C (--candidate-pool-size)`` option specifies the
483 ``candidate_pool_size`` cluster parameter. This is the number of nodes
484 that the master will try to keep as master\_candidates. For more
485 details about this role and other node roles, see the ganeti(7).
487 The ``--specs-...`` options specify instance policy on the
488 cluster. Except for the ``disk-templates`` option, each option can have
489 three values: ``min``, ``max`` and ``std``, which can also be modified
490 on group level (except for ``std``, which is defined once for the entire
491 cluster). Please note, that ``std`` values are not the same as defaults
492 set by ``--beparams``, but they are used for the capacity calculations.
494 - ``--specs-cpu-count`` limits the number of VCPUs that can be used by an
496 - ``--specs-disk-count`` limits the number of disks
497 - ``--specs-disk-size`` limits the disk size for every disk used
498 - ``--specs-mem-size`` limits the amount of memory available
499 - ``--specs-nic-count`` sets limits on the number of NICs used
500 - ``--specs-disk-templates`` limits the allowed disk templates (no
501 mix/std/max for this option)
503 For details about how to use ``--hypervisor-state`` and ``--disk-state``
504 have a look at **ganeti**(7).
511 List the tags of the cluster.
516 **master-failover** [--no-voting]
518 Failover the master role to the current node.
520 The ``--no-voting`` option skips the remote node agreement checks.
521 This is dangerous, but necessary in some cases (for example failing
522 over the master role in a 2 node cluster with the original master
523 down). If the original master then comes up, it won't be able to
524 start its master daemon because it won't have enough votes, but so
525 won't the new master, if the master daemon ever needs a restart.
526 You can pass ``--no-voting`` to **ganeti-masterd** on the new
527 master to solve this problem, and run **gnt-cluster redist-conf**
528 to make sure the cluster is consistent again.
535 Checks if the master daemon is alive.
537 If the master daemon is alive and can respond to a basic query (the
538 equivalent of **gnt-cluster info**), then the exit code of the
539 command will be 0. If the master daemon is not alive (either due to
540 a crash or because this is not the master node), the exit code will
547 | [--vg-name *vg-name*]
549 | [--enabled-hypervisors *hypervisors*]
550 | [{-H|--hypervisor-parameters} *hypervisor*:*hv-param*=*value*[,*hv-param*=*value*...]]
551 | [{-B|--backend-parameters} *be-param*=*value*[,*be-param*=*value*...]]
552 | [{-N|--nic-parameters} *nic-param*=*value*[,*nic-param*=*value*...]]
553 | [{-D|--disk-parameters} *disk-template*:*disk-param*=*value*[,*disk-param*=*value*...]]
554 | [--uid-pool *user-id pool definition*]
555 | [--add-uids *user-id pool definition*]
556 | [--remove-uids *user-id pool definition*]
557 | [{-C|--candidate-pool-size} *candidate\_pool\_size*]
558 | [--maintain-node-health {yes \| no}]
559 | [--prealloc-wipe-disks {yes \| no}]
560 | [{-I|--default-iallocator} *default instance allocator*]
561 | [--reserved-lvs=*NAMES*]
562 | [--node-parameters *ndparams*]
563 | [--master-netdev *interface-name*]
564 | [--master-netmask *netmask*]
565 | [--use-external-mip-script {yes \| no}]
566 | [--hypervisor-state *hvstate*]
567 | [--disk-state *diskstate*]
568 | [--specs-cpu-count *spec-param*=*value* [,*spec-param*=*value*...]]
569 | [--specs-disk-count *spec-param*=*value* [,*spec-param*=*value*...]]
570 | [--specs-disk-size *spec-param*=*value* [,*spec-param*=*value*...]]
571 | [--specs-mem-size *spec-param*=*value* [,*spec-param*=*value*...]]
572 | [--specs-nic-count *spec-param*=*value* [,*spec-param*=*value*...]]
573 | [--specs-disk-templates *template* [,*template*...]]
576 Modify the options for the cluster.
578 The ``--vg-name``, ``--no-lvm-storarge``, ``--enabled-hypervisors``,
579 ``-H (--hypervisor-parameters)``, ``-B (--backend-parameters)``,
580 ``-D (--disk-parameters)``, ``--nic-parameters``, ``-C
581 (--candidate-pool-size)``, ``--maintain-node-health``,
582 ``--prealloc-wipe-disks``, ``--uid-pool``, ``--node-parameters``,
583 ``--master-netdev``, ``--master-netmask`` and
584 ``--use-external-mip-script`` options are described in the **init**
587 The ``--hypervisor-state`` and ``--disk-state`` options are described in
588 detail in **ganeti**(7).
590 The ``--add-uids`` and ``--remove-uids`` options can be used to
591 modify the user-id pool by adding/removing a list of user-ids or
594 The option ``--reserved-lvs`` specifies a list (comma-separated) of
595 logical volume group names (regular expressions) that will be
596 ignored by the cluster verify operation. This is useful if the
597 volume group used for Ganeti is shared with the system for other
598 uses. Note that it's not recommended to create and mark as ignored
599 logical volume names which match Ganeti's own name format (starting
600 with UUID and then .diskN), as this option only skips the
601 verification, but not the actual use of the names given.
603 To remove all reserved logical volumes, pass in an empty argument
604 to the option, as in ``--reserved-lvs=`` or ``--reserved-lvs ''``.
606 The ``-I (--default-iallocator)`` is described in the **init**
607 command. To clear the default iallocator, just pass an empty string
610 The ``--specs-...`` options are described in the **init** command.
615 **queue** {drain | undrain | info}
617 Change job queue properties.
619 The ``drain`` option sets the drain flag on the job queue. No new
620 jobs will be accepted, but jobs already in the queue will be
623 The ``undrain`` will unset the drain flag on the job queue. New
624 jobs will be accepted.
626 The ``info`` option shows the properties of the job queue.
631 **watcher** {pause *duration* | continue | info}
633 Make the watcher pause or let it continue.
635 The ``pause`` option causes the watcher to pause for *duration*
638 The ``continue`` option will let the watcher continue.
640 The ``info`` option shows whether the watcher is currently paused.
645 **redist-conf** [--submit]
647 This command forces a full push of configuration files from the
648 master node to the other nodes in the cluster. This is normally not
649 needed, but can be run if the **verify** complains about
650 configuration mismatches.
652 The ``--submit`` option is used to send the job to the master
653 daemon but not wait for its completion. The job ID will be shown so
654 that it can be examined via **gnt-job info**.
659 **remove-tags** [--from *file*] {*tag*...}
661 Remove tags from the cluster. If any of the tags are not existing
662 on the cluster, the entire operation will abort.
664 If the ``--from`` option is given, the list of tags to be removed will
665 be extended with the contents of that file (each line becomes a tag).
666 In this case, there is not need to pass tags on the command line (if
667 you do, tags from both sources will be removed). A file name of - will
668 be interpreted as stdin.
673 **rename** [-f] {*name*}
675 Renames the cluster and in the process updates the master IP
676 address to the one the new name resolves to. At least one of either
677 the name or the IP address must be different, otherwise the
678 operation will be aborted.
680 Note that since this command can be dangerous (especially when run
681 over SSH), the command will require confirmation unless run with
687 | **renew-crypto** [-f]
688 | [--new-cluster-certificate] [--new-confd-hmac-key]
689 | [--new-rapi-certificate] [--rapi-certificate *rapi-cert*]
690 | [--new-spice-certificate | --spice-certificate *spice-cert*
691 | -- spice-ca-certificate *spice-ca-cert*]
692 | [--new-cluster-domain-secret] [--cluster-domain-secret *filename*]
694 This command will stop all Ganeti daemons in the cluster and start
695 them again once the new certificates and keys are replicated. The
696 options ``--new-cluster-certificate`` and ``--new-confd-hmac-key``
697 can be used to regenerate the cluster-internal SSL certificate
698 respective the HMAC key used by ganeti-confd(8).
700 To generate a new self-signed RAPI certificate (used by
701 ganeti-rapi(8)) specify ``--new-rapi-certificate``. If you want to
702 use your own certificate, e.g. one signed by a certificate
703 authority (CA), pass its filename to ``--rapi-certificate``.
705 To generate a new self-signed SPICE certificate, used by SPICE
706 connections to the KVM hypervisor, specify the
707 ``--new-spice-certificate`` option. If you want to provide a
708 certificate, pass its filename to ``--spice-certificate`` and pass the
709 signing CA certificate to ``--spice-ca-certificate``.
711 ``--new-cluster-domain-secret`` generates a new, random cluster
712 domain secret. ``--cluster-domain-secret`` reads the secret from a
713 file. The cluster domain secret is used to sign information
714 exchanged between separate clusters via a third party.
719 **repair-disk-sizes** [instance...]
721 This command checks that the recorded size of the given instance's
722 disks matches the actual size and updates any mismatches found.
723 This is needed if the Ganeti configuration is no longer consistent
724 with reality, as it will impact some disk operations. If no
725 arguments are given, all instances will be checked.
727 Note that only active disks can be checked by this command; in case
728 a disk cannot be activated it's advised to use
729 **gnt-instance activate-disks --ignore-size ...** to force
730 activation without regard to the current size.
732 When the all disk sizes are consistent, the command will return no
733 output. Otherwise it will log details about the inconsistencies in
739 **search-tags** {*pattern*}
741 Searches the tags on all objects in the cluster (the cluster
742 itself, the nodes and the instances) for a given pattern. The
743 pattern is interpreted as a regular expression and a search will be
744 done on it (i.e. the given pattern is not anchored to the beggining
745 of the string; if you want that, prefix the pattern with ^).
747 If no tags are matching the pattern, the exit code of the command
748 will be one. If there is at least one match, the exit code will be
749 zero. Each match is listed on one line, the object and the tag
750 separated by a space. The cluster will be listed as /cluster, a
751 node will be listed as /nodes/*name*, and an instance as
752 /instances/*name*. Example:
756 # gnt-cluster search-tags time
757 /cluster ctime:2007-09-01
758 /nodes/node1.example.com mtime:2007-10-04
763 | **verify** [--no-nplus1-mem] [--node-group *nodegroup*]
764 | [--error-codes] [{-I|--ignore-errors} *errorcode*]
765 | [{-I|--ignore-errors} *errorcode*...]
767 Verify correctness of cluster configuration. This is safe with
768 respect to running instances, and incurs no downtime of the
771 If the ``--no-nplus1-mem`` option is given, Ganeti won't check
772 whether if it loses a node it can restart all the instances on
773 their secondaries (and report an error otherwise).
775 With ``--node-group``, restrict the verification to those nodes and
776 instances that live in the named group. This will not verify global
777 settings, but will allow to perform verification of a group while other
778 operations are ongoing in other groups.
780 The ``--error-codes`` option outputs each error in the following
781 parseable format: *ftype*:*ecode*:*edomain*:*name*:*msg*.
782 These fields have the following meaning:
785 Failure type. Can be *WARNING* or *ERROR*.
788 Error code of the failure. See below for a list of error codes.
791 Can be *cluster*, *node* or *instance*.
794 Contains the name of the item that is affected from the failure.
797 Contains a descriptive error message about the error
799 ``gnt-cluster verify`` will have a non-zero exit code if at least one of
800 the failures that are found are of type *ERROR*.
802 The ``--ignore-errors`` option can be used to change this behaviour,
803 because it demotes the error represented by the error code received as a
804 parameter to a warning. The option must be repeated for each error that
805 should be ignored (e.g.: ``-I ENODEVERSION -I ENODEORPHANLV``). The
806 ``--error-codes`` option can be used to determine the error code of a
818 The command checks which instances have degraded DRBD disks and
819 activates the disks of those instances.
821 This command is run from the **ganeti-watcher** tool, which also
822 has a different, complementary algorithm for doing this check.
823 Together, these two should ensure that DRBD disks are kept
831 Show the cluster version.
833 .. vim: set textwidth=72 :