tryAlloc: restrict valid node pairs to same-group
This is a cheap way to make capacity calculation work well withmulti-group clusters.
There are two alternatives in implementing this:
- we can split the cluster into groups, run individual group allocation, and then try to recombine the groups; but this doesn't...
Cluster.hs: add a new type alias
Just a bit of small cleanup, since we might want to use more functionswith this signature in the future.
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
Rapi: read and use the vm_capable node flag
Similar to the IAllocator change, this patch reads and uses thevm_capable flag in Rapi. Furthermore, it changes the group UUIDreading to the same maybeFromObj infrastructure.
Signed-off-by: Iustin Pop <iustin@google.com>...
IAllocator: read and use the vm_capable node flag
This allows non-vm_capable nodes, which don't export runtime data, tonot break the IAllocator message parsing.
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Balazs Lecz <leczb@google.com>
IAllocator: replace fake policy with real one
This small patch actually reads the allocation policy from theIAllocator message.
JSON: improve error reporting
Currently, we list the entire object in error messages. But for largeobjects (e.g. an IAllocator message), this makes the outputunreadable, as the elements are containers themselves.
To simplify the reporting, we only list the keys, as this is more...
JSON functions: change signature of (maybe)fromObj
Currently, fromObj/maybeFromObj take first the key, and then theobject. This is suboptimal, as this form is not easy to use withpartial functional application.
To make it easier to switch between tryFromObj, fromObj and...
Convert node evacuation to multi-group
This patch does the necessary changes to make the new tryMGEvac workcorrectly: each instance remains inside its primary node's group whenit is evacuated.
This is done by splitting up the to-be-evacuated instance list per...
Evacuation: extract the inner fold function
This makes the code more readable, which will help with themulti-group evacuation.
Rapi: fully evaluate the body in getUrl
Currently, the Rapi.getUrl function returns the body withoutevaluating it, and the other functions (loadData, parseData) do thesame. In effect, the top-level structure returned from loadData can bea thunk which depends on the curl operation, thus keeping the curl...
View revisions
Also available in: Atom