From 8ee9d83189f0c67eb57a40dd34b4fec4d2f8f834 Mon Sep 17 00:00:00 2001 From: Brandon Dunne Date: Wed, 12 Apr 2017 12:20:16 -0400 Subject: [PATCH] Merge pull request #14736 from carbonin/reload_ems_after_event_catcher_failure Reload the ems object in the event catcher if we fail to start (cherry picked from commit 3d18b43eb610cb998281a7727ca43a5859163d18) https://bugzilla.redhat.com/show_bug.cgi?id=1442172 --- .../automation_manager/event_catcher/runner.rb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/models/manageiq/providers/embedded_ansible/automation_manager/event_catcher/runner.rb b/app/models/manageiq/providers/embedded_ansible/automation_manager/event_catcher/runner.rb index fdb57066f3c..c68369d8421 100644 --- a/app/models/manageiq/providers/embedded_ansible/automation_manager/event_catcher/runner.rb +++ b/app/models/manageiq/providers/embedded_ansible/automation_manager/event_catcher/runner.rb @@ -1,3 +1,12 @@ class ManageIQ::Providers::EmbeddedAnsible::AutomationManager::EventCatcher::Runner < ManageIQ::Providers::BaseManager::EventCatcher::Runner include ManageIQ::Providers::AnsibleTower::Shared::AutomationManager::EventCatcher::Runner + + def start_event_monitor + tid = super + return tid unless tid.nil? + + # Get a new copy of the ems record in case the embedded ansible role changed servers + @ems.reload + nil + end end