Commit f3fecb9b authored by Gaetan SIMO's avatar Gaetan SIMO
Browse files

[Rakefile] improved dead nodes uid sorting mecanism (cluster + uid)

parent 300fd617
......@@ -92,11 +92,15 @@ namespace :deadnodes do
task :browse do
def comment_ok?(comment)
# comment.nil? or comment == "OK"
comment == "OK"
@api_sites.each do |site|
site.status["nodes"].each do |uid,status|
reg = /^([^-]+)-(\d+)/
a_cluster,a_id = a[0].scan(reg).flatten
b_cluster,b_id = b[0].scan(reg).flatten
[a_cluster,a_id.to_i] <=> [b_cluster,b_id.to_i]
}.each do |uid,status|
comment = status["comment"]
state = status["hard"].downcase
if comment_ok?(comment)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment