htools: Make it possible to load an IAlloc request
[ganeti-local] / man / gnt-node.rst
index 747322f..b8cc2af 100644 (file)
@@ -23,10 +23,12 @@ COMMANDS
 ADD
 ~~~
 
-| **add** [--readd] [{-s|--secondary-ip} *secondary\_ip*]
-| [{-g|--node-group} *nodegroup*]
-| [--master-capable=``yes|no``] [--vm-capable=``yes|no``]
-| [--node-parameters *ndparams*]
+| **add** [\--readd] [{-s|\--secondary-ip} *secondary\_ip*]
+| [{-g|\--node-group} *nodegroup*]
+| [\--master-capable=``yes|no``] [\--vm-capable=``yes|no``]
+| [\--node-parameters *ndparams*]
+| [\--disk-state *diskstate*]
+| [\--hypervisor-state *hvstate*]
 | {*nodename*}
 
 Adds the given node to the cluster.
@@ -58,9 +60,16 @@ The ``-g (--node-group)`` option is used to add the new node into a
 specific node group, specified by UUID or name. If only one node group
 exists you can skip this option, otherwise it's mandatory.
 
-The ``vm_capable``, ``master_capable`` and ``ndparams`` options are
-described in **ganeti**(7), and are used to set the properties of the
-new node.
+The ``vm_capable``, ``master_capable``, ``ndparams``, ``diskstate`` and
+``hvstate`` options are described in **ganeti**(7), and are used to set
+the properties of the new node.
+
+The command performs some operations that change the state of the master
+and the new node, like copying certificates and starting the node daemon
+on the new node, or updating ``/etc/hosts`` on the master node.  If the
+command fails at a later stage, it doesn't undo such changes.  This
+should not be a problem, as a successful run of ``gnt-node add`` will
+bring everything back in sync.
 
 Example::
 
@@ -72,7 +81,7 @@ Example::
 ADD-TAGS
 ~~~~~~~~
 
-**add-tags** [--from *file*] {*nodename*} {*tag*...}
+**add-tags** [\--from *file*] {*nodename*} {*tag*...}
 
 Add tags to the given node. If any of the tags contains invalid
 characters, the entire operation will abort.
@@ -86,9 +95,9 @@ interpreted as stdin.
 EVACUATE
 ~~~~~~~~
 
-**evacuate** [-f] [--early-release] [--iallocator *NAME* \|
---new-secondary *destination\_node*]
-[--primary-only \| --secondary-only] [--early-release] {*node*}
+**evacuate** [-f] [\--early-release] [\--iallocator *NAME* \|
+\--new-secondary *destination\_node*]
+[\--primary-only \| \--secondary-only] [\--early-release] {*node*}
 
 This command will move instances away from the given node. If
 ``--primary-only`` is given, only primary instances are evacuated, with
@@ -115,6 +124,19 @@ old storage is already broken) or when the storage on the primary
 node is known to be fine (thus we won't need the old storage for
 potential recovery).
 
+Note that this command is equivalent to using per-instance commands for
+each affected instance individually:
+
+- ``--primary-only`` is equivalent to ``gnt-instance
+  failover/migration`` for non-DRBD instances, but for DRBD instances
+  it's different, and usually is a slow process (it will change the
+  primary to another node while keeping the secondary, this requiring
+  data copies, whereas failover/migrate will only toggle the
+  primary/secondary roles, a fast process)
+- ``--secondary-only`` is equivalent to ``gnt-instance replace-disks``
+  in the secondary node change mode (only valid for DRBD instances)
+- when neither of the above is done a combination of the two cases is run
+
 Example::
 
     # gnt-node evacuate -I hail node3.example.com
@@ -123,7 +145,7 @@ Example::
 FAILOVER
 ~~~~~~~~
 
-**failover** [-f] [--ignore-consistency] {*node*}
+**failover** [-f] [\--ignore-consistency] {*node*}
 
 This command will fail over all instances having the given node as
 primary to their secondary nodes. This works only for instances having
@@ -152,9 +174,9 @@ LIST
 ~~~~
 
 | **list**
-| [--no-headers] [--separator=*SEPARATOR*]
-| [--units=*UNITS*] [-v] [{-o|--output} *[+]FIELD,...*]
-| [--filter]
+| [\--no-headers] [\--separator=*SEPARATOR*]
+| [\--units=*UNITS*] [-v] [{-o|\--output} *[+]FIELD,...*]
+| [\--filter]
 | [node...]
 
 Lists the nodes in the cluster.
@@ -183,7 +205,7 @@ fields. The available fields and their meaning are:
 @QUERY_FIELDS_NODE@
 
 If the value of the option starts with the character ``+``, the new
-fields will be added to the default list. This allows to quickly
+fields will be added to the default list. This allows one to quickly
 see the default list plus a few other fields, instead of retyping
 the entire list of fields.
 
@@ -227,16 +249,19 @@ List the tags of the given node.
 MIGRATE
 ~~~~~~~
 
-**migrate** [-f] [--non-live] [--migration-mode=live\|non-live]
-{*node*}
+**migrate** [-f] [\--non-live] [\--migration-mode=live\|non-live]
+[\--ignore-ipolicy] {*node*}
 
 This command will migrate all instances having the given node as
 primary to their secondary nodes. This works only for instances
 having a drbd disk template.
 
 As for the **gnt-instance migrate** command, the options
-``--no-live`` and ``--migration-mode`` can be given to influence
-the migration type.
+``--no-live``, ``--migration-mode`` and ``--no-runtime-changes``
+can be given to influence the migration type.
+
+If ``--ignore-ipolicy`` is given any instance policy violations occuring
+during this operation are ignored.
 
 Example::
 
@@ -246,13 +271,15 @@ Example::
 MODIFY
 ~~~~~~
 
-| **modify** [-f] [--submit]
-| [{-C|--master-candidate} ``yes|no``]
-| [{-D|--drained} ``yes|no``] [{-O|--offline} ``yes|no``]
-| [--master-capable=``yes|no``] [--vm-capable=``yes|no``] [--auto-promote]
-| [{-s|--secondary-ip} *secondary_ip*]
-| [--node-parameters *ndparams*]
-| [--node-powered=``yes|no``]
+| **modify** [-f] [\--submit]
+| [{-C|\--master-candidate} ``yes|no``]
+| [{-D|\--drained} ``yes|no``] [{-O|\--offline} ``yes|no``]
+| [\--master-capable=``yes|no``] [\--vm-capable=``yes|no``] [\--auto-promote]
+| [{-s|\--secondary-ip} *secondary_ip*]
+| [\--node-parameters *ndparams*]
+| [\--node-powered=``yes|no``]
+| [\--hypervisor-state *hvstate*]
+| [\--disk-state *diskstate*]
 | {*node*}
 
 This command changes the role of the node. Each options takes
@@ -302,7 +329,7 @@ Example::
 REMOVE-TAGS
 ~~~~~~~~~~~
 
-**remove-tags** [--from *file*] {*nodename*} {*tag*...}
+**remove-tags** [\--from *file*] {*nodename*} {*tag*...}
 
 Remove tags from the given node. If any of the tags are not
 existing on the node, the entire operation will abort.
@@ -316,8 +343,8 @@ be interpreted as stdin.
 VOLUMES
 ~~~~~~~
 
-| **volumes** [--no-headers] [--human-readable]
-| [--separator=*SEPARATOR*] [{-o|--output} *FIELDS*]
+| **volumes** [\--no-headers] [\--human-readable]
+| [\--separator=*SEPARATOR*] [{-o|\--output} *FIELDS*]
 | [*node*...]
 
 Lists all logical volumes and their physical disks from the node(s)
@@ -369,9 +396,9 @@ Example::
 LIST-STORAGE
 ~~~~~~~~~~~~
 
-| **list-storage** [--no-headers] [--human-readable]
-| [--separator=*SEPARATOR*] [--storage-type=*STORAGE\_TYPE*]
-| [{-o|--output} *FIELDS*]
+| **list-storage** [\--no-headers] [\--human-readable]
+| [\--separator=*SEPARATOR*] [\--storage-type=*STORAGE\_TYPE*]
+| [{-o|\--output} *FIELDS*]
 | [*node*...]
 
 Lists the available storage units and their details for the given
@@ -454,14 +481,14 @@ Example::
 REPAIR-STORAGE
 ~~~~~~~~~~~~~~
 
-**repair-storage** [--ignore-consistency] {*node*} {*storage-type*}
+**repair-storage** [\--ignore-consistency] {*node*} {*storage-type*}
 {*volume-name*}
 
 Repairs a storage volume on a node. Only LVM volume groups can be
 repaired at this time. They have the storage type "lvm-vg".
 
-On LVM volume groups, **repair-storage** runs "vgreduce
---removemissing".
+On LVM volume groups, **repair-storage** runs ``vgreduce
+--removemissing``.
 
 
 
@@ -482,14 +509,14 @@ POWERCYCLE
 
 **powercycle** [``--yes``] [``--force``] {*node*}
 
-This commands (tries to) forcefully reboot a node. It is a command
-that can be used if the node environemnt is broken, such that the
-admin can no longer login over ssh, but the Ganeti node daemon is
+This command (tries to) forcefully reboot a node. It is a command
+that can be used if the node environment is broken, such that the
+admin can no longer login over SSH, but the Ganeti node daemon is
 still working.
 
 Note that this command is not guaranteed to work; it depends on the
 hypervisor how effective is the reboot attempt. For Linux, this
-command require that the kernel option CONFIG\_MAGIC\_SYSRQ is
+command requires the kernel option ``CONFIG_MAGIC_SYSRQ`` to be
 enabled.
 
 The ``--yes`` option can be used to skip confirmation, while the
@@ -502,7 +529,7 @@ POWER
 **power** [``--force``] [``--ignore-status``] [``--all``]
 [``--power-delay``] on|off|cycle|status [*nodes*]
 
-This commands calls out to out-of-band management to change the power
+This command calls out to out-of-band management to change the power
 state of given node. With ``status`` you get the power status as reported
 by the out-of-band managment script.
 
@@ -533,7 +560,7 @@ HEALTH
 
 **health** [*nodes*]
 
-This commands calls out to out-pf-band management to ask for the health status
+This command calls out to out-of-band management to ask for the health status
 of all or given nodes. The health contains the node name and then the items
 element with their status in a ``item=status`` manner. Where ``item`` is script
 specific and ``status`` can be one of ``OK``, ``WARNING``, ``CRITICAL`` or