Browse files

Merge pull request #4 from galthaus/1f48afc2fcb2937bf3438d6421d33c4f4…

…1c0453f

Fix build break around dynamic links - pulls in some of rob's import changes and Andi's nagios changes. [3/6]
  • Loading branch information...
2 parents 10129b4 + 1f48afc commit 9f1913aa2b9f7333c802ce2513e7edca7e78d581 Rob Hirschfeld committed Mar 1, 2012
Showing with 4 additions and 3 deletions.
  1. +4 −3 crowbar_framework/app/models/nagios_service.rb
View
7 crowbar_framework/app/models/nagios_service.rb
@@ -64,10 +64,11 @@ def transition(inst, name, state)
tnodes.each do |n|
next if n.nil?
node = NodeObject.find_node_by_name(n)
- if node.get_network_by_type("public")["address"].nil? or node.get_network_by_type("public")["address"].empty?
- server_ip = node.get_network_by_type("admin")["address"]
+ pub = node.get_network_by_type("public")
+ if pub and pub["address"] and pub["address"] != ""
+ server_ip = pub["address"]
else
- server_ip = node.get_network_by_type("public")["address"]
+ server_ip = node.get_network_by_type("admin")["address"]
end
end
end

0 comments on commit 9f1913a

Please sign in to comment.