gnt-debug(8)

πŸ“¦
version 3.1.0~rc2 Β· 4 versions
, in debian trixie, ubuntu questing, ubuntu resolute

πŸ’– gnt-debug πŸ’–

okay bestie, welcome to gnt-debug(8) β€” the debug commands page from Ganeti, and yes it's the Version 3.1.0~rc2 build, we're fancy. this whole page is literally a toolkit for poking at Ganeti's insides and watching what happens. slay. πŸ’…


✨ NAME ✨

gnt-debug β€” debug commands. that's the whole name. iconic brevity, no notes. πŸŽ€


🌸 SYNOPSIS 🌸

gnt-debug {command} [arguments...]

πŸ¦‹ DESCRIPTION πŸ¦‹

so like, the way that gnt-debug works is: it's used for debugging the Ganeti system. that's the vibe. you're the main character, the system is the side quest, and this is the tool that lets you peek behind the curtain. πŸ”₯


πŸ‘‘ COMMANDS πŸ‘‘

πŸŽ€ IALLOCATOR πŸŽ€

iallocator [--debug] [--dir direction] {--algorithm allocator } [--mode mode] [--mem memory] [--disks diskS] [--disk-template template] [--nics nics] [--os-type OS] [--vcpus vcpus] [--tags tags] {instance-name}

this one runs a test run of the iallocator framework. literally a dress rehearsal, no real consequences.

here's the tea: the command builds input for a given iallocator script (the one you named with --algorithm), and then it either

  • shows you that input data β€” if direction is in, or
  • runs the iallocator script and shows you its output β€” if direction is out.

and about the mode, bestie:

  • if mode is allocate, then an instance definition gets built out of the other arguments and sent off to the script 🌈
  • otherwise (mode is relocate), you have to pass an existing instance name as the first argument. no name, no relocate, periodt.

also, heads up: this build of Ganeti looks for iallocator scripts in these directories:

/usr/local/lib/ganeti/iallocators
/usr/lib/ganeti/iallocators

for more details about this framework, see the HTML or PDF documentation. iykyk πŸ“„


πŸ’€ DELAY πŸ’€

delay [--debug] [--no-master] [--interruptible] [-n node-name...] {duration}

this runs a test opcode (a sleep, yes literally a nap) on the master and on selected nodes via an RPC call. it serves no other purpose but to execute a test operation. that's it. it's a nap opcode. πŸ’€

  • -n β€” can be given multiple times to select the nodes for the RPC call. by default the delay also runs on the master too, unless...
  • --no-master β€” ...you pass this, and then the master gets to sit it out.
  • --interruptible β€” lets a running delay opcode be interrupted by communicating with a special domain socket. if any data is sent to that socket, the delay opcode terminates. but listen: if you use this option, no RPCs are performed, though locks are still acquired. important, don't skip that part.

and the delay argument? it gets interpreted as a floating point number. yes really. πŸ“


πŸ“¬ SUBMIT-JOB πŸ“¬

submit-job [--verbose] [--timing-stats] [--job-repeat n] [--op-repeat n] [--each] {opcodes_file...}

this command builds a list of opcodes from files in JSON format and submits a job per file to the master daemon. super useful for testing options that aren't available via command line. very "i found a backdoor and it's ✨documented✨" of it.

  • --verbose β€” additionally displays the corresponding job IDs and the progress while waiting for the jobs.
  • --timing-stats β€” shows some overall statistics, including the number of total opcodes, jobs submitted, and time spent in each stage (submit, exec, total). πŸ•
  • --job-repeat n β€” submits N copies of each job (input file). equivalent to passing the arguments N times.
  • --op-repeat n β€” causes N copies of each of the opcodes in the file to be executed. equivalent to each file containing N copies of the opcodes.
  • --each β€” submits each job separately, using N SubmitJob LUXI requests instead of one SubmitManyJobs request.

πŸ§ͺ TEST-JOBQUEUE πŸ§ͺ

test-jobqueue

executes a few tests on the job queue. and yes, this command might generate failed jobs deliberately β€” that's not a bug, bestie, that's the assignment. don't panic when you see red. πŸ™ˆ


πŸ” TEST_OSPARAMS πŸ”

test-osparams {--os-parameters-secret param=*value*...  }

tests secret os parameter transmission. it's giving secret. it's giving os params. it's giving exactly what it says on the tin. 🀫


πŸ”’ LOCKS πŸ”’

locks [--no-headers] [--separator=*separator*] [-v]
[-o [+]field,...] [--interval=*seconds*]

shows a list of locks in the master daemon. let's get into it:

  • --no-headers β€” skips the initial header line.
  • --separator β€” takes an argument that denotes what gets used between the output fields.

both of those exist to help scripting, so your scripts can be cute and clean. πŸ’…

  • -v β€” activates verbose mode, which changes the display of special field states (see ganeti(7)).
  • -o β€” takes a comma-separated list of output fields. here are the available fields and what they mean:
    • mode β€” mode in which the lock is currently acquired (exclusive or shared)
    • name β€” lock name
    • owner β€” current lock owner(s)
    • pending β€” threads waiting for the lock

oh and if the value of the option starts with the character +, the new fields get added to the default list instead of replacing it. that's so you can quickly see the default list plus a few extra fields without retyping the entire list of fields. efficiency queen behavior. πŸ‘‘

  • --interval β€” repeats the listing. a delay specified by the option value in seconds is inserted between rounds. πŸ”

πŸ—£οΈ METAD πŸ—£οΈ

metad echo text

tests the WConf daemon by invoking its echo function.

a given text is sent to Metad through RPC, echoed back by Metad, and printed to the console. it's basically shouting into a canyon but the canyon is a daemon. πŸ”οΈ


🌟 WCONFD 🌟

wconfd echo

wconfd echo text

tests the WConf daemon by invoking its echo function.

a given text is sent to WConfd through RPC, echoed back by WConfd, and printed to the console. same canyon, different daemon. 🫢

wconfd cleanuplocks

wconfd cleanuplocks

a request to clean up all stale locks is sent to WConfd. bye bye stale locks, we don't know her. 🧹

wconfd listlocks

wconfd listlocks job-id

a request to list the locks owned by the given job id is sent to WConfd, and the answer is displayed. very "who's holding what" of it. πŸ”

wconfd listalllocks

wconfd listalllocks

a request to list all locks in use, directly or indirectly, is sent to WConfd, and the answer is displayed.

wconfd listalllocks

wconfd listalllocks

a request to list all locks in use, directly or indirectly, together with their respective direct owners, is sent to WConfd, and the answer is displayed. (yes, same command name, extra detail. the owners are the moment. 😌)

wconfd flushconfig

wconfd flushconfig

a request to ensure that the configuration is fully distributed to the master candidates. so everyone's on the same page. communication is key besties. πŸ’Œ


πŸ› REPORTING BUGS πŸ›

found a bug? report bugs to the project's issue tracker, or contact the developers using the Ganeti mailing list. they don't bite. go tell them. πŸ“£


πŸ”— SEE ALSO πŸ”—

Ganeti overview and specifications:

Ganeti commands:

Ganeti daemons:

Ganeti htools:


Copyright (C) 2006-2015 Google Inc. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

okay that's the whole page bestie, go debug something and be iconic doing it. πŸ¦‹ this was gnt-debug(8) from Ganeti, Version 3.1.0~rc2 β€” thanks for reading, mwah. πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from