From 1ab94e486d0eeea6759c161842565e9834dd79e3 Mon Sep 17 00:00:00 2001 From: Michael Hanselmann <hansmi@google.com> Date: Fri, 7 Oct 2011 11:58:09 +0200 Subject: [PATCH] hail: Fix result for node evacuation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit According to the iallocator documentation the βnode-evacuateβ call needs to return a list of jobs, not a list of lists of jobs. Signed-off-by: Michael Hanselmann <hansmi@google.com> Reviewed-by: Iustin Pop <iustin@google.com> --- htools/Ganeti/HTools/Cluster.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htools/Ganeti/HTools/Cluster.hs b/htools/Ganeti/HTools/Cluster.hs index 9e9469366..e036f95a0 100644 --- a/htools/Ganeti/HTools/Cluster.hs +++ b/htools/Ganeti/HTools/Cluster.hs @@ -109,7 +109,7 @@ data EvacSolution = EvacSolution { esMoved :: [(Idx, Gdx, [Ndx])] -- ^ Instances moved successfully , esFailed :: [(Idx, String)] -- ^ Instances which were not -- relocated - , esOpCodes :: [[[OpCodes.OpCode]]] -- ^ List of lists of jobs + , esOpCodes :: [[OpCodes.OpCode]] -- ^ List of jobs } -- | Allocation results, as used in 'iterateAlloc' and 'tieredAlloc'. @@ -1085,7 +1085,7 @@ updateEvacSolution (nl, il, es) idx (Bad msg) = (nl, il, es { esFailed = (idx, msg):esFailed es}) updateEvacSolution (_, _, es) idx (Ok (nl, il, opcodes)) = (nl, il, es { esMoved = new_elem:esMoved es - , esOpCodes = [opcodes]:esOpCodes es }) + , esOpCodes = opcodes:esOpCodes es }) where inst = Container.find idx il new_elem = (idx, instancePriGroup nl inst, -- GitLab