Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
...@@ -134,7 +134,8 @@ parseData body = do ...@@ -134,7 +134,8 @@ parseData body = do
"multi-evacuate" -> "multi-evacuate" ->
do do
ex_names <- fromObj "evac_nodes" request 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 let ex_ndx = map Node.idx ex_nodes
return $ Evacuate ex_ndx return $ Evacuate ex_ndx
other -> fail ("Invalid request type '" ++ other ++ "'") other -> fail ("Invalid request type '" ++ other ++ "'")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment