Package ganeti :: Package tools :: Module burnin :: Class JobHandler
[hide private]
[frames] | no frames]

Class JobHandler

source code


Class for handling Ganeti jobs.

Instance Methods [hide private]
 
__init__(self)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
MaybeRetry(self, retry_count, msg, fn, *args)
Possibly retry a given function execution.
source code
 
_ExecOp(self, *ops)
Execute one or more opcodes and manage the exec buffer.
source code
 
ExecOp(self, retry, *ops)
Execute one or more opcodes and manage the exec buffer.
source code
 
ExecOrQueue(self, name, ops, post_process=None)
Execute an opcode and manage the exec buffer.
source code
 
StartBatch(self, retry)
Start a new batch of jobs.
source code
 
CommitQueue(self)
Execute all submitted opcodes in case of parallel burnin
source code
 
ExecJobSet(self, jobs)
Execute a set of jobs and return once all are done.
source code

Inherited from FeedbackAccumulator: ClearFeedbackBuf, Feedback, GetFeedbackBuf

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  queued_ops = []
  queue_retry = False

Inherited from FeedbackAccumulator: opts

Inherited from FeedbackAccumulator (private): _feed_buf

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

MaybeRetry(self, retry_count, msg, fn, *args)

source code 

Possibly retry a given function execution.

Parameters:
  • retry_count (int) - retry counter:
    • 0: non-retryable action
    • 1: last retry for a retryable action
    • MAX_RETRIES: original try for a retryable action
  • msg (str) - the kind of the operation
  • fn (callable) - the function to be called

_ExecOp(self, *ops)

source code 

Execute one or more opcodes and manage the exec buffer.

Returns:
if only opcode has been passed, we return its result; otherwise we return the list of results

ExecOp(self, retry, *ops)

source code 

Execute one or more opcodes and manage the exec buffer.

Returns:
if only opcode has been passed, we return its result; otherwise we return the list of results

StartBatch(self, retry)

source code 

Start a new batch of jobs.

Parameters:
  • retry - whether this is a retryable batch

ExecJobSet(self, jobs)

source code 

Execute a set of jobs and return once all are done.

The method will return the list of results, if all jobs are successful. Otherwise, OpExecError will be raised from within cli.py.