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 = \
man/ganeti-watcher.8 \
man/gnt-backup.8 \
man/gnt-cluster.8 \
man/gnt-debug.8 \
man/gnt-instance.8 \
man/gnt-job.8 \
man/gnt-node.8 \
man/gnt-os.8
......@@ -309,6 +311,7 @@ $(REPLACE_VARS_SED): Makefile stamp-directories
echo 's#@GANETI_VERSION@#$(PACKAGE_VERSION)#g'; \
echo 's#@CUSTOM_XEN_KERNEL@#$(XEN_KERNEL)#g'; \
echo 's#@CUSTOM_XEN_INITRD@#$(XEN_INITRD)#g'; \
echo 's#@RPL_FILE_STORAGE_DIR@#$(FILE_STORAGE_DIR)#g'; \
echo '/@INCLUDE_RAPI_RESOURCES@/ {'; \
echo ' r $(abs_top_builddir)/doc/rapi-resources.sgml'; \
echo ' d'; \
......
......@@ -28,6 +28,10 @@
<refentrytitle>gnt-cluster</refentrytitle>
<manvolnum>8</manvolnum>
</citerefentry> (cluster-wide commands),
<citerefentry>
<refentrytitle>gnt-job</refentrytitle>
<manvolnum>8</manvolnum>
</citerefentry> (job-related commands),
<citerefentry>
<refentrytitle>gnt-node</refentrytitle>
<manvolnum>8</manvolnum>
......@@ -43,7 +47,11 @@
<citerefentry>
<refentrytitle>gnt-backup</refentrytitle>
<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>Ganeti daemons:
......
......@@ -2,7 +2,7 @@
<!-- Fill in your name for FIRSTNAME and SURNAME. -->
<!-- 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
allowed: see man(7), man(1). -->
<!ENTITY dhsection "<manvolnum>7</manvolnum>">
......@@ -20,6 +20,8 @@
<copyright>
<year>2006</year>
<year>2007</year>
<year>2008</year>
<year>2009</year>
<holder>Google Inc.</holder>
</copyright>
&dhdate;
......@@ -28,7 +30,7 @@
&dhucpackage;
&dhsection;
<refmiscinfo>ganeti 1.2</refmiscinfo>
<refmiscinfo>ganeti 2.0</refmiscinfo>
</refmeta>
<refnamediv>
<refname>&dhpackage;</refname>
......@@ -40,8 +42,8 @@
<screen>
# gnt-cluster init cluster1.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 -o debian-etch -s 128 -m 8 \
# gnt-instance add -n node2.example.com \
&gt; -o debootstrap --disk 0:size=30g \
&gt; -t plain instance1.example.com
</screen>
</refsynopsisdiv>
......@@ -51,7 +53,8 @@
<para>
The ganeti software manages physical nodes and virtual instances
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>
</refsect1>
......@@ -62,7 +65,7 @@
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
<computeroutput>gnt-cluster init</computeroutput>.
<userinput>gnt-cluster init</userinput>.
</para>
<para>
......@@ -71,6 +74,150 @@
</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;
</refentry>
......
This diff is collapsed.
This diff is collapsed.
<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
<!-- Fill in your name for FIRSTNAME and SURNAME. -->
<!-- Please adjust the date whenever revising the manpage. -->
<!ENTITY dhdate "<date>February 12, 2009</date>">
<!-- SECTION should be 1-8, maybe w/ subsection other parameters are
allowed: see man(7), man(1). -->
<!ENTITY dhsection "<manvolnum>8</manvolnum>">
<!ENTITY dhucpackage "<refentrytitle>gnt-debug</refentrytitle>">
<!ENTITY dhpackage "gnt-debug">
<!ENTITY debian "<productname>Debian</productname>">
<!ENTITY gnu "<acronym>GNU</acronym>">
<!ENTITY gpl "&gnu; <acronym>GPL</acronym>">
<!ENTITY footer SYSTEM "footer.sgml">
]>
<refentry>
<refentryinfo>
<copyright>
<year>2006</year>
<year>2007</year>
<year>2008</year>
<year>2009</year>
<holder>Google Inc.</holder>
</copyright>
&dhdate;
</refentryinfo>
<refmeta>
&dhucpackage;
&dhsection;
<refmiscinfo>ganeti 2.0</refmiscinfo>
</refmeta>
<refnamediv>
<refname>&dhpackage;</refname>
<refpurpose>debug commands</refpurpose>
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis>
<command>&dhpackage; </command>
<arg choice="req">command</arg>
<arg>arguments...</arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsect1>
<title>DESCRIPTION</title>
<para>
The <command>&dhpackage;</command> is used for debugging the
ganeti system.
</para>
</refsect1>
<refsect1>
<title>COMMANDS</title>
<refsect2>
<title>ALLOCATOR</title>
<cmdsynopsis>
<command>allocator</command>
<arg>--debug</arg>
<arg>--dir <replaceable>DIRECTION</replaceable></arg>
<arg choice="req">--algorithm <replaceable>ALLOCATOR</replaceable>
</arg>
<arg>--mode <replaceable>MODE</replaceable></arg>
<arg>--mem <replaceable>MEMORY</replaceable></arg>
<arg>--disks <replaceable>DISKS</replaceable></arg>
<arg>--disk-template <replaceable>TEMPLATE</replaceable></arg>
<arg>--nics <replaceable>NICS</replaceable></arg>
<arg>--os-type <replaceable>OS</replaceable></arg>
<arg>--vcpus <replaceable>VCPUS</replaceable></arg>
<arg>--tags <replaceable>TAGS</replaceable></arg>
<arg choice="req"><replaceable>instance</replaceable></arg>
</cmdsynopsis>
<para>
Executes a test run of the <emphasis>iallocator</emphasis> framework.
</para>
<para>
The command will build input for a given iallocator script
(named with the <option>--algorithm</option> option), and
either show this input data (if
<replaceable>DIRECTION</replaceable> is
<emphasis>in</emphasis>) or run the iallocator script and show
its output (if <replaceable>DIRECTION</replaceable> is
<emphasis>out</emphasis>).
</para>
<para>
If the <replaceable>MODE</replaceable> is
<emphasis>allocate</emphasis>, then an instance definition is
built from the other arguments and sent to the script,
otherwise (<replaceable>MODE</replaceable> is
<emphasis>relocate</emphasis>) an existing instance name must
be passed as the first argument.
</para>
<para>
This build of ganeti will look for iallocator scripts in the
following directories: <filename
class="directory">@CUSTOM_IALLOCATOR_SEARCH_PATH@</filename>;
for more details about this framework, see the HTML or PDF
documentation.
</para>
<refsect2>
<title>DELAY</title>
<cmdsynopsis>
<command>delay</command>
<arg>--debug</arg>
<arg>--no-master</arg>
<arg choice="opt" rep="repeat">-n <replaceable>NODE</replaceable></arg>
<arg choice="req"><replaceable>duration</replaceable></arg>
</cmdsynopsis>
<para>
Run a test opcode (a sleep) on the master (internally in the
command) and on selected nodes (via an RPC call). This server
no other purpose but to execute a test operation.
</para>
<para>
The <option>-n</option> option can be given multiple times to
select the nodes for the RPC call. By default, the delay will
also be executed on the master, unless the
<option>--no-master</option> option is passed.
</para>
<para>
The <replaceable>delay</replaceable> argument will be
interpreted as a floating point number.
</para>
</refsect2>
<refsect2>
<title>SUBMIT-JOB</title>
<cmdsynopsis>
<command>submit-job</command>
<arg choice="req">opcodes_file</arg>
</cmdsynopsis>
<para>
This command builds a list of opcodes from a JSON-format file
and submits them as a single job to the master daemon. It can
be used to test some options that are not available via the
command line.
</para>
</refsect2>
</refsect1>
&footer;
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:2
sgml-indent-data:t
sgml-parent-document:nil
sgml-default-dtd-file:nil
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
-->
This diff is collapsed.
<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
<!-- Fill in your name for FIRSTNAME and SURNAME. -->
<!-- Please adjust the date whenever revising the manpage. -->
<!ENTITY dhdate "<date>February 12, 2009</date>">
<!-- SECTION should be 1-8, maybe w/ subsection other parameters are
allowed: see man(7), man(1). -->
<!ENTITY dhsection "<manvolnum>8</manvolnum>">
<!ENTITY dhucpackage "<refentrytitle>gnt-job</refentrytitle>">
<!ENTITY dhpackage "gnt-job">
<!ENTITY debian "<productname>Debian</productname>">
<!ENTITY gnu "<acronym>GNU</acronym>">
<!ENTITY gpl "&gnu; <acronym>GPL</acronym>">
<!ENTITY footer SYSTEM "footer.sgml">
]>
<refentry>
<refentryinfo>
<copyright>
<year>2008</year>
<year>2009</year>
<holder>Google Inc.</holder>
</copyright>
&dhdate;
</refentryinfo>
<refmeta>
&dhucpackage;
&dhsection;
<refmiscinfo>ganeti 2.0</refmiscinfo>
</refmeta>
<refnamediv>
<refname>&dhpackage;</refname>
<refpurpose>job commands</refpurpose>
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis>
<command>&dhpackage; </command>
<arg choice="req">command</arg>
<arg>arguments...</arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsect1>
<title>DESCRIPTION</title>
<para>
The <command>&dhpackage;</command> is used for examining and
manipulating the job queue.
</para>
</refsect1>
<refsect1>
<title>COMMANDS</title>
<refsect2>
<title>ARCHIVE</title>
<cmdsynopsis>
<command>archive</command>
<arg choice="req" rep="repeat">id</arg>
</cmdsynopsis>
<para>This command can be used to archive job by their IDs. Only
jobs that have finished execution (i.e either
<emphasis>success</emphasis>, <emphasis>error</emphasis> or
<emphasis>canceled</emphasis> jobs).</para>
</refsect2>
<refsect2>
<title>AUTOARCHIVE</title>
<cmdsynopsis>
<command>autoarchive</command>
<group choice="req">
<arg><replaceable>age</replaceable></arg>
<arg>all</arg>
</group>
</cmdsynopsis>
<para>
Archive jobs by their age. This command can archive jobs older
than <replaceable>age</replaceable> seconds, or alternatively
all finished jobs can be archived if the string <literal>all
</literal> is passed.
</para>
</refsect2>
<refsect2>
<title>CANCEL</title>
<cmdsynopsis>
<command>cancel</command>
<arg choice="req"><replaceable>id</replaceable></arg>
</cmdsynopsis>
<para>
Cancel the job identified by the given
<replaceable>id</replaceable>. Only jobs that have not yet
started to run can be canceled; that is, jobs in either the
<emphasis>queued</emphasis> or <emphasis>waiting</emphasis>
state.
</para>
</refsect2>
<refsect2>
<title>INFO</title>
<cmdsynopsis>
<command>cancel</command>
<arg choice="req" rep="repeat"><replaceable>id</replaceable></arg>
</cmdsynopsis>
<para>
Show detailed information about the given job id(s). If no job
id is given, all jobs are examined (warning, this is a lot of
information).
</para>
</refsect2>
<refsect2>
<title>LIST</title>
<cmdsynopsis>
<command>list</command>
<arg>--no-headers</arg>
<arg>--separator=<replaceable>SEPARATOR</replaceable></arg>
<sbr>
<arg>-o <replaceable>[+]FIELD,...</replaceable></arg>
<sbr>
</cmdsynopsis>
<para>
Lists the jobs and their status. By default, the job id, job
status, and a small job description is listed, but additional
parameters can be selected.
</para>
<para>
The <option>--no-headers</option> option will skip the initial
header line. The <option>--separator</option> option takes an
argument which denotes what will be used between the output
fields. Both these options are to help scripting.
</para>
<para>
The <option>-o</option> option takes a comma-separated list of
output fields. The available fields and their meaning are:
<variablelist>
<varlistentry>
<term>id</term>
<listitem>
<simpara>the job id</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>status</term>
<listitem>
<simpara>the status of the job</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>received_ts</term>
<listitem>
<simpara>the timestamp the job was received</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>start_ts</term>
<listitem>
<simpara>the timestamp when the job was started</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>end_ts</term>
<listitem>
<simpara>the timestamp when the job was ended</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>summary</term>
<listitem>
<simpara>a summary of the opcodes that define the job</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>ops</term>
<listitem>
<simpara>the list of opcodes defining the job</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>opresult</term>
<listitem>
<simpara>the list of opcode results</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>opstatus</term>
<listitem>
<simpara>the list of opcode statuses</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>oplog</term>
<listitem>
<simpara>the list of opcode logs</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>opstart</term>
<listitem>
<simpara>the list of opcode start times</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>opend</term>
<listitem>
<simpara>the list of opcode end times</simpara>
</listitem>
</varlistentry>
</variablelist>
</para>
<para>
If the value of the option starts with the character
<constant>+</constant>, 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.
</para>
</refsect2>
</refsect1>
&footer;
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:2
sgml-indent-data:t
sgml-parent-document:nil
sgml-default-dtd-file:nil
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
-->