Instance relocation: stay within the current group
This patch adds a new top-level relocation function that restricts therelocation to the instance's group, and switches hail to it.
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Balazs Lecz <leczb@google.com>
Container: remove fromAssocList
Container.fromAssocList is just a re-export of IntMap.fromList; itmakes sense to remove it and simply export the original name, as itneeds just a bit of renaming in the rest of the code.
Signed-off-by: Iustin Pop <iustin@google.com>...
Parallelize the balancing computations
This small patch changes the balancing computation to work inparallel, if possible.
While the normal linking is against the single-threaded runtime, ifthe code is linked against the multi-threaded one, the balancing will...
Allocation routines: return list of resource stats
Currently, the allocation routines (iterateAlloc and tieredAlloc)return only the final state of the cluster and the list of allocatedinstances. For better visibility in how the cluster resources change,...
Fix updating of available (V)CPUs in CStats
RAPI: implement backwards compat with Ganeti 2.3
This is a cheap way to get back compatibility with Ganeti 2.3 (andlower) in the RAPI backend. It is however not very safe (the /2/groupsresource could fail due to other reasons), so it is added onlytemporarily....
Document Utils.tryFromObj
Add 'Read' instances for most objects
This allows a cluster structure to be easily serialized via "read";together with the already existing instances of Show, this gives apoor man's serialization/deserialization implementation.
The patch also exports the compDetailedCV function from Cluster.hs, so...
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.
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...
View revisions
Also available in: Atom