From 4eb89e810d9b174c1d995f070cbf947fac04bdce Mon Sep 17 00:00:00 2001 From: Will Benton <willb@redhat.com> Date: Thu, 21 Jun 2012 22:51:23 -0500 Subject: [PATCH 03/11] More resilient activation on F17. This is both a workaround for a problem with QMF on F17 (viz., we can't send events) and a general improvement to configuration activation. Specifically, configuration events are a performance optimization but are not required for correctness. Before this commit, failure to send a configuration event would result in failure of the Store#activateConfiguration API method. (It would also leave node metadata in an inconsistent state.) Now, failure to send a configuration event merely results in a warning. --- lib/mrg/grid/config/Store.rb | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/mrg/grid/config/Store.rb b/lib/mrg/grid/config/Store.rb index 279c44a..efe0296 100644 --- a/lib/mrg/grid/config/Store.rb +++ b/lib/mrg/grid/config/Store.rb @@ -718,11 +718,15 @@ module Mrg unless explicit_nodelist validate_and_activate(false, [Group.DEFAULT_GROUP], this_version) unless ConfigVersion.hasVersionedNodeConfig(Group::DEFAULT_GROUP_NAME, this_version) end - DirtyElement.delete_all log.debug "in validate_and_activate; just deleted dirty elements; count is #{DirtyElement.count}" + DirtyElement.delete_all - config_events_to(dirty_nodes, this_version, all_nodes) unless explicit_nodelist + begin + config_events_to(dirty_nodes, this_version, all_nodes) unless explicit_nodelist + rescue Exception=>ex + warnings << "Couldn't send configuration events: #{ex.inspect}" + end dirty_nodes.each {|dn| dn.last_updated_version = this_version if dn.respond_to? :last_updated_version } -- 1.7.7.6