diff --git a/htools/Ganeti/HTools/IAlloc.hs b/htools/Ganeti/HTools/IAlloc.hs index 81e6dfdf1be40878d42d3d258b6bf3718f529684..91b37066f849a121793da5f41fadfb2124eb67f3 100644 --- a/htools/Ganeti/HTools/IAlloc.hs +++ b/htools/Ganeti/HTools/IAlloc.hs @@ -283,6 +283,8 @@ processRelocate gl nl il idx 1 exndx = do snode = Instance.sNode inst when (snode == sorig) $ fail "Internal error: instance didn't change secondary node?!" + when (snode == pnode) $ + fail "Internal error: selected primary as new secondary?!" nodes' <- if (nodes == [pnode, snode]) then return [snode] -- only the new secondary is needed