root / man / gnt-debug.rst @ b578501b
History | View | Annotate | Download (3.8 kB)
1 |
gnt-debug(8) Ganeti | Version @GANETI_VERSION@ |
---|---|
2 |
============================================== |
3 |
|
4 |
Name |
5 |
---- |
6 |
|
7 |
gnt-debug - Debug commands |
8 |
|
9 |
Synopsis |
10 |
-------- |
11 |
|
12 |
**gnt-debug** {command} [arguments...] |
13 |
|
14 |
DESCRIPTION |
15 |
----------- |
16 |
|
17 |
The **gnt-debug** is used for debugging the Ganeti system. |
18 |
|
19 |
COMMANDS |
20 |
-------- |
21 |
|
22 |
ALLOCATOR |
23 |
~~~~~~~~~ |
24 |
|
25 |
**allocator** [--debug] [--dir *DIRECTION*] {--algorithm |
26 |
*ALLOCATOR* } [--mode *MODE*] [--mem *MEMORY*] [--disks *DISKS*] |
27 |
[--disk-template *TEMPLATE*] [--nics *NICS*] [--os-type *OS*] |
28 |
[--vcpus *VCPUS*] [--tags *TAGS*] {*instance*} |
29 |
|
30 |
Executes a test run of the *iallocator* framework. |
31 |
|
32 |
The command will build input for a given iallocator script (named |
33 |
with the ``--algorithm`` option), and either show this input data |
34 |
(if *DIRECTION* is ``in``) or run the iallocator script and show its |
35 |
output (if *DIRECTION* is ``out``). |
36 |
|
37 |
If the *MODE* is ``allocate``, then an instance definition is built |
38 |
from the other arguments and sent to the script, otherwise (*MODE* is |
39 |
``relocate``) an existing instance name must be passed as the first |
40 |
argument. |
41 |
|
42 |
This build of Ganeti will look for iallocator scripts in the following |
43 |
directories: @CUSTOM_IALLOCATOR_SEARCH_PATH@; for more details about |
44 |
this framework, see the HTML or PDF documentation. |
45 |
|
46 |
DELAY |
47 |
~~~~~ |
48 |
|
49 |
**delay** [--debug] [--no-master] [-n *NODE*...] {*duration*} |
50 |
|
51 |
Run a test opcode (a sleep) on the master and on selected nodes |
52 |
(via an RPC call). This serves no other purpose but to execute a |
53 |
test operation. |
54 |
|
55 |
The ``-n`` option can be given multiple times to select the nodes |
56 |
for the RPC call. By default, the delay will also be executed on |
57 |
the master, unless the ``--no-master`` option is passed. |
58 |
|
59 |
The *delay* argument will be interpreted as a floating point |
60 |
number. |
61 |
|
62 |
SUBMIT-JOB |
63 |
~~~~~~~~~~ |
64 |
|
65 |
**submit-job** [--verbose] [--timing-stats] [--job-repeat ``N``] |
66 |
[--op-repeat ``N``] {opcodes_file...} |
67 |
|
68 |
This command builds a list of opcodes from files in JSON format and |
69 |
submits a job per file to the master daemon. It can be used to test |
70 |
options that are not available via command line. |
71 |
|
72 |
The ``verbose`` option will additionally display the corresponding |
73 |
job IDs and the progress in waiting for the jobs; the |
74 |
``timing-stats`` option will show some overall statistics inluding |
75 |
the number of total opcodes, jobs submitted and time spent in each |
76 |
stage (submit, exec, total). |
77 |
|
78 |
The ``job-repeat`` and ``op-repeat`` options allow to submit |
79 |
multiple copies of the passed arguments; job-repeat will cause N |
80 |
copies of each job (input file) to be submitted (equivalent to |
81 |
passing the arguments N times) while op-repeat will cause N copies |
82 |
of each of the opcodes in the file to be executed (equivalent to |
83 |
each file containing N copies of the opcodes). |
84 |
|
85 |
TEST-JOBQUEUE |
86 |
~~~~~~~~~~~~~ |
87 |
|
88 |
**test-jobqueue** |
89 |
|
90 |
Executes a few tests on the job queue. This command might generate |
91 |
failed jobs deliberately. |
92 |
|
93 |
LOCKS |
94 |
~~~~~ |
95 |
|
96 |
| **locks** [--no-headers] [--separator=*SEPARATOR*] [-v] |
97 |
| [-o *[+]FIELD,...*] [--interval=*SECONDS*] |
98 |
|
99 |
Shows a list of locks in the master daemon. |
100 |
|
101 |
The ``--no-headers`` option will skip the initial header line. The |
102 |
``--separator`` option takes an argument which denotes what will be |
103 |
used between the output fields. Both these options are to help |
104 |
scripting. |
105 |
|
106 |
The ``-v`` option activates verbose mode, which changes the display of |
107 |
special field states (see **ganeti(7)**). |
108 |
|
109 |
The ``-o`` option takes a comma-separated list of output fields. |
110 |
The available fields and their meaning are: |
111 |
|
112 |
name |
113 |
Lock name |
114 |
|
115 |
mode |
116 |
Mode in which the lock is currently acquired (exclusive or shared) |
117 |
|
118 |
owner |
119 |
Current lock owner(s) |
120 |
|
121 |
pending |
122 |
Threads waiting for the lock |
123 |
|
124 |
|
125 |
If the value of the option starts with the character ``+``, the new |
126 |
fields will be added to the default list. This allows to quickly |
127 |
see the default list plus a few other fields, instead of retyping |
128 |
the entire list of fields. |
129 |
|
130 |
Use ``--interval`` to repeat the listing. A delay specified by the |
131 |
option value in seconds is inserted. |