Package ganeti :: Package client :: Module gnt_debug
[hide private]
[frames] | no frames]

Module gnt_debug

source code

Debugging commands

Classes [hide private]
  _JobQueueTestReporter
Functions [hide private]
int
Delay(opts, args)
Sleeps for a while
source code
int
GenericOpCodes(opts, args)
Send any opcode to the master.
source code
int
TestAllocator(opts, args)
Runs the test allocator opcode.
source code
 
_TestJobDependency(opts)
Tests job dependencies.
source code
 
_TestJobSubmission(opts)
Tests submitting jobs.
source code
 
TestJobqueue(opts, _)
Runs a few tests on the job queue.
source code
int
ListLocks(opts, args)
List all locks.
source code
 
Main() source code
Variables [hide private]
  _LIST_LOCKS_DEF_FIELDS = ["name", "mode", "owner", "pending",]
Default fields for ListLocks
  commands = {"delay":(Delay, [ArgUnknown(min= 1, max= 1)], [cli...
  aliases = {"allocator": "iallocator",}
dictionary with aliases for commands

Imports: simplejson, time, socket, logging, cli, constants, opcodes, utils, errors, compat, ht


Function Details [hide private]

Delay(opts, args)

source code 

Sleeps for a while

Parameters:
  • opts - the command line options selected by the user
  • args (list) - should contain only one element, the duration the sleep
Returns: int
the desired exit code

GenericOpCodes(opts, args)

source code 

Send any opcode to the master.

Parameters:
  • opts - the command line options selected by the user
  • args (list) - should contain only one element, the path of the file with the opcode definition
Returns: int
the desired exit code

TestAllocator(opts, args)

source code 

Runs the test allocator opcode.

Parameters:
  • opts - the command line options selected by the user
  • args (list) - should contain only one element, the iallocator name
Returns: int
the desired exit code

ListLocks(opts, args)

source code 

List all locks.

Parameters:
  • opts - the command line options selected by the user
  • args (list) - should be an empty list
Returns: int
the desired exit code

Variables Details [hide private]

commands

Value:
{"delay":(Delay, [ArgUnknown(min= 1, max= 1)], [cli_option("--no-maste\
r", dest= "on_master", default= True, action= "store_false", help= "Do\
 not sleep in the master code"), cli_option("-n", dest= "on_nodes", de\
fault= [], action= "append", help= "Select nodes to sleep on"), cli_op\
tion("-r", "--repeat", type= "int", default= "0", dest= "repeat", help\
= "Number of times to repeat the sleep"), DRY_RUN_OPT, PRIORITY_OPT,],\
 "[opts...] <duration>", "Executes a TestDelay OpCode"), "submit-job":\
(GenericOpCodes, [ArgFile(min= 1)], [VERBOSE_OPT, cli_option("--op-rep\
...