Bug 1336861 - Connecting AMQP to port 5000 creates infinite reconnect loop that blocks workers
Summary: Connecting AMQP to port 5000 creates infinite reconnect loop that blocks workers
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Providers
Version: 5.6.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: GA
: 5.6.0
Assignee: Ladislav Smola
QA Contact: Shveta
URL:
Whiteboard: openstack
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-05-17 15:24 UTC by Pete Savage
Modified: 2016-07-12 18:35 UTC (History)
6 users (show)

Fixed In Version: 5.6.0.8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-06-29 16:03:11 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1348 0 normal SHIPPED_LIVE CFME 5.6.0 bug fixes and enhancement update 2016-06-29 18:50:04 UTC

Description Pete Savage 2016-05-17 15:24:06 UTC
Description of problem: Connecting AMQP to port 5000 creates infinite reconnect loop that blocks workers. This is the port that is default in 5.6 and is used mainly for keystone.


Version-Release number of selected component (if applicable): 5.6.0.6


How reproducible: 100%


Steps to Reproduce:
1. Add an Openstack provider adding the AMQP hostname as the same as the Default hostname and leaving the port as 5000
2.
3.

Actual results: Inventory never completes, provider cannot be deleted, new providers cannot be created.


Expected results: Connection error is handled, logged and warning shown in UI.


Additional info: 
E, [2016-05-17T07:42:34.597712 #4898] ERROR -- #<Bunny::Session:0x5ea41b0 guest.xx.xx:5000,
             vhost=/, hosts=[1xx.xx.xx.xx]>: Got an exception when receiving data: IO timeout when reading 7 bytes
             (Timeout::Error)
W, [2016-05-17T07:42:34.598236 #4898]  WARN -- #<Bunny::Session:0x5ea41b0 guest.xx.xx:5000,
             vhost=/, hosts=[xx.xx.xx.xx]>: TCP connection failed, reconnecting in 5.0 seconds

These log messages continually show up

Comment 2 Ladislav Smola 2016-05-18 09:47:11 UTC
https://github.com/ManageIQ/manageiq/pull/8776

Comment 3 CFME Bot 2016-05-19 12:40:45 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/be3ca3d9aee6c65d859c3110b1acc28a2fd9f974

commit be3ca3d9aee6c65d859c3110b1acc28a2fd9f974
Author:     Ladislav Smola <lsmola>
AuthorDate: Wed May 18 11:08:37 2016 +0200
Commit:     Ladislav Smola <lsmola>
CommitDate: Wed May 18 11:08:37 2016 +0200

    Fix infinite reconnect loop caused by new bunny gem
    
    If trying to connect to existing port, bunny is set to try
    to reconnect infinite times, which will end up blocking the
    worker. We need to set reconnect limit and we need to
    disable reconnect for validation. So reconnect is set
    only for connection created by worker, that should be consuming
    events.
    
    Fixes BZ:
    https://bugzilla.redhat.com/show_bug.cgi?id=1336861

 .../manageiq/providers/openstack/event_catcher_mixin.rb   | 15 +++++++++------
 app/models/manageiq/providers/openstack/manager_mixin.rb  |  2 +-
 config/settings.yml                                       |  3 +++
 .../openstack/events/openstack_rabbit_event_monitor.rb    | 11 +++++++++--
 4 files changed, 22 insertions(+), 9 deletions(-)

Comment 4 Shveta 2016-06-01 05:10:37 UTC
Fixed.
Verified in 

5.6.0.8-rc1.20160524155303_f2a5a50

Comment 6 errata-xmlrpc 2016-06-29 16:03:11 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2016:1348


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