Commit 1ab94e48 authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

hail: Fix result for node evacuation



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: default avatarMichael Hanselmann <hansmi@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent 07cea902
......@@ -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,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment