module documentation

Module implementing the Ganeti locking code.

Class PipeCondition Group-only non-polling condition with counters.
Class SharedLock Implements a shared lock.
Class SingleNotifyPipeCondition Condition which can only be notified once.
Function ssynchronized Shared Synchronization decorator.
Constant ALL_SET Undocumented
Constant BGL Undocumented
Constant LEVEL_CLUSTER Undocumented
Constant LEVEL_INSTANCE Undocumented
Constant LEVEL_NAMES Undocumented
Constant LEVEL_NETWORK Undocumented
Constant LEVEL_NODE Undocumented
Constant LEVEL_NODE_RES Undocumented
Constant LEVEL_NODEGROUP Undocumented
Constant LEVELS Undocumented
Constant LEVELS_MOD Undocumented
Constant LOCKSET_NAME Undocumented
Class _BaseCondition Base class containing common code for conditions.
Class _PipeConditionWithMode No class docstring; 0/1 instance variable, 0/1 class variable, 1/1 method documented
Class _SingleNotifyPipeConditionWaiter Helper class for SingleNotifyPipeCondition
Exception _AcquireTimeout Internal exception to abort an acquire on a timeout.
Function _TimeoutZero Returns the number zero.
Constant _DEFAULT_PRIORITY Undocumented
Constant _DELETED_TEXT Undocumented
Constant _EXCLUSIVE_TEXT Undocumented
Constant _LOCK_ACQUIRE_MIN_TIMEOUT Undocumented
Constant _SHARED_TEXT Undocumented
def ssynchronized(mylock, shared=0):

Shared Synchronization decorator.

Calls the function holding the given lock, either in exclusive or shared mode. It requires the passed lock to be a SharedLock (or support its semantics).

Parameters
mylock:lockable object or stringlock to acquire or class member name of the lock to acquire
sharedUndocumented
ALL_SET =

Undocumented

Value
None
BGL: str =

Undocumented

Value
'BGL'
LEVEL_CLUSTER =

Undocumented

LEVEL_INSTANCE =

Undocumented

LEVEL_NAMES =

Undocumented

Value
{LEVEL_CLUSTER: 'cluster',
 LEVEL_INSTANCE: 'instance',
 LEVEL_NODEGROUP: 'nodegroup',
 LEVEL_NODE: 'node',
 LEVEL_NODE_RES: 'node-res',
 LEVEL_NETWORK: 'network'}
LEVEL_NETWORK =

Undocumented

LEVEL_NODE =

Undocumented

LEVEL_NODE_RES =

Undocumented

LEVEL_NODEGROUP =

Undocumented

LOCKSET_NAME: str =

Undocumented

Value
'[lockset]'
def _TimeoutZero():

Returns the number zero.

_DEFAULT_PRIORITY: int =

Undocumented

Value
0
_DELETED_TEXT: str =

Undocumented

Value
'deleted'
_EXCLUSIVE_TEXT: str =

Undocumented

Value
'exclusive'
_LOCK_ACQUIRE_MIN_TIMEOUT =

Undocumented

Value
1.0/1000
_SHARED_TEXT: str =

Undocumented

Value
'shared'