From fb0c774be7e25596ef2519e685794e455f6ec19f Mon Sep 17 00:00:00 2001 From: Oleg Ponomarev <onponomarev@gmail.com> Date: Thu, 2 Jul 2015 18:50:30 +0300 Subject: [PATCH] Bugfix for cluster location score calculation Location score was updated incorrectly during the ReplaceAndFailover move. Now it is corrected. Signed-off-by: Oleg Ponomarev <onponomarev@gmail.com> Signed-off-by: Klaus Aehlig <aehlig@google.com> Reviewed-by: Klaus Aehlig <aehlig@google.com> --- src/Ganeti/HTools/Cluster.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Ganeti/HTools/Cluster.hs b/src/Ganeti/HTools/Cluster.hs index c966e6447..40921f554 100644 --- a/src/Ganeti/HTools/Cluster.hs +++ b/src/Ganeti/HTools/Cluster.hs @@ -568,7 +568,7 @@ applyMoveEx force nl inst (ReplaceAndFailover new_pdx) = tgt_n = Container.find new_pdx nl int_p = Node.removePri old_p inst int_s = Node.removeSec old_s inst - new_inst = Instance.setBoth (setInstanceLocationScore inst int_s tgt_n) + new_inst = Instance.setBoth (setInstanceLocationScore inst tgt_n int_p) new_pdx old_pdx force_s = Node.offline old_s || force new_nl = do -- OpResult -- GitLab