Add maybePrintInsts for the instance listing
This again abstracts a bit the instance listing. Due to the fact thatI don't want to import Cluster.hs in CLI.hs, we pass the alreadygenerated output. It also moves the instance display to stderr.
Signed-off-by: Iustin Pop <iustin@google.com>...
Add maybePrintNodes for abstracting the node list
Since this bit of code (including the “when (isJust …)” is used inmultiple places, let's abstract it in a function that is usedconsistently. One (bad?) side-effect is that all node lists are doneto stderr, including the ones from hbal where it was previously done...
Add maybeSaveData for cluster state saving
This functionality was replicated in multiple places (hbal & hspace),so we abstract it for better clarity.
Additionally, in hbal we now save the state both before and afterbalancing.
Convert Text.serializeCluster to ClusterData
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Balazs Lecz <leczb@google.com>
Convert the rest of the pipeline to ClusterData
This patch converts the backends and mergeData to the new ClusterDatatype.
Move part of the loader pipeline to ClusterData
Convert Loader.RqType to ClusterData
Add a new type ClusterData
This will be used to hold all the disparate uses of the cluster data:we have either tuples with these four elements, or functions takingthese four arguments, etc.
Simulation backend: read the allocation policy too
This patch moves the allocation policy from hardcoded to be read fromthe given specification, and extends the error message for invalidspecifications.
Simulation backend: allow multiple node groups
This patch changes the behaviour of the --simulation option to be anincremental option, where each new use defines a new node group. Thisallows simulation of more complex clusters.
View revisions
Also available in: Atom