Bug 1439392 - Ansible Event monitor error's out when it does not reside on same CF appliance with Embedded Ansible/Provider Int/Op
Summary: Ansible Event monitor error's out when it does not reside on same CF applianc...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Appliance
Version: 5.8.0
Hardware: All
OS: All
high
high
Target Milestone: GA
: 5.9.0
Assignee: Nick Carboni
QA Contact: luke couzens
URL:
Whiteboard: ansible_embed:black
Depends On:
Blocks: 1442172
TreeView+ depends on / blocked
 
Reported: 2017-04-05 21:53 UTC by Josh Carter
Modified: 2018-03-06 15:55 UTC (History)
7 users (show)

Fixed In Version: 5.9.0.1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1442172 (view as bug list)
Environment:
Last Closed: 2018-03-06 15:55:00 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Josh Carter 2017-04-05 21:53:39 UTC
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:

Comment 2 Gregg Tanzillo 2017-04-05 22:02:15 UTC
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.

Comment 7 Nick Carboni 2017-04-11 14:53:24 UTC
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.

Comment 9 CFME Bot 2017-04-12 16:21:27 UTC
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(+)

Comment 11 luke couzens 2017-11-03 13:18:15 UTC
Verified in 5.9.0.5


Note You need to log in before you can comment on or make changes to this bug.