|
|
|
Description |
Some common types.
|
|
Synopsis |
|
|
|
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.
|
|
|
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 | This is the normal status, the group
should be used normally during allocations
| AllocLastResort | This group should be used only as
last-resort, after the preferred groups
| AllocUnallocable | This group must not be used for new
allocations
|
|
|
|
|
Convert a string to an alloc policy.
|
|
|
Convert an alloc policy to the Ganeti string equivalent.
|
|
|
The resource spec type.
| Constructors | RSpec | | rspecCpu :: Int | Requested VCPUs
| rspecMem :: Int | Requested memory
| rspecDsk :: Int | Requested disk
|
|
|
|
|
|
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)
| 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)
|
|
|
|
|
Instance disk template type.
| Constructors | DTDiskless | | DTFile | | DTSharedFile | | DTPlain | | DTBlock | | DTDrbd8 | |
|
|
|
|
Converts a DiskTemplate to String.
|
|
|
Converts a DiskTemplate from String.
|
|
|
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).
|
|
|
Default vcpu-to-pcpu ratio (randomly chosen value).
|
|
defReservedDiskRatio :: Double | Source |
|
Default max disk usage ratio.
|
|
|
Base memory unit.
|
|
|
Base disk unit.
|
|
|
Base vcpus unit.
|
|
|
This is similar to the JSON library Result type - very similar,
but we want to use it in multiple places, so we abstract it into a
mini-library here.
The failure value for this monad is simply a string.
| Constructors | |
|
|
|
Simple checker for whether a Result is OK.
|
|
|
Simple checker for whether a Result is a failure.
|
|
|
Converter from Either String to Result.
|
|
|
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 | |
|
|
|
Produced by Haddock version 2.6.0 |