Module mcpu
source code
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
|
_CalculateLockAttemptTimeouts()
Calculate timeouts for lock attempts. |
source code
|
|
|
_LUNameForOpName(opname)
Computes the LU name for a given OpCode name. |
source code
|
|
|
_ComputeDispatchTable()
Computes the opcode-to-lu dispatch table. |
source code
|
|
|
|
|
|
|
|
dict(node: (fail_msg, offline, hooks_results))
|
|
|
_OP_PREFIX = "Op"
|
|
_LU_PREFIX = "LU"
|
Imports:
logging,
random,
time,
itertools,
opcodes,
constants,
errors,
cmdlib,
locking,
utils,
compat
Copies basic opcode parameters.
- Parameters:
src (opcodes.OpCode) - Source opcode
defcomment (string) - Comment to specify if not already given
dst (opcodes.OpCode) - Destination opcode
|
Examines opcode result.
If necessary, additional processing on the result is done.
|
Function to convert RPC results to the format expected by
HooksMaster.
- Parameters:
- Returns: dict(node: (fail_msg, offline, hooks_results))
- RPC results unpacked according to the format expected by
L({mcpu.HooksMaster}
|