Drop RAPI v1 compatiblity
Since we only support Ganeti 2.0, we drop the 1.2 compatibility.
Add support for 'offline' nodes
This patch drops compatiblity with Ganeti 1.2 and adds support foroffline nodes in the cluster. When reading from RAPI, the drained nodesare considered offline so that we don't allocate on them too.
Update the IAlloc module
We know have a working parseData function that returns the node andinstance data. This uncovered bad support for non-drbd instances ☹
Move the JSON utilities to Utils.hs
This patch moves the generic/reusable JSON functions to Utils.hs, sothat they're shared between RAPI/IAlloc.
Add a copy of Rapi.HS as IAlloc.hs
This will be used in two ways: - format the response to Ganeti (easy, implemented) - parse the input data and build the node/instance lists (hard :)
hbal: Add a new min-score option
This new parameter causes the algorithm to finish (or even not start atall) if we reach/have a score better than it.
hbal: Change hardcoded tests to monadic composition
In some case we manually do “if isNothing … then Nothing else …”, whichcan be very easily replaced with a monadic construct in the Maybe monad.
Increase allowed missing memory to 512MB
Since Xen seems to “steal” some amounts of memory (depending on totalnode memory), we increase the maximum allowed missing memory to 512MB,based on gathered data from multiple machines.
Add reading the file names from env vars
This patch adds support for selecting the instance/node file names viatwo environment variables (HTOOLS_NODES, HTOOLS_INSTANCES).
Unfortunately we still have lots of duplicated code, since the optionsare not unified.
Implement writing the command list to a script
This patch adds support in hbal for writing the command list to a shellscript, with error checking and allowing for early exit.
View revisions
Also available in: Atom