module documentation

Module implementing the logic behind the cluster operations

This module implements the logic for doing operations in the cluster. There are two kinds of classes defined:

  • logical units, which know how to deal with their specific opcode only
  • the processor, which dispatches the opcodes to their logical units
Class LockAttemptTimeoutStrategy Class with lock acquire timeout strategy.
Class OpExecCbBase Base class for OpCode execution callbacks.
Class Processor Object which runs OpCodes
Exception LockAcquireTimeout Exception to report timeouts on acquiring locks.
Variable lusExecuting Undocumented
Variable sighupReceived Undocumented
Function _CalculateLockAttemptTimeouts Calculate timeouts for lock attempts.
Function _CheckSecretParameters Check if secret parameters are expected, but missing.
Function _ComputeDispatchTable Computes the opcode-to-lu dispatch table.
Function _FailingSubmitManyJobs Implementation of OpExecCbBase.SubmitManyJobs to raise an exception.
Function _LockList If 'names' is a string, make it a single-element list.
Function _LUNameForOpName Computes the LU name for a given OpCode name.
Function _ProcessResult Examines opcode result.
Function _SetBaseOpParams Copies basic opcode parameters.
Constant _LU_PREFIX Undocumented
Constant _OP_PREFIX Undocumented
lusExecuting: list[int] =

Undocumented

sighupReceived: list[bool] =

Undocumented

def _CalculateLockAttemptTimeouts():

Calculate timeouts for lock attempts.

def _CheckSecretParameters(op):

Check if secret parameters are expected, but missing.

def _ComputeDispatchTable():

Computes the opcode-to-lu dispatch table.

def _FailingSubmitManyJobs(_):

Implementation of OpExecCbBase.SubmitManyJobs to raise an exception.

def _LockList(names):

If 'names' is a string, make it a single-element list.

Parameters
names:list or string or NoneTypeLock names
Returns
a list of stringsif 'names' argument is an iterable, a list of it; if it's a string, make it a one-element list; if locking.ALL_SET, locking.ALL_SET
def _LUNameForOpName(opname):

Computes the LU name for a given OpCode name.

def _ProcessResult(submit_fn, op, result):

Examines opcode result.

If necessary, additional processing on the result is done.

def _SetBaseOpParams(src, defcomment, dst):

Copies basic opcode parameters.

Parameters
src:opcodes.OpCodeSource opcode
defcomment:stringComment to specify if not already given
dst:opcodes.OpCodeDestination opcode
_LU_PREFIX: str =

Undocumented

Value
'LU'
_OP_PREFIX: str =

Undocumented

Value
'Op'