Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Ganeti.Locking.Locks
Description
Ganeti lock structure
Synopsis
- data GanetiLocks
- = ClusterLockSet
- | BGL
- | InstanceLockSet
- | Instance String
- | NodeGroupLockSet
- | NodeGroup String
- | NodeLockSet
- | Node String
- | NodeResLockSet
- | NodeRes String
- | NetworkLockSet
- | Network String
- | ConfigLock
- lockName :: GanetiLocks -> String
- data ClientType
- = ClientOther String
- | ClientJob JobId
- data ClientId = ClientId {
- ciIdentifier :: ClientType
- ciLockFile :: FilePath
- ciPid :: ProcessID
- type GanetiLockWaiting = LockWaiting GanetiLocks ClientId Integer
- data LockLevel
- lockLevel :: GanetiLocks -> LockLevel
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
Show GanetiLocks # | |
Defined in Ganeti.Locking.Locks Methods showsPrec :: Int -> GanetiLocks -> ShowS show :: GanetiLocks -> String showList :: [GanetiLocks] -> ShowS | |
Lock GanetiLocks # | |
Defined in Ganeti.Locking.Locks Methods lockImplications :: GanetiLocks -> [GanetiLocks] # | |
Eq GanetiLocks # | |
Defined in Ganeti.Locking.Locks | |
Ord GanetiLocks # | |
Defined in Ganeti.Locking.Locks Methods compare :: GanetiLocks -> GanetiLocks -> Ordering (<) :: GanetiLocks -> GanetiLocks -> Bool (<=) :: GanetiLocks -> GanetiLocks -> Bool (>) :: GanetiLocks -> GanetiLocks -> Bool (>=) :: GanetiLocks -> GanetiLocks -> Bool max :: GanetiLocks -> GanetiLocks -> GanetiLocks min :: GanetiLocks -> GanetiLocks -> GanetiLocks | |
JSON GanetiLocks # | |
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
Show ClientType # | |
Defined in Ganeti.Locking.Locks Methods showsPrec :: Int -> ClientType -> ShowS show :: ClientType -> String showList :: [ClientType] -> ShowS | |
Eq ClientType # | |
Defined in Ganeti.Locking.Locks | |
Ord ClientType # | |
Defined in Ganeti.Locking.Locks Methods compare :: ClientType -> ClientType -> Ordering (<) :: ClientType -> ClientType -> Bool (<=) :: ClientType -> ClientType -> Bool (>) :: ClientType -> ClientType -> Bool (>=) :: ClientType -> ClientType -> Bool max :: ClientType -> ClientType -> ClientType min :: ClientType -> ClientType -> ClientType | |
JSON ClientType # | |
Defined in Ganeti.Locking.Locks Methods readJSON :: JSValue -> Result ClientType showJSON :: ClientType -> JSValue readJSONs :: JSValue -> Result [ClientType] showJSONs :: [ClientType] -> JSValue |
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
|
type GanetiLockWaiting = LockWaiting GanetiLocks ClientId Integer #
The type of lock Allocations in Ganeti. In Ganeti, the owner of locks are jobs.
The levels, the locks belong to.
Constructors
LevelCluster | |
LevelInstance | |
LevelNodeGroup | |
LevelNode | |
LevelNodeRes | |
LevelNetwork | |
LevelConfig | A transitional level for internal configuration locks |
Instances
Enum LockLevel # | |
Defined in Ganeti.Locking.Locks | |
Show LockLevel # | |
Eq LockLevel # | |
JSON LockLevel # | |
lockLevel :: GanetiLocks -> LockLevel #
For a lock, provide its level.