-
Michael Hanselmann authored
This new opcode and gnt-debug sub-command test some aspects of the job queue, including the status of a job. The bug fixed in commit 2034c70d was identified using this test. A future patch will run this test automatically from the QA scripts. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
e58f87a9
gnt-debug.sgml 6.60 KiB
<!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>June 08, 2010</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>
<year>2010</year>
<holder>Google Inc.</holder>
</copyright>
&dhdate;
</refentryinfo>
<refmeta>
&dhucpackage;
&dhsection;
<refmiscinfo>Ganeti 2.2</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>
<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 and on selected nodes
(via an RPC call). This serves 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="opt">--verbose</arg>
<arg choice="opt">--timing-stats</arg>
<arg choice="opt">--job-repeat <option>N</option></arg>
<arg choice="opt">--op-repeat <option>N</option></arg>
<arg choice="req" rep="repeat">opcodes_file</arg>
</cmdsynopsis>
<para>
This command builds a list of opcodes from files in JSON format
and submits a job per file to the master daemon. It can be used
to test options that are not available via command line.
</para>
<para>
The <option>verbose</option> option will additionally display
the corresponding job IDs and the progress in waiting for the
jobs; the <option>timing-stats</option> option will show some
overall statistics inluding the number of total opcodes, jobs
submitted and time spent in each stage (submit, exec, total).
</para>
<para>
The <option>job-repeat</option> and <option>op-repeat</option>
options allow to submit multiple copies of the passed arguments;
job-repeat will cause N copies of each job (input file) to be
submitted (equivalent to passing the arguments N times) while
op-repeat will cause N copies of each of the opcodes in the file
to be executed (equivalent to each file containing N copies of
the opcodes).
</para>
</refsect2>
<refsect2>
<title>TEST-JOBQUEUE</title>
<cmdsynopsis>
<command>test-jobqueue</command>
</cmdsynopsis>
<para>
Executes a few tests on the job queue. This command might generate
failed jobs deliberately.
</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:
-->