Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
snf-ganeti
Commits
352806f7
Commit
352806f7
authored
Mar 21, 2009
by
Iustin Pop
Browse files
Show offline nodes in the node status list
This patch adds a new ‘-’ flag for the node status which denotes offline nodes.
parent
40d4eba0
Changes
4
Hide whitespace changes
Inline
Side-by-side
Ganeti/HTools/Cluster.hs
View file @
352806f7
...
...
@@ -640,7 +640,7 @@ printNodes ktn nl =
m_name
=
maximum
.
(
map
length
)
.
fst
.
unzip
$
snl'
helper
=
Node
.
list
m_name
header
=
printf
"%2s %-*s %5s %5s %5s %5s %5s %3s %3s %7s %7s"
"
N1
"
m_name
"Name"
"t_mem"
"f_mem"
"r_mem"
"
F
"
m_name
"Name"
"t_mem"
"f_mem"
"r_mem"
"t_dsk"
"f_dsk"
"pri"
"sec"
"p_fmem"
"p_fdsk"
in
unlines
$
(
header
:
map
(
uncurry
helper
)
snl'
)
...
...
Ganeti/HTools/Node.hs
View file @
352806f7
...
...
@@ -219,10 +219,11 @@ list mname n t =
sl
=
slist
t
mp
=
p_mem
t
dp
=
p_dsk
t
off
=
offline
t
fn
=
failN1
t
in
printf
" %c %-*s %5.0f %5d %5d %5.0f %5d %3d %3d %.5f %.5f"
(
if
fn
then
'*'
else
' '
)
(
if
off
then
'-'
else
if
fn
then
'*'
else
' '
)
mname
n
(
t_mem
t
)
(
f_mem
t
)
(
r_mem
t
)
((
t_dsk
t
)
/
1024
)
((
f_dsk
t
)
`
div
`
1024
)
(
length
pl
)
(
length
sl
)
...
...
hbal.1
View file @
352806f7
...
...
@@ -106,8 +106,9 @@ Prints the before and after node status, in a format designed to allow
the user to understand the node's most important parameters.
The node list will contain these informations:
- a character denoting the N+1 status of the node, with blank
meaning pass and an asterisk ('*') meaning fail
- a character denoting the status of the node, with '-' meaning an
offline node, '*' meaning N+1 failure and blank meaning a good
node
- the node name
- the total node memory
- the free node memory
...
...
hn1.1
View file @
352806f7
...
...
@@ -92,8 +92,9 @@ Prints the before and after node status, in a format designed to allow
the user to understand the node's most important parameters.
The node list will contain these informations:
- a character denoting the N+1 status of the node, with blank
meaning pass and an asterisk ('*') meaning fail
- a character denoting the status of the node, with '-' meaning an
offline node, '*' meaning N+1 failure and blank meaning a good
node
- the node name
- the total node memory
- the free node memory
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment