projects
/
ganeti-local
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c4ef235
)
Fix instance listing for non-redundant case
author
Iustin Pop
<iustin@google.com>
Sun, 18 Oct 2009 16:38:26 +0000
(17:38 +0100)
committer
Iustin Pop
<iustin@google.com>
Sun, 18 Oct 2009 16:38:26 +0000
(17:38 +0100)
Ganeti/HTools/Cluster.hs
patch
|
blob
|
history
diff --git
a/Ganeti/HTools/Cluster.hs
b/Ganeti/HTools/Cluster.hs
index
b5824c4
..
91ef098
100644
(file)
--- a/
Ganeti/HTools/Cluster.hs
+++ b/
Ganeti/HTools/Cluster.hs
@@
-708,7
+708,10
@@
printInsts nl il =
helper inst = printf "%2s %-*s %-*s %-*s"
" " m_name (Instance.name inst)
m_nnm (Container.nameOf nl (Instance.pNode inst))
- m_nnm (Container.nameOf nl (Instance.sNode inst))
+ m_nnm (let sdx = Instance.sNode inst
+ in if sdx == Node.noSecondary
+ then ""
+ else Container.nameOf nl sdx)
header = printf "%2s %-*s %-*s %-*s"
" " m_name "Name" m_nnm "Pri_node" m_nnm "Sec_node"::String
in unlines (header:map helper sil)