Revision fafd0773 htools/Ganeti/HTools/Cluster.hs
b/htools/Ganeti/HTools/Cluster.hs | ||
---|---|---|
563 | 563 |
osdx = Instance.sNode target |
564 | 564 |
bad_nodes = [opdx, osdx] |
565 | 565 |
nodes = filter (`notElem` bad_nodes) nodes_idx |
566 |
mir_type = templateMirrorType $ Instance.diskTemplate target
|
|
566 |
mir_type = Instance.mirrorType target
|
|
567 | 567 |
use_secondary = elem osdx nodes_idx && inst_moves |
568 | 568 |
aft_failover = if mir_type == MirrorInternal && use_secondary |
569 | 569 |
-- if drbd and allowed to failover |
... | ... | |
970 | 970 |
-- for allocation |
971 | 971 |
-> Result (Node.List, Instance.List, [OpCodes.OpCode]) |
972 | 972 |
evacOneNodeOnly nl il inst gdx avail_nodes = do |
973 |
op_fn <- case templateMirrorType (Instance.diskTemplate inst) of
|
|
973 |
op_fn <- case Instance.mirrorType inst of
|
|
974 | 974 |
MirrorNone -> Bad "Can't relocate/evacuate non-mirrored instances" |
975 | 975 |
MirrorInternal -> Ok ReplaceSecondary |
976 | 976 |
MirrorExternal -> Ok FailoverToAny |
Also available in: Unified diff