Change hbal handling of !auto_balance instances
authorIustin Pop <iustin@google.com>
Thu, 13 Dec 2012 12:03:56 +0000 (13:03 +0100)
committerIustin Pop <iustin@google.com>
Fri, 14 Dec 2012 14:43:59 +0000 (15:43 +0100)
Note: I'll add tests for this on the master branch, but not here.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>

NEWS
htools/Ganeti/HTools/Cluster.hs

diff --git a/NEWS b/NEWS
index 59923cb..b0ed489 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,13 @@ Version 2.6.2
 
 *(unreleased)*
 
+Behaviour change: hbal won't rebalance anymore instances which have the
+'auto_balance' attribute set to false. This was the intention all along,
+but until now it only skipped those from the N+1 memory reservation
+(DRBD-specific).
+
+Besides that, a number of bugfixes:
+
 - Disk adoption interaction with ipolicy checks has been fixed.
 - Tap device's MAC prefix is now forcibly set to "fe" (issue 217).
 - Option to force master-failover without voting added (issue 282).
index 0ccf3bd..f5dc960 100644 (file)
@@ -630,7 +630,8 @@ tryBalance ini_tbl disk_moves inst_moves evac_mode mg_limit min_gain =
                            in filter (any (`elem` bad_nodes) .
                                           Instance.allNodes) all_inst
                       else all_inst
-        reloc_inst = filter Instance.movable all_inst'
+        reloc_inst = filter (\i -> Instance.movable i &&
+                                   Instance.autoBalance i) all_inst'
         node_idx = map Node.idx online_nodes
         fin_tbl = checkMove node_idx disk_moves inst_moves ini_tbl reloc_inst
         (Table _ _ fin_cv _) = fin_tbl