Skip to content

Commit

Permalink
Node status will not fail on exception, if orphaned resource is in cl…
Browse files Browse the repository at this point in the history
…uster.
  • Loading branch information
ondrejmular authored and tomjelinek committed Jun 24, 2015
1 parent 25e953d commit fac6f7a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pcsd/remote.rb
Expand Up @@ -714,7 +714,9 @@ def node_status(params)
out_nodes = []
oConstraints = []
meta_attributes = []
r.meta_attr.each_pair {|k,v| meta_attributes << {:key => k, :value => v[1], :id => v[0], :parent => v[2]}}
if r.meta_attr
r.meta_attr.each_pair {|k,v| meta_attributes << {:key => k, :value => v[1], :id => v[0], :parent => v[2]}}
end
r.nodes.each{|n|
out_nodes.push(n.name)
}
Expand Down
1 change: 1 addition & 0 deletions pcsd/resource.rb
Expand Up @@ -54,6 +54,7 @@ def getResourcesGroups(get_fence_devices = false, get_all_options = false,
group_list.push(e.attributes["id"])
end

resource_list = resource_list.select { |x| not x.orphaned }
resource_list = resource_list.sort_by{|a| (a.group ? "1" : "0").to_s + a.group.to_s + "-" + a.id}

if get_all_options or get_operations
Expand Down

0 comments on commit fac6f7a

Please sign in to comment.