Fedora Account System
Red Hat Associate
Red Hat Customer
Description of problem: After migrating the Embedded Ansible role and Provider Inventory/Operation roles to another appliance within the same zone the event catch for Ansible. [----] I, [2017-04-05T17:39:50.734174 #25464:4eb13c] INFO -- : MIQ(ManageIQ::Providers::EmbeddedAnsible::AutomationManager::EventCatcher::Runner#do_work) EMS [] as [admin] Event Monitor Thread gone. Restarting... [----] I, [2017-04-05T17:39:50.734507 #25464:4eb13c] INFO -- : MIQ(ManageIQ::Providers::EmbeddedAnsible::AutomationManager::EventCatcher::Runner#start_event_monitor) EMS [] as [admin] Validating Connection/Credentials [----] I, [2017-04-05T17:39:50.734690 #25464:4eb13c] INFO -- : MIQ(ManageIQ::Providers::EmbeddedAnsible::Provider#with_provider_connection) Connecting through ManageIQ::Providers::EmbeddedAnsible::Provider: [Embedded Ansible] [----] E, [2017-04-05T17:39:50.799377 #25464:4eb13c] ERROR -- : AnsibleTowerClient::Middleware::RaiseTowerError Response Body: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>503 Service Unavailable</title> </head><body> <h1>Service Unavailable</h1> <p>The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.</p> </body></html> [----] W, [2017-04-05T17:39:50.799603 #25464:4eb13c] WARN -- : MIQ(ManageIQ::Providers::EmbeddedAnsible::AutomationManager::EventCatcher::Runner#start_event_monitor) EMS [] as [admin] <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>503 Service Unavailable</title> </head><body> <h1>Service Unavailable</h1> <p>The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.</p> </body></html> Version-Release number of selected component (if applicable): 5.8.0.9-alpha2.20170404195944_1d7ece4 How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
Josh, does the event monitor eventually start up? I'm thinking that the overhead of starting the embedded ansible the first after the role had been migrated would cause the event monitor to attempt to start long before ansible does.
Going to take a look at this. It feels like this should work, but if the event monitor has some kind of cache it is looking at for the provider connection we I could see this kind of behavior resulting. This is because we update the URL for the provider when we start up the role on a new appliance. I'll see if I can track this down.
https://github.com/ManageIQ/manageiq/pull/14736
New commit detected on ManageIQ/manageiq/master: https://github.com/ManageIQ/manageiq/commit/48f3479800fa10d53a978126a51f2e19c174c8c7 commit 48f3479800fa10d53a978126a51f2e19c174c8c7 Author: Nick Carboni <ncarboni> AuthorDate: Tue Apr 11 16:49:27 2017 -0400 Commit: Nick Carboni <ncarboni> CommitDate: Tue Apr 11 16:49:27 2017 -0400 Reload the ems object in the event catcher if we fail to start When the embedded ansible role changes servers the endpoint url changes. This causes the event catcher to get http errors on the old url. Reloading the object will pick up the new url and allow the event monitor thread to start. https://bugzilla.redhat.com/show_bug.cgi?id=1439392 .../embedded_ansible/automation_manager/event_catcher/runner.rb | 9 +++++++++ 1 file changed, 9 insertions(+)
Verified in 5.9.0.5