Commit d3b4cf9f authored by Iustin Pop's avatar Iustin Pop

Update the command line scripts man pages for 2.0

This patch updates the gnt-* scripts to show the new 2.0 syntax. It's
not guaranteed to be 80% complete.

Reviewed-by: ultrotter
parent f1de3563
...@@ -186,7 +186,9 @@ man_MANS = \ ...@@ -186,7 +186,9 @@ man_MANS = \
man/ganeti-watcher.8 \ man/ganeti-watcher.8 \
man/gnt-backup.8 \ man/gnt-backup.8 \
man/gnt-cluster.8 \ man/gnt-cluster.8 \
man/gnt-debug.8 \
man/gnt-instance.8 \ man/gnt-instance.8 \
man/gnt-job.8 \
man/gnt-node.8 \ man/gnt-node.8 \
man/gnt-os.8 man/gnt-os.8
...@@ -309,6 +311,7 @@ $(REPLACE_VARS_SED): Makefile stamp-directories ...@@ -309,6 +311,7 @@ $(REPLACE_VARS_SED): Makefile stamp-directories
echo 's#@GANETI_VERSION@#$(PACKAGE_VERSION)#g'; \ echo 's#@GANETI_VERSION@#$(PACKAGE_VERSION)#g'; \
echo 's#@CUSTOM_XEN_KERNEL@#$(XEN_KERNEL)#g'; \ echo 's#@CUSTOM_XEN_KERNEL@#$(XEN_KERNEL)#g'; \
echo 's#@CUSTOM_XEN_INITRD@#$(XEN_INITRD)#g'; \ echo 's#@CUSTOM_XEN_INITRD@#$(XEN_INITRD)#g'; \
echo 's#@RPL_FILE_STORAGE_DIR@#$(FILE_STORAGE_DIR)#g'; \
echo '/@INCLUDE_RAPI_RESOURCES@/ {'; \ echo '/@INCLUDE_RAPI_RESOURCES@/ {'; \
echo ' r $(abs_top_builddir)/doc/rapi-resources.sgml'; \ echo ' r $(abs_top_builddir)/doc/rapi-resources.sgml'; \
echo ' d'; \ echo ' d'; \
......
...@@ -28,6 +28,10 @@ ...@@ -28,6 +28,10 @@
<refentrytitle>gnt-cluster</refentrytitle> <refentrytitle>gnt-cluster</refentrytitle>
<manvolnum>8</manvolnum> <manvolnum>8</manvolnum>
</citerefentry> (cluster-wide commands), </citerefentry> (cluster-wide commands),
<citerefentry>
<refentrytitle>gnt-job</refentrytitle>
<manvolnum>8</manvolnum>
</citerefentry> (job-related commands),
<citerefentry> <citerefentry>
<refentrytitle>gnt-node</refentrytitle> <refentrytitle>gnt-node</refentrytitle>
<manvolnum>8</manvolnum> <manvolnum>8</manvolnum>
...@@ -43,7 +47,11 @@ ...@@ -43,7 +47,11 @@
<citerefentry> <citerefentry>
<refentrytitle>gnt-backup</refentrytitle> <refentrytitle>gnt-backup</refentrytitle>
<manvolnum>8</manvolnum> <manvolnum>8</manvolnum>
</citerefentry> (instance import/export commands). </citerefentry> (instance import/export commands),
<citerefentry>
<refentrytitle>gnt-debug</refentrytitle>
<manvolnum>8</manvolnum>
</citerefentry> (debug commands).
</para> </para>
<para>Ganeti daemons: <para>Ganeti daemons:
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<!-- Fill in your name for FIRSTNAME and SURNAME. --> <!-- Fill in your name for FIRSTNAME and SURNAME. -->
<!-- Please adjust the date whenever revising the manpage. --> <!-- Please adjust the date whenever revising the manpage. -->
<!ENTITY dhdate "<date>June 16, 2007</date>"> <!ENTITY dhdate "<date>February 12, 2009</date>">
<!-- SECTION should be 1-8, maybe w/ subsection other parameters are <!-- SECTION should be 1-8, maybe w/ subsection other parameters are
allowed: see man(7), man(1). --> allowed: see man(7), man(1). -->
<!ENTITY dhsection "<manvolnum>7</manvolnum>"> <!ENTITY dhsection "<manvolnum>7</manvolnum>">
...@@ -20,6 +20,8 @@ ...@@ -20,6 +20,8 @@
<copyright> <copyright>
<year>2006</year> <year>2006</year>
<year>2007</year> <year>2007</year>
<year>2008</year>
<year>2009</year>
<holder>Google Inc.</holder> <holder>Google Inc.</holder>
</copyright> </copyright>
&dhdate; &dhdate;
...@@ -28,7 +30,7 @@ ...@@ -28,7 +30,7 @@
&dhucpackage; &dhucpackage;
&dhsection; &dhsection;
<refmiscinfo>ganeti 1.2</refmiscinfo> <refmiscinfo>ganeti 2.0</refmiscinfo>
</refmeta> </refmeta>
<refnamediv> <refnamediv>
<refname>&dhpackage;</refname> <refname>&dhpackage;</refname>
...@@ -40,8 +42,8 @@ ...@@ -40,8 +42,8 @@
<screen> <screen>
# gnt-cluster init cluster1.example.com # gnt-cluster init cluster1.example.com
# gnt-node add node2.example.com # gnt-node add node2.example.com
# gnt-os add -o debian-etch -p /srv/ganeti/os/debian-etch # gnt-instance add -n node2.example.com \
# gnt-instance add -n node2.example.com -o debian-etch -s 128 -m 8 \ &gt; -o debootstrap --disk 0:size=30g \
&gt; -t plain instance1.example.com &gt; -t plain instance1.example.com
</screen> </screen>
</refsynopsisdiv> </refsynopsisdiv>
...@@ -51,7 +53,8 @@ ...@@ -51,7 +53,8 @@
<para> <para>
The ganeti software manages physical nodes and virtual instances The ganeti software manages physical nodes and virtual instances
of a cluster based on a virtualization software. The current of a cluster based on a virtualization software. The current
version (1.2) supports Xen 3.0 (also tested with 3.1). version (2.0) supports Xen 3.0 (also tested with 3.1) and KVM
hypervisors.
</para> </para>
</refsect1> </refsect1>
...@@ -62,7 +65,7 @@ ...@@ -62,7 +65,7 @@
First you must install the software on all the cluster nodes, First you must install the software on all the cluster nodes,
either from sources or (if available) from a package. The next either from sources or (if available) from a package. The next
step is to create the initial cluster configuration, using step is to create the initial cluster configuration, using
<computeroutput>gnt-cluster init</computeroutput>. <userinput>gnt-cluster init</userinput>.
</para> </para>
<para> <para>
...@@ -71,6 +74,150 @@ ...@@ -71,6 +74,150 @@
</refsect1> </refsect1>
<refsect1>
<title>Cluster architecture</title>
<para>
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 (<citerefentry>
<refentrytitle>ganeti-masterd</refentrytitle>
<manvolnum>8</manvolnum> </citerefentry>), running on the master
node. Each node runs (as before) a node daemon, and the master
has the <acronym>RAPI</acronym> daemon running too.
</para>
<refsect2>
<title>Node roles</title>
<para>Each node can be in one of the following states:
<variablelist>
<varlistentry>
<term>master_candidate</term>
<listitem>
<para>The node receives the full cluster configuration
(configuration file and jobs) and can become a master
via the <command>gnt-cluster masterfailover</command>
command. Nodes that are not in this state cannot
transition into the master role due to missing
state.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>regular</term>
<listitem>
<para>This the normal state of a node.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>drained</term>
<listitem>
<para>Nodes in this state are functioning normally but
cannot receive new instance, because the intention is to
set them to <emphasis>offline</emphasis> or remove them
from the cluster.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>offline</term>
<listitem>
<para>These nodes are still recorder 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.</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect2>
<refsect2>
<title>Cluster configuration</title>
<para>The master node keeps and is responsible for the cluster
configuration. On the filesystem, this is stored under the
<filename
class="directory">@LOCALSTATEDIR@/ganeti/lib</filename>
directory, and if the master daemon is stopped it can be backed
up normally.</para>
<para>The master daemon will replicate the configuration
database called <filename>config.data</filename> 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
<emphasis>ssconf</emphasis> files, which are stored in the same
directory and start with <filename>ssconf_</filename> prefix, to
all nodes.</para>
</refsect2>
<refsect2>
<title>Jobs</title>
<para>
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:
<variablelist>
<varlistentry>
<term>queued</term>
<listitem>
<simpara>The job has been submitted but not yet
processed by the master daemon.</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>waiting</term>
<listitem>
<simpara>The job is waiting for for locks before the
first of its opcodes.</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>canceling</term>
<listitem>
<para>The jos is waiting for locks, but is has been
marked for cancelation. It will not transition to
<emphasis>running</emphasis>, but to
<emphasis>canceled</emphasis>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>running</term>
<listitem>
<simpara>The job is currently being executed.</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>canceled</term>
<listitem>
<para>The job has been canceled before starting
execution.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>success</term>
<listitem>
<para>The job has finished successfully.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>error</term>
<listitem>
<para>The job has failed during runtime, or the master
daemon has been stopped during the job execution.</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect2>
</refsect1>
&footer; &footer;
</refentry> </refentry>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<!-- Fill in your name for FIRSTNAME and SURNAME. --> <!-- Fill in your name for FIRSTNAME and SURNAME. -->
<!-- Please adjust the date whenever revising the manpage. --> <!-- Please adjust the date whenever revising the manpage. -->
<!ENTITY dhdate "<date>Jul 6, 2007</date>"> <!ENTITY dhdate "<date>February 11, 2009</date>">
<!-- SECTION should be 1-8, maybe w/ subsection other parameters are <!-- SECTION should be 1-8, maybe w/ subsection other parameters are
allowed: see man(7), man(1). --> allowed: see man(7), man(1). -->
<!ENTITY dhsection "<manvolnum>8</manvolnum>"> <!ENTITY dhsection "<manvolnum>8</manvolnum>">
...@@ -19,6 +19,8 @@ ...@@ -19,6 +19,8 @@
<refentryinfo> <refentryinfo>
<copyright> <copyright>
<year>2007</year> <year>2007</year>
<year>2008</year>
<year>2009</year>
<holder>Google Inc.</holder> <holder>Google Inc.</holder>
</copyright> </copyright>
&dhdate; &dhdate;
...@@ -27,7 +29,7 @@ ...@@ -27,7 +29,7 @@
&dhucpackage; &dhucpackage;
&dhsection; &dhsection;
<refmiscinfo>ganeti 1.2</refmiscinfo> <refmiscinfo>ganeti 2.0</refmiscinfo>
</refmeta> </refmeta>
<refnamediv> <refnamediv>
<refname>&dhpackage;</refname> <refname>&dhpackage;</refname>
...@@ -92,29 +94,33 @@ ...@@ -92,29 +94,33 @@
<title>IMPORT</title> <title>IMPORT</title>
<cmdsynopsis> <cmdsynopsis>
<command>import</command> <command>import</command>
<sbr>
<group choice="req"> <group choice="req">
<arg>-n <replaceable>node<optional>:secondary-node</optional></replaceable></arg> <arg>-n <replaceable>node<optional>:secondary-node</optional></replaceable></arg> <arg>--iallocator
<arg>--iallocator <replaceable>name</replaceable></arg> <replaceable>name</replaceable></arg>
</group> </group>
<sbr> <sbr>
<arg>-s <replaceable>disksize</replaceable></arg> <arg rep="repeat">--disk <replaceable>N</replaceable>:size=<replaceable>VAL</replaceable><arg>,mode=<replaceable>ro|rw</replaceable></arg></arg>
<arg>--swap-size <replaceable>disksize</replaceable></arg>
<arg>-m <replaceable>memsize</replaceable></arg>
<sbr> <sbr>
<group>
<arg>-b <replaceable>bridge</replaceable></arg> <arg rep="repeat">--net <replaceable>N</replaceable><arg rep="repeat">:options</arg></arg>
<arg>--mac <replaceable>mac</replaceable></arg> <arg>--no-nics</arg>
</group>
<sbr>
<arg>-B <replaceable>BEPARAMS</replaceable></arg>
<sbr>
<arg>-H <replaceable>HYPERVISOR</replaceable><arg>:<arg choice="plain" rep="repeat">option=<replaceable>value</replaceable></arg></arg></arg>
<sbr> <sbr>
<arg choice="req">--src-node=<replaceable>source-node</replaceable></arg> <arg>--src-node=<replaceable>source-node</replaceable></arg>
<arg choice="req">--src-dir=<replaceable>source-dir</replaceable></arg> <arg>--src-dir=<replaceable>source-dir</replaceable></arg>
<sbr> <sbr>
<arg choice="req">-t<group> <arg choice="req">-t<group>
<arg>diskless</arg> <arg>diskless</arg>
<arg>plain</arg> <arg>plain</arg>
<arg>drbd</arg> <arg>drbd</arg>
<arg>file</arg>
</group></arg> </group></arg>
<sbr> <sbr>
...@@ -124,47 +130,103 @@ ...@@ -124,47 +130,103 @@
Imports a new instance from an export residing on Imports a new instance from an export residing on
<replaceable>source-node</replaceable> in <replaceable>source-node</replaceable> in
<replaceable>source-dir</replaceable>. <replaceable>source-dir</replaceable>.
<replaceable>instance</replaceable> must be in DNS and <replaceable>instance</replaceable> must be in DNS and resolve
resolve to a IP in the same network as the nodes in the to a IP in the same network as the nodes in the cluster. If
cluster. the source node and directory are not passed, the last backup
in the cluster is used, as visible with the
<command>list</command> command.
</para> </para>
<para> <para>
The <option>-s</option> option specifies the disk size for The <option>disk</option> option specifies the parameters for
the instance, in mebibytes (defaults to the disks of the instance. The numbering of disks starts at
<constant>20480MiB</constant> = zero, and at least one disk needs to be passed. For each disk,
<constant>20GiB</constant>). You can also use one of the at least the size needs to be given, and optionally the access
suffixes <literal>m</literal>, <literal>g</literal> or mode (read-only or the default of read-write) can also be
specified. The size is interpreted (when no unit is given) in
mebibytes. You can also use one of the suffixes
<literal>m</literal>, <literal>g</literal> or
<literal>t</literal> to specificy the exact the units used; <literal>t</literal> to specificy the exact the units used;
these suffixes map to mebibytes, gibibytes and tebibytes. these suffixes map to mebibytes, gibibytes and tebibytes.
</para> </para>
<para> <para>
The <option>--swap-size</option> option specifies the swap The minimum disk specification is therefore <userinput>--disk
disk size (in mebibytes) for the instance (the one presented 0:size=20G</userinput>, and a three-disk instance can be
as <filename class="devicefile">/dev/sdb</filename>). The specified as <userinput>--disk 0:size=20G --disk 1:size=4G
default is <constant>4096MiB</constant>. As for the disk --disk 2:size=100G</userinput>.
size, you can specify other suffixes.
</para> </para>
<para> <para>
The <option>-m</option> option specifies the memory size for The NICs of the instances can be specified via the
the instance, in mebibytes (defaults to 128 MiB). Again, you <option>--nic</option> option. By default, one NIC is created
can use other suffixes (e.g. <userinput>2g</userinput>). for the instance, with the MAC set to the original MAC of the
instance (as it was at export time). Each NIC can take up to
three parameters (all optional):
<variablelist>
<varlistentry>
<term>mac</term>
<listitem>
<simpara>either a value or <constant>GENERATE</constant>
to generate a new unique MAC, or
<constant>AUTO</constant> to reuse the old MAC</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>ip</term>
<listitem>
<simpara>specifies the IP address assigned to the
instance from the Ganeti side (this is not necessarily
what the instance will use, but what the node expects
the instance to use)</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>bridge</term>
<listitem>
<simpara>specifies the bridge to attach this NIC
to</simpara>
</listitem>
</varlistentry>
</variablelist>
</para> </para>
<para> <para>
The <option>-b</option> option specifies the bridge to which the Alternatively, if no network is desired for the instance, you
instance will be connected. (defaults to the cluster-wide default can prevent the default of one NIC with the
bridge specified at cluster intialization time). <option>--no-nics</option> option.
</para> </para>
<para> <para>
The <option>--mac</option> option specifies the mac address for the The <option>-B</option> option specifies the backend
instance. The default is 'auto' which is reusing the previous mac parameters for the instance. If no such parameters are
address if the instance is being imported with the same name, and specified, the values are inherited from the cluster. Possible
generating a new one otherwise. You can also force generation by parameters are:
specifying 'generate'. <variablelist>
<varlistentry>
<term>memory</term>
<listitem>
<simpara>the memory size of the instance; as usual,
suffixes can be used to denote the unit, otherwise the
value is taken in mebibites</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>vcpus</term>
<listitem>
<simpara>the number of VCPUs to assign to the instance
(if this value makes sense for the hypervisor)</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>auto_balance</term>
<listitem>
<simpara>whether the instance is considered in the N+1
cluster checks (enough redundancy in the cluster to
survive a node failure)</simpara>
</listitem>
</varlistentry>
</variablelist>
</para> </para>
<para> <para>
...@@ -195,6 +257,18 @@ ...@@ -195,6 +257,18 @@
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term>file</term>
<listitem>
<para>Disk devices will be backed up by files, under the
<filename
class="directory">@RPL_FILE_STORAGE_DIR@</filename>. By
default, each instance will get a directory (as its own
name) under this path, and each disk is stored as
individual files in this (instance-specific)
directory.</para>
</listitem>
</varlistentry>
</variablelist> </variablelist>
</para> </para>
...@@ -208,7 +282,7 @@ ...@@ -208,7 +282,7 @@
<para> <para>
The optional second value of the <option>--node</option> is used for The optional second value of the <option>--node</option> is used for
the remote raid template type and specifies the remote node. the drbd template and specifies the remote node.
</para> </para>
<para> <para>
...@@ -220,9 +294,8 @@ ...@@ -220,9 +294,8 @@
<para> <para>
Example: Example:
<screen> <screen>
# gnt-backup import -t plain -s 30 -m 512 -n node1.example.com \ # gnt-backup import -t plain --disk 0:size=1G -B memory=512 \
> --src-node=node2.example.com \ > -n node1.example.com \
> --src-dir=/srv/ganeti/export/instance3.example.com \
> instance3.example.com > instance3.example.com
</screen> </screen>
</para> </para>
...@@ -251,6 +324,22 @@ ...@@ -251,6 +324,22 @@
</screen> </screen>
</refsect2> </refsect2>
<refsect2>
<title>REMOVE</title>
<cmdsynopsis>
<command>remove</command>
<arg choice="req">instance_name</arg>
</cmdsynopsis>
<para>
Removes the backup for the given instance name, if any. If the
backup was for a deleted instances, it is needed to pass the
<acronym>FQDN</acronym> of the instance, and not only the
short hostname.
</para>
</refsect2>
</refsect1> </refsect1>
&footer; &footer;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<!-- Fill in your name for FIRSTNAME and SURNAME. --> <!-- Fill in your name for FIRSTNAME and SURNAME. -->
<!-- Please adjust the date whenever revising the manpage. --> <!-- Please adjust the date whenever revising the manpage. -->
<!ENTITY dhdate "<date>December 12, 2007</date>"> <!ENTITY dhdate "<date>February 12, 2009</date>">
<!-- SECTION should be 1-8, maybe w/ subsection other parameters are <!-- SECTION should be 1-8, maybe w/ subsection other parameters are
allowed: see man(7), man(1). --> allowed: see man(7), man(1). -->
<!ENTITY dhsection "<manvolnum>8</manvolnum>"> <!ENTITY dhsection "<manvolnum>8</manvolnum>">
...@@ -20,6 +20,8 @@ ...@@ -20,6 +20,8 @@
<copyright> <copyright>
<year>2006</year> <year>2006</year>
<year>2007</year> <year>2007</year>
<year>2008</year>
<year>2009</year>
<holder>Google Inc.</holder> <holder>Google Inc.</holder>
</copyright> </copyright>
&dhdate; &dhdate;
...@@ -28,7 +30,7 @@ ...@@ -28,7 +30,7 @@
&dhucpackage; &dhucpackage;
&dhsection; &dhsection;
<refmiscinfo>ganeti 1.2</refmiscinfo> <refmiscinfo>ganeti 2.0</refmiscinfo>
</refmeta> </refmeta>
<refnamediv> <refnamediv>
<refname>&dhpackage;</refname> <refname>&dhpackage;</refname>
...@@ -105,9 +107,9 @@ ...@@ -105,9 +107,9 @@
The command is executed serially on the selected nodes. If the The command is executed serially on the selected nodes. If the
master node is present in the list, the command will be master node is present in the list, the command will be
executed last on the master. Regarding the other nodes, the executed last on the master. Regarding the other nodes, the
execution order is somewhat alphabetic (it's smarter so that execution order is somewhat alphabetic, so that
node2.example.com will be earlier than node10.example.com but node2.example.com will be earlier than node10.example.com but
after node1.example.com). after node1.example.com.
</para> </para>
<para> <para>
...@@ -208,17 +210,29 @@ ...@@ -208,17 +210,29 @@
<cmdsynopsis> <cmdsynopsis>
<command>init</command> <command>init</command>
<sbr>
<arg>-s <replaceable>secondary_ip</replaceable></arg> <arg>-s <replaceable>secondary_ip</replaceable></arg>
<sbr>
<arg>-b <replaceable>bridge</replaceable></arg> <arg>-b <replaceable>bridge</replaceable></arg>
<sbr>