Safe Haskell | Safe-Infered |
---|
Ganeti lock structure
- data GanetiLocks
- = ClusterLockSet
- | BGL
- | InstanceLockSet
- | Instance String
- | NodeAllocLockSet
- | NAL
- | NodeGroupLockSet
- | NodeGroup String
- | NodeLockSet
- | Node String
- | NodeResLockSet
- | NodeRes String
- | NetworkLockSet
- | Network String
- | ConfigLock
- lockName :: GanetiLocks -> String
- lockFromName :: String -> Result GanetiLocks
- data LockLevel
- lockLevelName :: LockLevel -> String
- lockLevelFromName :: String -> Result LockLevel
- lockLevel :: GanetiLocks -> LockLevel
- data ClientType
- = ClientOther String
- | ClientJob JobId
- data ClientId = ClientId {
- ciIdentifier :: ClientType
- ciLockFile :: FilePath
- ciPid :: ProcessID
- clientIdFromJSON :: JSValue -> Result ClientId
- type GanetiLockWaiting = LockWaiting GanetiLocks ClientId Integer
Documentation
data GanetiLocks Source
The type of Locks available in Ganeti. The order of this type is the lock oder.
ClusterLockSet | |
BGL | |
InstanceLockSet | |
Instance String | |
NodeAllocLockSet | |
NAL | |
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. |
Eq GanetiLocks | |
Ord GanetiLocks | |
Show GanetiLocks | |
Arbitrary GanetiLocks | |
JSON GanetiLocks | |
Lock GanetiLocks |
lockName :: GanetiLocks -> StringSource
Provide the String representation of a lock
lockFromName :: String -> Result GanetiLocksSource
The levels, the locks belong to.
LevelCluster | |
LevelInstance | |
LevelNodeAlloc | |
LevelNodeGroup | |
LevelNode | |
LevelNodeRes | |
LevelNetwork | |
LevelConfig | A transitional level for internal configuration locks |
lockLevelName :: LockLevel -> StringSource
lockLevelFromName :: String -> Result LockLevelSource
lockLevel :: GanetiLocks -> LockLevelSource
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.
ClientOther String | |
ClientJob JobId |
Eq ClientType | |
Ord ClientType | |
Show ClientType | |
Arbitrary ClientType | |
JSON ClientType |
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.
ClientId | |
|
clientIdFromJSON :: JSValue -> Result ClientIdSource
type GanetiLockWaiting = LockWaiting GanetiLocks ClientId IntegerSource
The type of lock Allocations in Ganeti. In Ganeti, the owner of locks are jobs.