Merge branch 'devel-2.4'
[ganeti-local] / man / gnt-node.rst
index 0bb3c07..a5aeba8 100644 (file)
@@ -49,6 +49,10 @@ secondary IP again, it will reused from the cluster. Also, the
 drained and offline flags of the node will be cleared before
 re-adding it.
 
+The ``--force-join`` option is to proceed with adding a node even if it already
+appears to belong to another cluster. This is used during cluster merging, for
+example.
+
 The ``-g`` 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.
@@ -145,7 +149,8 @@ LIST
 
 | **list**
 | [--no-headers] [--separator=*SEPARATOR*]
-| [--units=*UNITS*] [-o *[+]FIELD,...*]
+| [--units=*UNITS*] [-v] [-o *[+]FIELD,...*]
+| [--filter]
 | [node...]
 
 Lists the nodes in the cluster.
@@ -165,149 +170,37 @@ used to enforce a given output unit.
 Queries of nodes will be done in parallel with any running jobs. This might
 give inconsistent results for the free disk/memory.
 
+The ``-v`` option activates verbose mode, which changes the display of
+special field states (see **ganeti(7)**).
+
 The ``-o`` option takes a comma-separated list of output fields.
 The available fields and their meaning are:
 
-
-
-name
-    the node name
-
-pinst_cnt
-    the number of instances having this node as primary
-
-pinst_list
-    the list of instances having this node as primary, comma separated
-
-sinst_cnt
-    the number of instances having this node as a secondary node
-
-sinst_list
-    the list of instances having this node as a secondary node, comma
-    separated
-
-pip
-    the primary ip of this node (used for cluster communication)
-
-sip
-    the secondary ip of this node (used for data replication in dual-ip
-    clusters, see gnt-cluster(8)
-
-dtotal
-    total disk space in the volume group used for instance disk
-    allocations
-
-dfree
-    available disk space in the volume group
-
-mtotal
-    total memory on the physical node
-
-mnode
-    the memory used by the node itself
-
-mfree
-    memory available for instance allocations
-
-bootid
-    the node bootid value; this is a linux specific feature that
-    assigns a new UUID to the node at each boot and can be use to
-    detect node reboots (by tracking changes in this value)
-
-tags
-    comma-separated list of the node's tags
-
-serial_no
-    the so called 'serial number' of the node; this is a numeric field
-    that is incremented each time the node is modified, and it can be
-    used to detect modifications
-
-ctime
-    the creation time of the node; note that this field contains spaces
-    and as such it's harder to parse
-
-    if this attribute is not present (e.g. when upgrading from older
-    versions), then "N/A" will be shown instead
-
-mtime
-    the last modification time of the node; note that this field
-    contains spaces and as such it's harder to parse
-
-    if this attribute is not present (e.g. when upgrading from older
-    versions), then "N/A" will be shown instead
-
-uuid
-    Show the UUID of the node (generated automatically by Ganeti)
-
-ctotal
-    the toal number of logical processors
-
-cnodes
-    the number of NUMA domains on the node, if the hypervisor can
-    export this information
-
-csockets
-    the number of physical CPU sockets, if the hypervisor can export
-    this information
-
-master_candidate
-    whether the node is a master candidate or not
-
-drained
-    whether the node is drained or not; the cluster still communicates
-    with drained nodes but excludes them from allocation operations
-
-offline
-    whether the node is offline or not; if offline, the cluster does
-    not communicate with offline nodes; useful for nodes that are not
-    reachable in order to avoid delays
-
-role
-    A condensed version of the node flags; this field will output a
-    one-character field, with the following possible values:
-
-    - *M* for the master node
-
-    - *C* for a master candidate
-
-    - *R* for a regular node
-
-    - *D* for a drained node
-
-    - *O* for an offline node
-
-master_capable
-    whether the node can become a master candidate
-
-vm_capable
-    whether the node can host instances
-
-group
-    the name of the node's group, if known (the query is done without
-    locking, so data consistency is not guaranteed)
-
-group.uuid
-    the UUID of the node's group
-
+@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
 see the default list plus a few other fields, instead of retyping
 the entire list of fields.
 
-Note that some of this fields are known from the configuration of
-the cluster (e.g. name, pinst, sinst, pip, sip and thus the master
-does not need to contact the node for this data (making the listing
-fast if only fields from this set are selected), whereas the other
-fields are "live" fields and we need to make a query to the cluster
-nodes.
-
-Depending on the virtualization type and implementation details,
-the mtotal, mnode and mfree may have slighly varying meanings. For
-example, some solutions share the node memory with the pool of
-memory used for instances (KVM), whereas others have separate
+Note that some of these fields are known from the configuration of the
+cluster (e.g. ``name``, ``pinst``, ``sinst``, ``pip``, ``sip``) and thus
+the master does not need to contact the node for this data (making the
+listing fast if only fields from this set are selected), whereas the
+other fields are "live" fields and require a query to the cluster nodes.
+
+Depending on the virtualization type and implementation details, the
+``mtotal``, ``mnode`` and ``mfree`` fields may have slighly varying
+meanings. For example, some solutions share the node memory with the
+pool of memory used for instances (KVM), whereas others have separate
 memory for the node and for the instances (Xen).
 
+If exactly one argument is given and it appears to be a query filter
+(see **ganeti(7)**), the query result is filtered accordingly. For
+ambiguous cases (e.g. a single field name as a filter) the ``--filter``
+(``-F``) option forces the argument to be treated as a filter (e.g.
+``gnt-node list -F master_candidate``).
+
 If no node names are given, then all nodes are queried. Otherwise,
 only the given nodes will be listed.
 
@@ -354,6 +247,7 @@ MODIFY
 | [--master-capable=``yes|no``] [--vm-capable=``yes|no``] [--auto-promote]
 | [-s *secondary_ip*]
 | [--node-parameters *ndparams*]
+| [--node-powered=``yes|no``]
 | {*node*}
 
 This command changes the role of the node. Each options takes
@@ -361,6 +255,9 @@ either a literal yes or no, and only one option should be given as
 yes. The meaning of the roles and flags are described in the
 manpage **ganeti**(7).
 
+``--node-powered`` can be used to modify state-of-record if it doesn't reflect
+the reality anymore.
+
 In case a node is demoted from the master candidate role, the
 operation will be refused unless you pass the ``--auto-promote``
 option. This option will cause the operation to lock all cluster nodes
@@ -593,3 +490,53 @@ enabled.
 The ``--yes`` option can be used to skip confirmation, while the
 ``--force`` option is needed if the target node is the master
 node.
+
+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
+state of given node. With ``status`` you get the power status as reported
+by the out-of-band managment script.
+
+Note that this command will only work if the out-of-band functionality
+is configured and enabled on the cluster. If this is not the case,
+please use the **powercycle** command above.
+
+Using ``--force`` you skip the confirmation to do the operation.
+Currently this only has effect on ``off`` and ``cycle``. On those two
+you can *not* operate on the master. However, the command will provide
+you with the command to invoke to operate on the master nerver-mind.
+This is considered harmful and Ganeti does not support the use of it.
+
+Providing ``--ignore-status`` will ignore the offline=N state of a node
+and continue with power off.
+
+``--power-delay`` specifies the time in seconds (factions allowed)
+waited between powering on the next node. This is by default 2 seconds
+but can increased if needed with this option.
+
+*nodes* are optional. If not provided it will call out for every node in
+the cluster. Except for the ``off`` and ``cycle`` command where you've
+to explicit use ``--all`` to select all.
+
+
+HEALTH
+~~~~~~
+
+**health** [*nodes*]
+
+This commands calls out to out-pf-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
+``UNKNOWN``. Items with status ``WARNING`` or ``CRITICAL`` are logged and
+annotated in the command line output.
+
+.. vim: set textwidth=72 :
+.. Local Variables:
+.. mode: rst
+.. fill-column: 72
+.. End: