Revision 70db354e
b/Ganeti/HTools/Cluster.hs | ||
---|---|---|
467 | 467 |
int_p = Node.removePri old_p inst |
468 | 468 |
int_s = Node.removeSec old_s inst |
469 | 469 |
new_nl = do -- Maybe monad |
470 |
-- check that the current secondary can host the instance |
|
471 |
-- during the migration |
|
472 |
tmp_s <- Node.addPri int_s inst |
|
473 |
let tmp_s' = Node.removePri tmp_s inst |
|
470 | 474 |
new_p <- Node.addPri tgt_n inst |
471 |
new_s <- Node.addSec int_s inst new_pdx
|
|
475 |
new_s <- Node.addSec tmp_s' inst new_pdx
|
|
472 | 476 |
return $ Container.add new_pdx new_p $ |
473 | 477 |
Container.addTwo old_pdx int_p old_sdx new_s nl |
474 | 478 |
in (new_nl, Instance.setPri inst new_pdx, new_pdx, old_sdx) |
Also available in: Unified diff