Revision dec88196 Ganeti/HTools/Cluster.hs
b/Ganeti/HTools/Cluster.hs | ||
---|---|---|
607 | 607 |
concatAllocs cstate $ allocateOnPair nl inst p s |
608 | 608 |
) emptySolution ok_pairs |
609 | 609 |
|
610 |
in return $ annotateSolution sols |
|
610 |
in if null ok_pairs -- means we have just one node |
|
611 |
then fail "Not enough online nodes" |
|
612 |
else return $ annotateSolution sols |
|
611 | 613 |
|
612 | 614 |
tryAlloc nl _ inst 1 = |
613 | 615 |
let all_nodes = getOnline nl |
614 | 616 |
sols = foldl' (\cstate -> |
615 | 617 |
concatAllocs cstate . allocateOnSingle nl inst |
616 | 618 |
) emptySolution all_nodes |
617 |
in return $ annotateSolution sols |
|
619 |
in if null all_nodes |
|
620 |
then fail "No online nodes" |
|
621 |
else return $ annotateSolution sols |
|
618 | 622 |
|
619 | 623 |
tryAlloc _ _ _ reqn = fail $ "Unsupported number of allocation \ |
620 | 624 |
\destinations required (" ++ show reqn ++ |
Also available in: Unified diff