Update
This commit is contained in:
parent
aeeabdc41c
commit
c0188d971f
@ -127,6 +127,7 @@ module ApplicationHelper
|
||||
node["updated_at"] = db_node.updated_at
|
||||
node["ping"] = (ping_test?(db_node.host_ip) ? "true" : "false")
|
||||
|
||||
begin
|
||||
if node["ping"].eql? "true"
|
||||
command = String.new
|
||||
command << "sshpass -p#{node["user_password"]} ssh #{node["user_name"]}@#{node["host_ip"]} gluster peer status"
|
||||
@ -138,7 +139,6 @@ module ApplicationHelper
|
||||
node["gluster"] = "on"
|
||||
node["number_of_peers"] = output[0].split(": ")[1]
|
||||
# put peers
|
||||
|
||||
elsif output[0].include? "check if gluster daemon is operational."
|
||||
node["ssh"] = "on"
|
||||
node["gluster"] = "off"
|
||||
@ -147,6 +147,10 @@ module ApplicationHelper
|
||||
node["gluster"] = "off"
|
||||
end
|
||||
end
|
||||
rescue => ex
|
||||
puts ex
|
||||
end
|
||||
|
||||
nodes << node
|
||||
node = Hash.new
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user