In multi-group allocation think about the whole cluster
authorKlaus Aehlig <aehlig@google.com>
Mon, 27 Jul 2015 12:45:43 +0000 (14:45 +0200)
committerKlaus Aehlig <aehlig@google.com>
Mon, 27 Jul 2015 14:33:59 +0000 (16:33 +0200)
commit2a36cab58a83cc7cb9d334e38a08200cb3394a90
tree037612f700a535fb27866b10de903922098bfd8c
parent1b084191fec47057496220491a5e8084357deafa
In multi-group allocation think about the whole cluster

When choosing a group for allocating a new instance, not only
consider how balanced the group of the new instance would be,
but look at the overall balancedness of the cluster.

The net effect of this change is that hail will prefer the most
empty group and not (as it is now) the most balanced node group.
This will keep the overall cluster more balanced.

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Petr Pudlak <pudlak@google.com>
src/Ganeti/HTools/Cluster.hs