Add documentation for disk parameters to man pages
[ganeti-local] / man / gnt-cluster.rst
index d84c363..7293f3e 100644 (file)
@@ -20,6 +20,13 @@ Ganeti system.
 COMMANDS
 --------
 
+ACTIVATE-MASTER-IP
+~~~~~~~~~~~~~~~~~~
+
+**activate-master-ip**
+
+Activates the master IP on the master node.
+
 ADD-TAGS
 ~~~~~~~~
 
@@ -89,6 +96,18 @@ primary/secondary IPs are different). Example::
 This will copy the file /tmp/test from the current node to the two
 named nodes.
 
+DEACTIVATE-MASTER-IP
+~~~~~~~~~~~~~~~~~~~~
+
+**deactivate-master-ip** [--yes]
+
+Deactivates the master IP on the master node.
+
+This should be run only locally or on a connection to the node ip
+directly, as a connection to the master ip will be broken by this
+operation. Because of this risk it will require user confirmation
+unless the ``--yes`` option is passed.
+
 DESTROY
 ~~~~~~~
 
@@ -147,16 +166,18 @@ INIT
 | [{-s|--secondary-ip} *secondary\_ip*]
 | [--vg-name *vg-name*]
 | [--master-netdev *interface-name*]
+| [--master-netmask *netmask*]
+| [--use-external-mip-script {yes \| no}]
 | [{-m|--mac-prefix} *mac-prefix*]
 | [--no-lvm-storage]
 | [--no-etc-hosts]
 | [--no-ssh-init]
 | [--file-storage-dir *dir*]
 | [--enabled-hypervisors *hypervisors*]
-| [-t *hypervisor name*]
 | [{-H|--hypervisor-parameters} *hypervisor*:*hv-param*=*value*[,*hv-param*=*value*...]]
 | [{-B|--backend-parameters} *be-param*=*value* [,*be-param*=*value*...]]
 | [{-N|--nic-parameters} *nic-param*=*value* [,*nic-param*=*value*...]]
+| [{-D|--disk-parameters} *disk-template*:*disk-param*=*value* [,*disk-param*=*value*...]]
 | [--maintain-node-health {yes \| no}]
 | [--uid-pool *user-id pool definition*]
 | [{-I|--default-iallocator} *default instance allocator*]
@@ -204,6 +225,17 @@ interface on which the master will activate its IP address. It's
 important that all nodes have this interface because you'll need it
 for a master failover.
 
+The ``--master-netmask`` option allows to specify a netmask for the
+master IP. The netmask must be specified as an integer, and will be
+interpreted as a CIDR netmask. The default value is 32 for an IPv4
+address and 128 for an IPv6 address.
+
+The ``--use-external-mip-script`` options allows to specify
+whether to use an user-supplied master IP address setup script, whose
+location is ``/etc/ganeti/scripts/master-ip-setup``. If the option value
+is set to False, the default script, whose location is
+``/usr/local/lib/ganeti/tools/master-ip-setup``, will be executed.
+
 The ``-m (--mac-prefix)`` option will let you specify a three byte
 prefix under which the virtual MAC addresses of your instances will be
 generated. The prefix must be specified in the format ``XX:XX:XX`` and
@@ -290,16 +322,26 @@ vcpus
     Number of VCPUs to set for an instance by default, must be an
     integer, will be set to 1 if no specified.
 
-memory
-    Amount of memory to allocate for an instance by default, can be
-    either an integer or an integer followed by a unit (M for mebibytes
-    and G for gibibytes are supported), will be set to 128M if not
-    specified.
+maxmem
+    Maximum amount of memory to allocate for an instance by default, can
+    be either an integer or an integer followed by a unit (M for
+    mebibytes and G for gibibytes are supported), will be set to 128M if
+    not specified.
+
+minmem
+    Minimum amount of memory to allocate for an instance by default, can
+    be either an integer or an integer followed by a unit (M for
+    mebibytes and G for gibibytes are supported), will be set to 128M if
+    not specified.
 
 auto\_balance
     Value of the auto\_balance flag for instances to use by default,
     will be set to true if not specified.
 
+always\_failover
+    Default value for the ``always\_failover`` flag for instances; if
+    not set, ``False`` is used.
+
 
 The ``-N (--nic-parameters)`` option allows you to set the default nic
 parameters for the cluster. The parameter format is a comma-separated
@@ -315,11 +357,61 @@ link
     network script it is interpreted as a routing table number or
     name.
 
+The ``-D (--disk-parameters)`` option allows you to set the default disk
+template parameters at cluster level. The format used for this option is
+similar to the one use by the  ``-H`` option: the disk template name
+must be specified first, followed by a colon and by a comma-separated
+list of key-value pairs. These parameters can only be specified at
+cluster and node group level; the cluster-level parameter are inherited
+by the node group at the moment of its creation, and can be further
+modified at node group level using the **gnt-group**(8) command. 
+
+List of disk parameters available for the **drbd** template:
+
+resync-rate
+    Re-synchronization rate, expressed in KiB/s
+
+data-stripes
+    Number of stripes to use for data LVs
+
+meta-stripes
+    Number of stripes to use for meta LVs
+
+disk-barriers
+    What kind of barriers to **disable** for disks. It can either assume
+    the value "n", meaning no barrier disabled, or a non-empty string
+    containing a subset of the characters "bfd". "b" means disable disk
+    barriers, "f" means disable disk flushes, "d" disables disk drains
+
+meta-barriers
+    Boolean value indicating whether the meta barriers should be
+    disabled (True) or not (False).
+
+metavg
+    String containing the name of the default LVM volume group for DRBD
+    metadata. By default, it is set to ``xenvg``. It can be overridden
+    during the instance creation process by using the ``metavg`` key of
+    the ``--disk`` parameter.
+
+disk-custom
+    String containing additional parameters to be appended to the
+    arguments list of ``drbdsetup disk``.
+
+net-custom
+    String containing additional parameters to be appended to the
+    arguments list of ``drbdsetup net``.
+
+List of parameters available for the **plain** template:
+
+stripes
+    Number of stripes to use for new LVs
+
 The option ``--maintain-node-health`` allows one to enable/disable
 automatic maintenance actions on nodes. Currently these include
 automatic shutdown of instances and deactivation of DRBD devices on
 offline nodes; in the future it might be extended to automatic
-removal of unknown LVM volumes, etc.
+removal of unknown LVM volumes, etc. Note that this option is only
+useful if the use of ``ganeti-confd`` was enabled at compilation.
 
 The ``--uid-pool`` option initializes the user-id pool. The
 *user-id pool definition* can contain a list of user-ids and/or a
@@ -403,6 +495,7 @@ MODIFY
 | [{-H|--hypervisor-parameters} *hypervisor*:*hv-param*=*value*[,*hv-param*=*value*...]]
 | [{-B|--backend-parameters} *be-param*=*value* [,*be-param*=*value*...]]
 | [{-N|--nic-parameters} *nic-param*=*value* [,*nic-param*=*value*...]]
+| [{-D|--disk-parameters} *disk-template*:*disk-param*=*value* [,*disk-param*=*value*...]]
 | [--uid-pool *user-id pool definition*]
 | [--add-uids *user-id pool definition*]
 | [--remove-uids *user-id pool definition*]
@@ -413,15 +506,24 @@ MODIFY
 | [--reserved-lvs=*NAMES*]
 | [--node-parameters *ndparams*]
 | [--master-netdev *interface-name*]
+| [--master-netmask *netmask*]
+| [--use-external-mip-script {yes \| no}]
+| [--hypervisor-state *hvstate*]
+| [--disk-state *diskstate*]
 
 Modify the options for the cluster.
 
 The ``--vg-name``, ``--no-lvm-storarge``, ``--enabled-hypervisors``,
 ``-H (--hypervisor-parameters)``, ``-B (--backend-parameters)``,
-``--nic-parameters``, ``-C (--candidate-pool-size)``,
-``--maintain-node-health``, ``--prealloc-wipe-disks``, ``--uid-pool``,
-``--node-parameters``, ``--master-netdev`` options are described in
-the **init** command.
+``-D (--disk-parameters)``, ``--nic-parameters``, ``-C
+(--candidate-pool-size)``, ``--maintain-node-health``,
+``--prealloc-wipe-disks``, ``--uid-pool``, ``--node-parameters``,
+``--master-netdev``, ``--master-netmask`` and
+``--use-external-mip-script`` options are described in the **init**
+command.
+
+The ``--hypervisor-state`` and ``--disk-state`` options are described in
+detail in **ganeti**(7).
 
 The ``--add-uids`` and ``--remove-uids`` options can be used to
 modify the user-id pool by adding/removing a list of user-ids or
@@ -521,6 +623,8 @@ RENEW-CRYPTO
 | **renew-crypto** [-f]
 | [--new-cluster-certificate] [--new-confd-hmac-key]
 | [--new-rapi-certificate] [--rapi-certificate *rapi-cert*]
+| [--new-spice-certificate | --spice-certificate *spice-cert*
+| -- spice-ca-certificate *spice-ca-cert*]
 | [--new-cluster-domain-secret] [--cluster-domain-secret *filename*]
 
 This command will stop all Ganeti daemons in the cluster and start
@@ -534,6 +638,12 @@ ganeti-rapi(8)) specify ``--new-rapi-certificate``. If you want to
 use your own certificate, e.g. one signed by a certificate
 authority (CA), pass its filename to ``--rapi-certificate``.
 
+To generate a new self-signed SPICE certificate, used by SPICE
+connections to the KVM hypervisor, specify the
+``--new-spice-certificate`` option. If you want to provide a
+certificate, pass its filename to ``--spice-certificate`` and pass the
+signing CA certificate to ``--spice-ca-certificate``.
+
 ``--new-cluster-domain-secret`` generates a new, random cluster
 domain secret. ``--cluster-domain-secret`` reads the secret from a
 file. The cluster domain secret is used to sign information
@@ -586,7 +696,9 @@ node will be listed as /nodes/*name*, and an instance as
 VERIFY
 ~~~~~~
 
-**verify** [--no-nplus1-mem] [--node-group *nodegroup*]
+| **verify** [--no-nplus1-mem] [--node-group *nodegroup*]
+| [--error-codes] [{-I|--ignore-errors} *errorcode*]
+| [{-I|--ignore-errors} *errorcode*...]
 
 Verify correctness of cluster configuration. This is safe with
 respect to running instances, and incurs no downtime of the
@@ -601,6 +713,39 @@ instances that live in the named group. This will not verify global
 settings, but will allow to perform verification of a group while other
 operations are ongoing in other groups.
 
+The ``--error-codes`` option outputs each error in the following
+parseable format: *ftype*:*ecode*:*edomain*:*name*:*msg*.
+These fields have the following meaning:
+
+ftype
+    Failure type. Can be *WARNING* or *ERROR*.
+
+ecode
+    Error code of the failure. See below for a list of error codes.
+
+edomain
+    Can be *cluster*, *node* or *instance*.
+
+name
+    Contains the name of the item that is affected from the failure.
+
+msg
+    Contains a descriptive error message about the error
+
+``gnt-cluster verify`` will have a non-zero exit code if at least one of
+the failures that are found are of type *ERROR*.
+
+The ``--ignore-errors`` option can be used to change this behaviour,
+because it demotes the error represented by the error code received as a
+parameter to a warning. The option must be repeated for each error that
+should be ignored (e.g.: ``-I ENODEVERSION -I ENODEORPHANLV``). The
+``--error-codes`` option can be used to determine the error code of a
+given error.
+
+List of error codes:
+
+@CONSTANTS_ECODES@
+
 VERIFY-DISKS
 ~~~~~~~~~~~~