ganeti-3.1: Cluster-based virtualization management software
Safe HaskellSafe-Inferred
LanguageHaskell2010

Ganeti.Locking.Locks

Description

Ganeti lock structure

Synopsis

Documentation

data GanetiLocks #

The type of Locks available in Ganeti. The order of this type is the lock oder.

Constructors

ClusterLockSet 
BGL 
InstanceLockSet 
Instance String 
NodeGroupLockSet 
NodeGroup String 
NodeLockSet 
Node String 
NodeResLockSet 
NodeRes String 
NetworkLockSet 
Network String 
ConfigLock

A lock used for a transitional period when WConfd keeps the state of the configuration, but all the operations are still performed on the Python side.

Instances

Instances details
Show GanetiLocks # 
Instance details

Defined in Ganeti.Locking.Locks

Methods

showsPrec :: Int -> GanetiLocks -> ShowS

show :: GanetiLocks -> String

showList :: [GanetiLocks] -> ShowS

Lock GanetiLocks # 
Instance details

Defined in Ganeti.Locking.Locks

Eq GanetiLocks # 
Instance details

Defined in Ganeti.Locking.Locks

Methods

(==) :: GanetiLocks -> GanetiLocks -> Bool

(/=) :: GanetiLocks -> GanetiLocks -> Bool

Ord GanetiLocks # 
Instance details

Defined in Ganeti.Locking.Locks

JSON GanetiLocks # 
Instance details

Defined in Ganeti.Locking.Locks

Methods

readJSON :: JSValue -> Result GanetiLocks

showJSON :: GanetiLocks -> JSValue

readJSONs :: JSValue -> Result [GanetiLocks]

showJSONs :: [GanetiLocks] -> JSValue

lockName :: GanetiLocks -> String #

Provide the String representation of a lock

data ClientType #

Type of entities capable of owning locks. Usually, locks are owned by jobs. However, occassionally other tasks need locks (currently, e.g., to lock the configuration). These are identified by a unique name, reported to WConfD as a strig.

Constructors

ClientOther String 
ClientJob JobId 

Instances

Instances details
Show ClientType # 
Instance details

Defined in Ganeti.Locking.Locks

Methods

showsPrec :: Int -> ClientType -> ShowS

show :: ClientType -> String

showList :: [ClientType] -> ShowS

Eq ClientType # 
Instance details

Defined in Ganeti.Locking.Locks

Methods

(==) :: ClientType -> ClientType -> Bool

(/=) :: ClientType -> ClientType -> Bool

Ord ClientType # 
Instance details

Defined in Ganeti.Locking.Locks

JSON ClientType # 
Instance details

Defined in Ganeti.Locking.Locks

Methods

readJSON :: JSValue -> Result ClientType

showJSON :: ClientType -> JSValue

readJSONs :: JSValue -> Result [ClientType]

showJSONs :: [ClientType] -> JSValue

data ClientId #

A client is identified as a job id, thread id, a path to its process identifier file, and its process id.

The JobId isn't enough to identify a client as the master daemon also handles client calls that aren't jobs, but which use the configuration. These taks are identified by a unique name, reported to WConfD as a string.

Constructors

ClientId 

Fields

Instances

Instances details
Show ClientId # 
Instance details

Defined in Ganeti.Locking.Locks

Methods

showsPrec :: Int -> ClientId -> ShowS

show :: ClientId -> String

showList :: [ClientId] -> ShowS

Eq ClientId # 
Instance details

Defined in Ganeti.Locking.Locks

Methods

(==) :: ClientId -> ClientId -> Bool

(/=) :: ClientId -> ClientId -> Bool

Ord ClientId # 
Instance details

Defined in Ganeti.Locking.Locks

Methods

compare :: ClientId -> ClientId -> Ordering

(<) :: ClientId -> ClientId -> Bool

(<=) :: ClientId -> ClientId -> Bool

(>) :: ClientId -> ClientId -> Bool

(>=) :: ClientId -> ClientId -> Bool

max :: ClientId -> ClientId -> ClientId

min :: ClientId -> ClientId -> ClientId

JSON ClientId # 
Instance details

Defined in Ganeti.Locking.Locks

Methods

readJSON :: JSValue -> Result ClientId

showJSON :: ClientId -> JSValue

readJSONs :: JSValue -> Result [ClientId]

showJSONs :: [ClientId] -> JSValue

type GanetiLockWaiting = LockWaiting GanetiLocks ClientId Integer #

The type of lock Allocations in Ganeti. In Ganeti, the owner of locks are jobs.

data LockLevel #

The levels, the locks belong to.

Constructors

LevelCluster 
LevelInstance 
LevelNodeGroup 
LevelNode 
LevelNodeRes 
LevelNetwork 
LevelConfig

A transitional level for internal configuration locks

Instances

Instances details
Enum LockLevel # 
Instance details

Defined in Ganeti.Locking.Locks

Show LockLevel # 
Instance details

Defined in Ganeti.Locking.Locks

Methods

showsPrec :: Int -> LockLevel -> ShowS

show :: LockLevel -> String

showList :: [LockLevel] -> ShowS

Eq LockLevel # 
Instance details

Defined in Ganeti.Locking.Locks

Methods

(==) :: LockLevel -> LockLevel -> Bool

(/=) :: LockLevel -> LockLevel -> Bool

JSON LockLevel # 
Instance details

Defined in Ganeti.Locking.Locks

Methods

readJSON :: JSValue -> Result LockLevel

showJSON :: LockLevel -> JSValue

readJSONs :: JSValue -> Result [LockLevel]

showJSONs :: [LockLevel] -> JSValue

lockLevel :: GanetiLocks -> LockLevel #

For a lock, provide its level.