ganeti
Safe HaskellNone

Ganeti.Locking.Locks

Description

Ganeti lock structure

Synopsis

Documentation

data GanetiLocks Source #

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
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

Show GanetiLocks # 
Instance details

Defined in Ganeti.Locking.Locks

Methods

showsPrec :: Int -> GanetiLocks -> ShowS

show :: GanetiLocks -> String

showList :: [GanetiLocks] -> ShowS

JSON GanetiLocks # 
Instance details

Defined in Ganeti.Locking.Locks

Methods

readJSON :: JSValue -> Result GanetiLocks

showJSON :: GanetiLocks -> JSValue

readJSONs :: JSValue -> Result [GanetiLocks]

showJSONs :: [GanetiLocks] -> JSValue

Lock GanetiLocks # 
Instance details

Defined in Ganeti.Locking.Locks

Arbitrary GanetiLocks 
Instance details

Defined in Test.Ganeti.Locking.Locks

lockName :: GanetiLocks -> String Source #

Provide the String representation of a lock

lockFromName :: String -> Result GanetiLocks Source #

Obtain a lock from its name.

data LockLevel Source #

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

Eq LockLevel # 
Instance details

Defined in Ganeti.Locking.Locks

Methods

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

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

Show LockLevel # 
Instance details

Defined in Ganeti.Locking.Locks

Methods

showsPrec :: Int -> LockLevel -> ShowS

show :: LockLevel -> String

showList :: [LockLevel] -> ShowS

JSON LockLevel # 
Instance details

Defined in Ganeti.Locking.Locks

Methods

readJSON :: JSValue -> Result LockLevel

showJSON :: LockLevel -> JSValue

readJSONs :: JSValue -> Result [LockLevel]

showJSONs :: [LockLevel] -> JSValue

Arbitrary LockLevel 
Instance details

Defined in Test.Ganeti.Locking.Locks

lockLevelName :: LockLevel -> String Source #

Provide the names of the lock levels.

lockLevelFromName :: String -> Result LockLevel Source #

Obtain a lock level from its name/

lockLevel :: GanetiLocks -> LockLevel Source #

For a lock, provide its level.

data ClientType Source #

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
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

Show ClientType # 
Instance details

Defined in Ganeti.Locking.Locks

Methods

showsPrec :: Int -> ClientType -> ShowS

show :: ClientType -> String

showList :: [ClientType] -> ShowS

JSON ClientType # 
Instance details

Defined in Ganeti.Locking.Locks

Methods

readJSON :: JSValue -> Result ClientType

showJSON :: ClientType -> JSValue

readJSONs :: JSValue -> Result [ClientType]

showJSONs :: [ClientType] -> JSValue

Arbitrary ClientType 
Instance details

Defined in Test.Ganeti.Locking.Locks

data ClientId Source #

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
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

Show ClientId # 
Instance details

Defined in Ganeti.Locking.Locks

Methods

showsPrec :: Int -> ClientId -> ShowS

show :: ClientId -> String

showList :: [ClientId] -> ShowS

JSON ClientId # 
Instance details

Defined in Ganeti.Locking.Locks

Methods

readJSON :: JSValue -> Result ClientId

showJSON :: ClientId -> JSValue

readJSONs :: JSValue -> Result [ClientId]

showJSONs :: [ClientId] -> JSValue

Arbitrary ClientId 
Instance details

Defined in Test.Ganeti.Locking.Locks

clientIdFromJSON :: JSValue -> Result ClientId Source #

Obtain the ClientID from its JSON representation.

type GanetiLockWaiting = LockWaiting GanetiLocks ClientId Integer Source #

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