gnt-node

Name

gnt-node -- node administration

Synopsis

gnt-node {command} [arguments...]

DESCRIPTION

The gnt-node is used for managing the (physical) nodes in the ganeti system.

COMMANDS

ADD

add [--readd] [-s secondary_ip] {nodename}

Adds the given node to the cluster.

This command is used to join a new node to the cluster. You will have to provide the password for root of the node to be able to add the node in the cluster. The command needs to be run on the ganeti master.

Note that the command is potentially destructive, as it will forcibly join the specified host the cluster, not paying attention to its current status (it could be already in a cluster, etc.)

The -s is used in dual-home clusters and specifies the new node's IP in the secondary network. See the discussion in gnt-cluster(8) for more information.

In case you're readding a node after hardware failure, you can use the --readd parameter. In this case, you don't need to pass the 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.

Example:

# gnt-node add node5.example.com
# gnt-node add -s 192.168.44.5 node5.example.com
        

ADD-TAGS

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.

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

EVACUATE

evacuate [-f] [--iallocator NAME | --new-secondary destination_node] {node}

This command will move all secondary instances away from the given node. It works only for instances having a drbd disk template.

The new location for the instances can be specified in two ways:

Example:

          # gnt-node evacuate -I dumb node3.example.com
        

FAILOVER

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 a drbd disk template.

Normally the failover will check the consistency of the disks before failing over the instance. If you are trying to migrate instances off a dead node, this will fail. Use the --ignore-consistency option for this purpose.

Example:

          # gnt-node failover node1.example.com
        

INFO

info [node...]

Show detailed information about the nodes in the cluster. If you don't give any arguments, all nodes will be shows, otherwise the output will be restricted to the given names.

LIST

list [--sync]
[--no-headers] [--separator=SEPARATOR]
[--units=UNITS] [-o [+]FIELD,...]
[node...]

Lists the nodes in the cluster.

The --no-headers option will skip the initial header line. The --separator option takes an argument which denotes what will be used between the output fields. Both these options are to help scripting.

The units used to display the numeric values in the output varies, depending on the options given. By default, the values will be formatted in the most appropriate unit. If the --separator option is given, then the values are shown in mebibytes to allow parsing by scripts. In both cases, the --units option can be used to enforce a given output unit.

By default, the query of nodes will be done in parallel with any running jobs. This might give inconsistent results for the free disk/memory. The --sync can be used to grab locks for all the nodes and ensure consistent view of the cluster (but this might stall the query for a long time).

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 instance; this is a numeric field that is incremented each time the instance is modified, and it can be used to detect modifications

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

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 memory for the node and for the instances (Xen).

If no node names are given, then all nodes are queried. Otherwise, only the given nodes will be listed.

LIST-TAGS

list-tags {nodename}

List the tags of the given node.

MIGRATE

migrate [-f] [--non-live] {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 --no-live option can be given to do a non-live migration.

Example:

          # gnt-node migrate node1.example.com
        

MODIFY

modify [-f] [--submit] [--master-candidate=yes|no] [--drained=yes|no] [--offline=yes|no] {node}

This command changes the role of the node. Each options takes either a literal yes or no, and only one option should be given as yes. The meaning of the roles are described in the manpage ganeti(7).

In case a node is demoted from the master candidate role, but there are not enough new nodes for this case, the operation will be refused. To override this check, pass the --force option.

Example (setting a node offline, which will demote it from master candidate role if is in that role):

# gnt-node modify --offline=yes node1.example.com
        

Example (setting the node back to online and master candidate):

# gnt-node modify --offline=no --master-candidate=yes node1.example.com
        

REMOVE

remove {nodename}

Removes a node from the cluster. Instances must be removed or migrated to another cluster before.

Example:

# gnt-node remove node5.example.com
        

REMOVE-TAGS

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.

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

VOLUMES

volumes [--no-headers] [--human-readable] [--separator=SEPARATOR] [--output=FIELDS]
[node...]

Lists all logical volumes and their physical disks from the node(s) provided.

The --no-headers option will skip the initial header line. The --separator option takes an argument which denotes what will be used between the output fields. Both these options are to help scripting.

The units used to display the numeric values in the output varies, depending on the options given. By default, the values will be formatted in the most appropriate unit. If the --separator option is given, then the values are shown in mebibytes to allow parsing by scripts. In both cases, the --units option can be used to enforce a given output unit.

The -o option takes a comma-separated list of output fields. The available fields and their meaning are:

node

the node name on which the volume exists

phys

the physical drive (on which the LVM physical volume lives)

vg

the volume group name

name

the logical volume name

size

the logical volume size

instance

The name of the instance to which this volume belongs, or (in case it's an orphan volume) the character "-"

Example:

# gnt-node volumes node5.example.com
Node              PhysDev   VG    Name                                 Size Instance
node1.example.com /dev/hdc1 xenvg instance1.example.com-sda_11000.meta 128  instance1.example.com
node1.example.com /dev/hdc1 xenvg instance1.example.com-sda_11001.data 256  instance1.example.com
        

REPORTING BUGS

Report bugs to http://code.google.com/p/ganeti/ or contact the developers using the ganeti mailing list <ganeti@googlegroups.com>.

SEE ALSO

Ganeti overview and specifications: ganeti(7) (general overview), ganeti-os-interface(7) (guest OS definitions).

Ganeti commands: gnt-cluster(8) (cluster-wide commands), gnt-job(8) (job-related commands), gnt-node(8) (node-related commands), gnt-instance(8) (instance commands), gnt-os(8) (guest OS commands), gnt-backup(8) (instance import/export commands), gnt-debug(8) (debug commands).

Ganeti daemons: ganeti-watcher(8) (automatic instance restarter), ganeti-cleaner(8) (job queue cleaner), ganeti-noded(8) (node daemon), ganeti-masterd(8) (master daemon), ganeti-rapi(8) (remote API daemon).

COPYRIGHT

Copyright (C) 2006, 2007, 2008, 2009 Google Inc. Permission is granted to copy, distribute and/or modify under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL.