.TH ganeti 7 "" "Ganeti" "Version 2.5.2" .SH Name .PP ganeti - cluster-based virtualization management .SH Synopsis .PP \f[CR] #\ gnt-cluster\ init\ cluster1.example.com #\ gnt-node\ add\ node2.example.com #\ gnt-instance\ add\ -n\ node2.example.com\ \\ >\ -o\ debootstrap\ --disk\ 0:size=30g\ \\ >\ -t\ plain\ instance1.example.com \f[] .SH DESCRIPTION .PP The Ganeti software manages physical nodes and virtual instances of a cluster based on a virtualization software. The current version (2.3) supports Xen 3.x and KVM (72 or above) as hypervisors, and LXC as an experimental hypervisor. .SH Quick start .PP First you must install the software on all the cluster nodes, either from sources or (if available) from a package. The next step is to create the initial cluster configuration, using \f[B]gnt-cluster init\f[]. .PP Then you can add other nodes, or start creating instances. .SH Cluster architecture .PP In Ganeti 2.0, the architecture of the cluster is a little more complicated than in 1.2. The cluster is coordinated by a master daemon (\f[B]ganeti-masterd\f[](8)), running on the master node. Each node runs (as before) a node daemon, and the master has the RAPI daemon running too. .SS Node roles .PP Each node can be in one of the following states: .TP .B master Only one node per cluster can be in this role, and this node is the one holding the authoritative copy of the cluster configuration and the one that can actually execute commands on the cluster and modify the cluster state. See more details under \f[I]Cluster configuration\f[]. .RS .RE .TP .B master_candidate The node receives the full cluster configuration (configuration file and jobs) and can become a master via the \f[B]gnt-cluster master-failover\f[] command. Nodes that are not in this state cannot transition into the master role due to missing state. .RS .RE .TP .B regular This the normal state of a node. .RS .RE .TP .B drained Nodes in this state are functioning normally but cannot receive new instances, because the intention is to set them to \f[I]offline\f[] or remove them from the cluster. .RS .RE .TP .B offline These nodes are still recorded in the Ganeti configuration, but except for the master daemon startup voting procedure, they are not actually contacted by the master. This state was added in order to allow broken machines (that are being repaired) to remain in the cluster but without creating problems. .RS .RE .SS Node flags .PP Nodes have two flags which govern which roles they can take: .TP .B master_capable The node can become a master candidate, and furthermore the master node. When this flag is disabled, the node cannot become a candidate; this can be useful for special networking cases, or less reliable hardware. .RS .RE .TP .B vm_capable The node can host instances. When enabled (the default state), the node will participate in instance allocation, capacity calculation, etc. When disabled, the node will be skipped in many cluster checks and operations. .RS .RE .SS Node Parameters .PP These parameters are node specific and can be preseeded on node-group and cluster level. .PP Currently we support the following node parameters: .TP .B oob_program Path to an executable used as the out-of-band helper as described in the Ganeti Node OOB Management Framework (design-oob.rst) design document. .RS .RE .SS Cluster configuration .PP The master node keeps and is responsible for the cluster configuration. On the filesystem, this is stored under the \f[B]/var/ganeti/lib\f[] directory, and if the master daemon is stopped it can be backed up normally. .PP The master daemon will replicate the configuration database called \f[B]config.data\f[] and the job files to all the nodes in the master candidate role. It will also distribute a copy of some configuration values via the \f[I]ssconf\f[] files, which are stored in the same directory and start with a \f[B]ssconf_\f[] prefix, to all nodes. .SS Jobs .PP All cluster modification are done via jobs. A job consists of one or more opcodes, and the list of opcodes is processed serially. If an opcode fails, the entire job is failed and later opcodes are no longer processed. A job can be in one of the following states: .TP .B queued The job has been submitted but not yet processed by the master daemon. .RS .RE .TP .B waiting The job is waiting for for locks before the first of its opcodes. .RS .RE .TP .B canceling The job is waiting for locks, but is has been marked for cancellation. It will not transition to \f[I]running\f[], but to \f[I]canceled\f[]. .RS .RE .TP .B running The job is currently being executed. .RS .RE .TP .B canceled The job has been canceled before starting execution. .RS .RE .TP .B success The job has finished successfully. .RS .RE .TP .B error The job has failed during runtime, or the master daemon has been stopped during the job execution. .RS .RE .SH Common command line features .SS Options .PP Many Ganeti commands provide the following options. The availability for a certain command can be checked by calling the command using the \f[B]--help\f[] option. .PP \f[B]gnt-...\f[] \f[I]command\f[] [--dry-run] [--priority {low | normal | high}] .PP The \f[B]--dry-run\f[] option can be used to check whether an operation would succeed. .PP The option \f[B]--priority\f[] sets the priority for opcodes submitted by the command. .SH Field formatting .PP Multiple ganeti commands use the same framework for tabular listing of resources (e.g. \f[B]gnt-instance list\f[], \f[B]gnt-node list\f[], \f[B]gnt-group list\f[], \f[B]gnt-debug locks\f[], etc.). For these commands, special states are denoted via a special symbol (in terse mode) or a string (in verbose mode): .TP .B *, (offline) The node in question is marked offline, and thus it cannot be queried for data. This result is persistent until the node is de-offlined. .RS .RE .TP .B ?, (nodata) Ganeti expected to receive an answer from this entity, but the cluster RPC call failed and/or we didn\[aq]t receive a valid answer; usually more information is available in the node daemon log (if the node is alive) or the master daemon log. This result is transient, and re-running command might return a different result. .RS .RE .TP .B -, (unavail) The respective field doesn\[aq]t make sense for this entity; e.g. querying a down instance for its current memory \[aq]live\[aq] usage, or querying a non-vm_capable node for disk/memory data. This result is persistent, and until the entity state is changed via ganeti commands, the result won\[aq]t change. .RS .RE .TP .B ??, (unknown) This field is not known (note that this is different from entity being unknown). Either you have mis-typed the field name, or you are using a field that the running Ganeti master daemon doesn\[aq]t know. This result is persistent, re-running the command won\[aq]t change it. .RS .RE .SS Key-value parameters .PP Multiple options take parameters that are of the form \f[B]key=value,key=value,...\f[] or \f[B]category:key=value,...\f[]. Examples are the hypervisor parameters, backend parameters, etc. For these, it\[aq]s possible to use values that contain commas by escaping with via a backslash (which needs two if not single-quoted, due to shell behaviour): .PP \f[CR] #\ gnt-instance\ modify\ -H\ kernel_path=an\\\\,example\ instance1 #\ gnt-instance\ modify\ -H\ kernel_path=\[aq]an\\,example\[aq]\ instance1 \f[] .SS Query filters .PP Most commands listing resources (e.g. instances or nodes) support filtering. The filter language is similar to Python expressions with some elements from Perl. The language is not generic. Each condition must consist of a field name and a value (except for boolean checks), a field can not be compared to another field. Keywords are case-sensitive. .PP Syntax in pseudo-BNF: .PP \f[CR] \ ::=\ /*\ String\ quoted\ with\ single\ or\ double\ quotes, \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ backslash\ for\ escaping\ */ \ ::=\ /*\ Number\ in\ base-10\ positional\ notation\ */ \ ::=\ /*\ Regular\ expression\ */ /* \ \ Modifier\ "i":\ Case-insensitive\ matching,\ see \ \ http://docs.python.org/library/re#re.IGNORECASE \ \ Modifier\ "s":\ Make\ the\ "."\ special\ character\ match\ any\ character, \ \ including\ newline,\ see\ http://docs.python.org/library/re#re.DOTALL */ \ ::=\ /*\ empty\ */\ |\ i\ |\ s \ ::=\ \ |\ \ ::= \ \ {\ /*\ Value\ comparison\ */ \ \ \ \ \ {\ ==\ |\ !=\ }\ \ \ \ \ /*\ Collection\ membership\ */ \ \ \ \ |\ \ [\ not\ ]\ in\ \ \ \ \ /*\ Regular\ expressions\ (recognized\ delimiters \ \ \ \ \ \ \ are\ "/",\ "#",\ "^",\ and\ "|";\ backslash\ for\ escaping) \ \ \ \ */ \ \ \ \ |\ \ {\ =~\ |\ !~\ }\ m// \ \ \ \ /*\ Globbing\ */ \ \ \ \ |\ \ {\ =*\ |\ !*\ }\ \ \ \ \ /*\ Boolean\ */ \ \ \ \ |\ \ \ } \ ::= \ \ {\ [\ not\ ]\ \ |\ (\ \ )\ } \ \ [\ {\ and\ |\ or\ }\ \ ] \f[] .PP Operators: .TP .B \f[I]==\f[] Equality .RS .RE .TP .B \f[I]!=\f[] Inequality .RS .RE .TP .B \f[I]=~\f[] Pattern match using regular expression .RS .RE .TP .B \f[I]!~\f[] Logically negated from \f[I]=~\f[] .RS .RE .TP .B \f[I]=*\f[] Globbing, see \f[B]glob\f[](7), though only * and ? are supported .RS .RE .TP .B \f[I]!*\f[] Logically negated from \f[I]=*\f[] .RS .RE .TP .B \f[I]in\f[], \f[I]not in\f[] Collection membership and negation .RS .RE .PP As a shortcut globbing patterns can be specified as names, e.g. \f[B]gnt-instance\ list\ \[aq]*.site1\[aq]\ \[aq]*.site2\[aq]\f[]. .SH Common daemon functionality .PP All Ganeti daemons re-open the log file(s) when sent a SIGHUP signal. \f[B]logrotate\f[](8) can be used to rotate Ganeti\[aq]s log files. .SH REPORTING BUGS .PP Report bugs to project website (http://code.google.com/p/ganeti/) or contact the developers using the Ganeti mailing list (ganeti@googlegroups.com). .SH SEE ALSO .PP Ganeti overview and specifications: \f[B]ganeti\f[](7) (general overview), \f[B]ganeti-os-interface\f[](7) (guest OS definitions). .PP Ganeti commands: \f[B]gnt-cluster\f[](8) (cluster-wide commands), \f[B]gnt-job\f[](8) (job-related commands), \f[B]gnt-node\f[](8) (node-related commands), \f[B]gnt-instance\f[](8) (instance commands), \f[B]gnt-os\f[](8) (guest OS commands), \f[B]gnt-group\f[](8) (node group commands), \f[B]gnt-backup\f[](8) (instance import/export commands), \f[B]gnt-debug\f[](8) (debug commands). .PP Ganeti daemons: \f[B]ganeti-watcher\f[](8) (automatic instance restarter), \f[B]ganeti-cleaner\f[](8) (job queue cleaner), \f[B]ganeti-noded\f[](8) (node daemon), \f[B]ganeti-masterd\f[](8) (master daemon), \f[B]ganeti-rapi\f[](8) (remote API daemon). .PP Ganeti htools: \f[B]htools\f[](1) (generic binary), \f[B]hbal\f[](1) (cluster balancer), \f[B]hspace\f[](1) (capacity calculation), \f[B]hail\f[](1) (IAllocator plugin), \f[B]hscan\f[](1) (data gatherer from remote clusters). .SH COPYRIGHT .PP Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 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. .PP On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL.