diff --git a/hawk/app/models/cib.rb b/hawk/app/models/cib.rb index 80d162a49..91da767b4 100644 --- a/hawk/app/models/cib.rb +++ b/hawk/app/models/cib.rb @@ -983,7 +983,7 @@ def initialize(id, user, use_file = false, stonithwarning = false) state = CibTools.op_rc_to_state operation, rc_code, state # check for guest nodes - if !op.attributes['on_node'].nil? && [:master, :started].include?(state) + if lrm_resource.attributes['container'].nil? && (state == :master || state == :started) @nodes.select { |n| n[:uname] == rsc_id }.each do |guest| guest[:host] = node[:uname] guest[:remote] = true @@ -1020,7 +1020,12 @@ def initialize(id, user, use_file = false, stonithwarning = false) if rsc rsc_state = rsc[:state] elsif n[:host] - rsc_state = CibTools.rsc_state_from_lrm_rsc_op(@xml, n[:host], n[:id]) + begin + rsc_state = CibTools.rsc_state_from_lrm_rsc_op(@xml, n[:host], n[:id]) + rescue NoMethodError => e + # bsc#1163381. Catch the case resource name = node name. this is not allowed in pacemaker + error _("Please check if any resources have IDs that are conflicting with node names" + "#{e.backtrace.first}: #{e.message} (#{e.class})") + end end # node has a matching resource: # get state from resource.rb