Revision e85444d0 htools/Ganeti/HTools/Cluster.hs
b/htools/Ganeti/HTools/Cluster.hs | ||
---|---|---|
1227 | 1227 |
printSolutionLine nl il nmlen imlen plc pos = |
1228 | 1228 |
let pmlen = (2*nmlen + 1) |
1229 | 1229 |
(i, p, s, mv, c) = plc |
1230 |
old_sec = Instance.sNode inst |
|
1230 | 1231 |
inst = Container.find i il |
1231 | 1232 |
inam = Instance.alias inst |
1232 | 1233 |
npri = Node.alias $ Container.find p nl |
1233 | 1234 |
nsec = Node.alias $ Container.find s nl |
1234 | 1235 |
opri = Node.alias $ Container.find (Instance.pNode inst) nl |
1235 |
osec = Node.alias $ Container.find (Instance.sNode inst) nl
|
|
1236 |
osec = Node.alias $ Container.find old_sec nl
|
|
1236 | 1237 |
(moves, cmds) = computeMoves inst inam mv npri nsec |
1237 |
ostr = printf "%s:%s" opri osec::String |
|
1238 |
nstr = printf "%s:%s" npri nsec::String |
|
1238 |
-- FIXME: this should check instead/also the disk template |
|
1239 |
ostr = if old_sec == Node.noSecondary |
|
1240 |
then printf "%s" opri |
|
1241 |
else printf "%s:%s" opri osec |
|
1242 |
nstr = if s == Node.noSecondary |
|
1243 |
then printf "%s" npri |
|
1244 |
else printf "%s:%s" npri nsec |
|
1239 | 1245 |
in (printf " %3d. %-*s %-*s => %-*s %.8f a=%s" |
1240 |
pos imlen inam pmlen ostr
|
|
1241 |
pmlen nstr c moves,
|
|
1246 |
pos imlen inam pmlen (ostr::String)
|
|
1247 |
pmlen (nstr::String) c moves,
|
|
1242 | 1248 |
cmds) |
1243 | 1249 |
|
1244 | 1250 |
-- | Return the instance and involved nodes in an instance move. |
Also available in: Unified diff