|
|
|
Description |
Some common types.
|
|
Synopsis |
|
type Idx = Int | | type Ndx = Int | | type Gdx = Int | | type NameAssoc = Map String Int | | type Score = Double | | type Weight = Double | | type GroupID = String | | defaultGroupID :: GroupID | | | | diskTemplateFromRaw :: forall m[aohd]. Monad m[aohd] => String -> m[aohd] DiskTemplate | | diskTemplateToRaw :: DiskTemplate -> String | | | | templateMirrorType :: DiskTemplate -> MirrorType | | | | allocPolicyFromRaw :: forall m[aopC]. Monad m[aopC] => String -> m[aopC] AllocPolicy | | allocPolicyToRaw :: AllocPolicy -> String | | | | instanceStatusFromRaw :: forall m[aox0]. Monad m[aox0] => String -> m[aox0] InstanceStatus | | instanceStatusToRaw :: InstanceStatus -> String | | data RSpec = RSpec {} | | data AllocInfo = AllocInfo {} | | type AllocStats = (AllocInfo, AllocInfo, AllocInfo) | | data ISpec = ISpec {} | | loadISpec :: JSValue -> Result ISpec | | saveISpec :: ISpec -> JSValue | | toDictISpec :: ISpec -> [(String, JSValue)] | | defMinISpec :: ISpec | | defStdISpec :: ISpec | | defMaxISpec :: ISpec | | data IPolicy = IPolicy {} | | loadIPolicy :: JSValue -> Result IPolicy | | saveIPolicy :: IPolicy -> JSValue | | toDictIPolicy :: IPolicy -> [(String, JSValue)] | | rspecFromISpec :: ISpec -> RSpec | | defIPolicy :: IPolicy | | data DynUtil = DynUtil {} | | zeroUtil :: DynUtil | | baseUtil :: DynUtil | | addUtil :: DynUtil -> DynUtil -> DynUtil | | subUtil :: DynUtil -> DynUtil -> DynUtil | | type Placement = (Idx, Ndx, Ndx, IMove, Score) | | | | type MoveJob = ([Ndx], Idx, IMove, [String]) | | unknownField :: String | | type JobSet = [MoveJob] | | connTimeout :: Int | | queryTimeout :: Int | | defReservedDiskRatio :: Double | | unitMem :: Int | | unitDsk :: Int | | unitCpu :: Int | | | | type FailStats = [(FailMode, Int)] | | | | opToResult :: OpResult a -> Result a | | class Element a where | | | | | evacModeFromRaw :: forall m[apmR]. Monad m[apmR] => String -> m[apmR] EvacMode | | evacModeToRaw :: EvacMode -> String |
|
|
Documentation |
|
|
The instance index type.
|
|
|
The node index type.
|
|
|
The group index type.
|
|
type NameAssoc = Map String Int | Source |
|
The type used to hold name-to-idx mappings.
|
|
|
A separate name for the cluster score type.
|
|
|
A separate name for a weight metric.
|
|
|
The Group UUID type.
|
|
|
Default group UUID (just a string, not a real UUID).
|
|
|
Instance disk template type.
| Constructors | DTDiskless | | DTFile | | DTSharedFile | | DTPlain | | DTBlock | | DTDrbd8 | | DTRbd | |
|
|
|
diskTemplateFromRaw :: forall m[aohd]. Monad m[aohd] => String -> m[aohd] DiskTemplate | Source |
|
|
|
|
|
Mirroring type.
| Constructors | MirrorNone | No mirroring/movability
| MirrorInternal | DRBD-type mirroring
| MirrorExternal | Shared-storage type mirroring
|
|
|
|
|
Correspondence between disk template and mirror type.
|
|
|
The Group allocation policy type.
Note that the order of constructors is important as the automatic
Ord instance will order them in the order they are defined, so when
changing this data type be careful about the interaction with the
desired sorting order.
| Constructors | AllocPreferred | | AllocLastResort | | AllocUnallocable | |
|
|
|
allocPolicyFromRaw :: forall m[aopC]. Monad m[aopC] => String -> m[aopC] AllocPolicy | Source |
|
|
|
|
|
The Instance real state type.
| Constructors | AdminDown | | AdminOffline | | ErrorDown | | ErrorUp | | NodeDown | | NodeOffline | | Running | | WrongNode | |
|
|
|
|
|
|
|
|
The resource spec type.
| Constructors | RSpec | | rspecCpu :: Int | Requested VCPUs
| rspecMem :: Int | Requested memory
| rspecDsk :: Int | Requested disk
|
|
|
|
|
|
Allocation stats type. This is used instead of RSpec (which was
used at first), because we need to track more stats. The actual
data can refer either to allocated, or available, etc. values
depending on the context. See also
Cluster.computeAllocationDelta.
| Constructors | AllocInfo | | allocInfoVCpus :: Int | VCPUs
| allocInfoNCpus :: Double | Normalised CPUs
| allocInfoMem :: Int | Memory
| allocInfoDisk :: Int | Disk
|
|
|
|
|
|
Currently used, possibly to allocate, unallocable.
|
|
|
Instance specification type.
| Constructors | ISpec | | iSpecMemorySize :: Int | | iSpecCpuCount :: Int | | iSpecDiskSize :: Int | | iSpecDiskCount :: Int | | iSpecNicCount :: Int | | iSpecSpindleUse :: Int | |
|
|
|
|
|
|
|
|
|
|
|
The default minimum ispec.
|
|
|
The default standard ispec.
|
|
|
The default max ispec.
|
|
|
Instance policy type.
| Constructors | IPolicy | | iPolicyStdSpec :: ISpec | | iPolicyMinSpec :: ISpec | | iPolicyMaxSpec :: ISpec | | iPolicyDiskTemplates :: [DiskTemplate] | | iPolicyVcpuRatio :: Double | | iPolicySpindleRatio :: Double | |
|
|
|
|
|
|
|
|
|
|
|
Converts an ISpec type to a RSpec one.
|
|
|
The default instance policy.
|
|
|
The dynamic resource specs of a machine (i.e. load or load
capacity, as opposed to size).
| Constructors | DynUtil | | cpuWeight :: Weight | Standardised CPU usage
| memWeight :: Weight | Standardised memory load
| dskWeight :: Weight | Standardised disk I/O usage
| netWeight :: Weight | Standardised network usage
|
|
|
|
|
|
Initial empty utilisation.
|
|
|
Base utilisation (used when no actual utilisation data is
supplied).
|
|
|
Sum two utilisation records.
|
|
|
Substracts one utilisation record from another.
|
|
|
The description of an instance placement. It contains the
instance index, the new primary and secondary node, the move being
performed and the score of the cluster after the move.
|
|
|
An instance move definition.
| Constructors | Failover | Failover the instance (f)
| FailoverToAny Ndx | Failover to a random node
(fa:np), for shared storage
| ReplacePrimary Ndx | Replace primary (f, r:np, f)
| ReplaceSecondary Ndx | Replace secondary (r:ns)
| ReplaceAndFailover Ndx | Replace secondary, failover (r:np, f)
| FailoverAndReplace Ndx | Failover, replace secondary (f, r:ns)
|
|
|
|
|
Formatted solution output for one move (involved nodes and
commands.
|
|
|
Unknown field in table output.
|
|
|
A list of command elements.
|
|
|
Connection timeout (when using non-file methods).
|
|
|
The default timeout for queries (when using non-file methods).
|
|
defReservedDiskRatio :: Double | Source |
|
Default max disk usage ratio.
|
|
|
Base memory unit.
|
|
|
Base disk unit.
|
|
|
Base vcpus unit.
|
|
|
Reason for an operation's falure.
| Constructors | FailMem | Failed due to not enough RAM
| FailDisk | Failed due to not enough disk
| FailCPU | Failed due to not enough CPU capacity
| FailN1 | Failed due to not passing N1 checks
| FailTags | Failed due to tag exclusion
|
|
|
|
|
List with failure statistics.
|
|
|
Either-like data-type customized for our failure modes.
The failure values for this monad track the specific allocation
failures, so this is not a general error-monad (compare with the
Result data type). One downside is that this type cannot encode a
generic failure mode, hence fail for this monad is not defined
and will cause an exception.
| Constructors | OpFail FailMode | Failed operation
| OpGood a | Success operation
|
|
|
|
|
Conversion from OpResult to Result.
|
|
|
A generic class for items that have updateable names and indices.
| | Methods | | Returns the name of the element
| | allNames :: a -> [String] | Source |
| Returns all the known names of the element
| | | Returns the index of the element
| | setAlias :: a -> String -> a | Source |
| Updates the alias of the element
| | computeAlias :: String -> a -> a | Source |
| Compute the alias by stripping a given suffix (domain) from
the name
| | | Updates the index of the element
|
|
|
|
|
The iallocator node-evacuate evac_mode type.
| Constructors | ChangePrimary | | ChangeSecondary | | ChangeAll | |
|
|
|
evacModeFromRaw :: forall m[apmR]. Monad m[apmR] => String -> m[apmR] EvacMode | Source |
|
|
|
|
Produced by Haddock version 2.6.0 |