Split the balancing algorithm in two parts
authorIustin Pop <iustin@google.com>
Sun, 30 Aug 2009 15:55:49 +0000 (17:55 +0200)
committerIustin Pop <iustin@google.com>
Sun, 30 Aug 2009 15:55:49 +0000 (17:55 +0200)
commitf25e5aacbbbb661d69612cdf4b1dbde4a9c2235f
tree758566de22a89bfcee2dc40461577d20a63d0bfc
parentc0501c694f35537f5a096f5a34c082c71ee17777
Split the balancing algorithm in two parts

Currently the computation, recursing part and the IO part (progress
updates) of the balancing main function (iterateDepth) are all in the
same function, which makes it hard to test. This patch moves the
decision/computation part (whether to proceed one more round, whether we
got a good result, etc.) into Cluster.hs, and leaves only the iteration
and screen update in hbal.hs.
Ganeti/HTools/Cluster.hs
hbal.hs