Script gnt_debug
[hide private]
[frames] | no frames]

Script gnt_debug

Debugging commands

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

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


Function Details [hide private]

Delay(opts, args)

 

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)

 

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)

 

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)

 

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,], "[opts...] <d\
uration>", "Executes a TestDelay OpCode"), 'submit-job':(GenericOpCode\
s, [ArgFile(min= 1)], [VERBOSE_OPT, cli_option("--op-repeat", type= "i\
...