Commit 934c62dc authored by Iustin Pop's avatar Iustin Pop
Browse files

Fix IAllocator multi-evacuate message

Since Ganeti passes full host names (not common-suffix-stripped), we
need to remove the suffix from the evac_nodes keys too. In case one node
is not part of the cluster, it will lead to a wrong error message, but
for now it fixes the problem.
parent 7ef4d039
......@@ -134,7 +134,8 @@ parseData body = do
"multi-evacuate" ->
do
ex_names <- fromObj "evac_nodes" request
ex_nodes <- mapM (Container.findByName map_n) ex_names
let ex_names' = map (stripSuffix $ length csf) ex_names
ex_nodes <- mapM (Container.findByName map_n) ex_names'
let ex_ndx = map Node.idx ex_nodes
return $ Evacuate ex_ndx
other -> fail ("Invalid request type '" ++ other ++ "'")
......
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