Change the total disk/mem to Double
Since we only use the totals for computations, and we always convertthem via fromIntegral, let's just store them directly as Doubles.
A no-code change s/disk/dsk/
This just makes indendation nicer in many expressions.
Compute the p_mem / p_dsk statically
This patch changes the computation of p_mem / p_dsk from on-demand(whenever the cluster stats are computed) to after-modify (after a nodeis modified, we update its stats). This brings a god speed-up as onlyone node or two are usually changed between cluster-wide stats are...
Documentation updates
Simplify the checkInstanceMove function
This patch flattens the two folds into one, by simply building the wholelist of moves instead of the double recursion (nodes and the eachnode's moves). This has no functional change, but it's much cleaner.
A small optimization in node computation
Currently we always compute the available node list for moves (for aninstances) based on the nodes of the initial table. This works find,however is a repeated calculation.
We optimize this by passing a node list (of indexes, not full objects),...
Container: add a 'keys' function
Replace a foldl by foldl'
Split checkMove into two
This cleans up and splits the individual instance move into a separate function.
Change the balancing algorithm
This patch changes the balancing algorithm to not iterate linearly overthe instances (in a random, but fixed order), instead selecting at eachstep the best next move. This should allow a better score (most of thetime), and usually also a shorter solution.
Add RAPI support to hn1
This patch moves a function to Utils and changes hn1 to be able to takedata from RAPI.
Implement oneline-output for hbal
Do not try both http and https against the server
This patch changes the tryRapi function so that if the http requestsucceeded, we don't try https too.
Simplify some JSON transforms
... hopefully this is more clear.
Add compatibility with rapi v1
The patch adds compatibility with RAPI v1, and this required some newJSON functions as valFromObj doesn't behave nicely.
Some other unrelated changes were done too.
Implement reading data from RAPI v2
Some more utility functions
Fix a bug in Cluster.fixNodes
We need to lookup the moving accumulator, of course.
Make RAPI return the same data format as gnt-*
This patch changes the RAPI endpoint return the same data format as theinput files. This will allow using it instead of the files.
Change the input file formats
This patch changes the format of the input node and instance lists. Itremoves the list of primary and secondary instances from the nodes, andadds the primary and secondary nodes to the instance list.
This is done so that we can have the same input data from commands as...
Initial support for reading from RAPI
Initial import
This is the initial import of release 0.0.3.