Bug 1224389 - Not capturing events properly from RHOS (QPID)
Summary: Not capturing events properly from RHOS (QPID)
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Providers
Version: 5.4.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: GA
: 5.5.0
Assignee: Greg Blomquist
QA Contact: Pete Savage
URL:
Whiteboard:
: 1228750 (view as bug list)
Depends On:
Blocks: 1225173
TreeView+ depends on / blocked
 
Reported: 2015-05-22 18:32 UTC by Pete Savage
Modified: 2015-10-27 13:02 UTC (History)
5 users (show)

Fixed In Version: 5.5.0.1
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1225173 (view as bug list)
Environment:
Last Closed: 2015-10-26 19:21:12 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Pete Savage 2015-05-22 18:32:03 UTC
Description of problem: Events not properly being picked up from RHOS


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


How reproducible: Very


Steps to Reproduce:
1. Add a RHOS provider
2. Start/Restart and instance
3. Try to find events

Actual results: Events are not collected


Expected results: Events should be collected


Additional info:
This has been tested against RHOS4. Connections to port 5672 were verified, and even the filters for the scheduler were removed, but events were still not captured.

Comment 1 Pete Savage 2015-05-22 18:33:43 UTC
This bug occurs due to a bug fix in RHOS4 for qpid topology handling. https://bugzilla.redhat.com/show_bug.cgi?id=1030658

The fix changes the exchange that the messages are published to and consequently we no longer collect them from qpid by querying the: quantum, cinder, nova and glance exchange/queues.

Comment 3 Greg Blomquist 2015-05-26 17:54:08 UTC
https://github.com/ManageIQ/manageiq/pull/2985

Comment 4 CFME Bot 2015-05-26 18:11:16 UTC
New commit detected on manageiq/master:
https://github.com/ManageIQ/manageiq/commit/36bbf9d3adbdd9a9087e8bb8198b0d704ed66e99

commit 36bbf9d3adbdd9a9087e8bb8198b0d704ed66e99
Author:     Greg Blomquist <gblomqui>
AuthorDate: Fri May 22 16:07:28 2015 -0400
Commit:     Greg Blomquist <gblomqui>
CommitDate: Sat May 23 10:23:30 2015 -0400

    Whitespace cleanup
    
    Cleanup some bad use of whitespce in OpenstackQpidReceiver.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1224389

 lib/openstack/amqp/openstack_qpid_receiver.rb | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

Comment 5 CFME Bot 2015-05-26 18:11:19 UTC
New commit detected on manageiq/master:
https://github.com/ManageIQ/manageiq/commit/7688e130fe3fa04a2af2ca75cfbd96bb2236cd32

commit 7688e130fe3fa04a2af2ca75cfbd96bb2236cd32
Author:     Greg Blomquist <gblomqui>
AuthorDate: Sat May 23 10:16:25 2015 -0400
Commit:     Greg Blomquist <gblomqui>
CommitDate: Tue May 26 13:21:01 2015 -0400

    Get rid of required "options" in Qpid connection
    
    OpenstackQpidConnection#initialize accepted an options hash but required some of
    the "options".
    
    Now the initialize method takes in actual parameters making it clearer what
    needs to be used to create a Qpid connection.
    
    At this point, this refactoring isn't being propagated to the
    OpenstackEventMonitor so as not to break the existing interface.  But, I think
    that refactoring the OpenstackEventMonitor initializer is needed as well to
    clear up that interface as well.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1224389

 lib/openstack/amqp/openstack_qpid_connection.rb    | 35 ++++++++++------------
 lib/openstack/amqp/openstack_qpid_event_monitor.rb | 23 ++++++++++++--
 2 files changed, 36 insertions(+), 22 deletions(-)

Comment 6 CFME Bot 2015-05-26 18:11:22 UTC
New commit detected on manageiq/master:
https://github.com/ManageIQ/manageiq/commit/fbfd4f48980530eb25a5b875636115ebb38fc4d6

commit fbfd4f48980530eb25a5b875636115ebb38fc4d6
Author:     Greg Blomquist <gblomqui>
AuthorDate: Sat May 23 10:38:04 2015 -0400
Commit:     Greg Blomquist <gblomqui>
CommitDate: Tue May 26 13:21:01 2015 -0400

    Accommodate qpid exchange names
    
    Openstack supports two different types of Qpid Exchange names:
    
     1. <service_name> (e.g., "nova)
     2. amq.topic/topic/<service_name> (e.g., "amq.topic/topic/nova")
    
    Originally, ManageIQ only supported the first type of exchange name.  Now the
    OpenstackQpidReceiver can support both type of exchange names.
    
    Additionally, when creating the real qpid receiver, a uniquely named queue was
    automatically created by the qpid library.  The qpid receiver would connect to
    this queue, which receives the actual messages from the exchange.  The queue
    name looked like:
    
     * <service_name>_<uuid>
       - e.g., "nova_123-456-789"
    
    Now the name of the queue is controlled by the OpenstackQpidReceiver and looks
    like:
    
     * miq-<host>-<exchange_name>
       - e.g., "miq-10.10.10.10-amq.topic_topic_nova
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1224389

 lib/openstack/amqp/openstack_qpid_event_monitor.rb | 22 +++++++++++++---
 lib/openstack/amqp/openstack_qpid_receiver.rb      | 30 ++++++++++++++--------
 2 files changed, 38 insertions(+), 14 deletions(-)

Comment 7 CFME Bot 2015-05-26 18:11:26 UTC
New commit detected on manageiq/master:
https://github.com/ManageIQ/manageiq/commit/f280ebf6652ab10a7f0bf18853a8f3ffeeb5f2d5

commit f280ebf6652ab10a7f0bf18853a8f3ffeeb5f2d5
Author:     Greg Blomquist <gblomqui>
AuthorDate: Sat May 23 11:00:09 2015 -0400
Commit:     Greg Blomquist <gblomqui>
CommitDate: Tue May 26 13:21:01 2015 -0400

    Update Qpid tests
    
    The various qpid tests need to be updated to work with the changes to the
    OpenstackQpidEventMonitor and associated classes.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1224389

 .../openstack/amqp/openstack_qpid_connection_spec.rb  |  7 +------
 .../amqp/openstack_qpid_event_monitor_spec.rb         | 19 +++++++++++++++----
 .../openstack/amqp/openstack_qpid_receiver_spec.rb    |  6 +++++-
 3 files changed, 21 insertions(+), 11 deletions(-)

Comment 8 CFME Bot 2015-06-04 17:46:11 UTC
New commit detected on manageiq/master:
https://github.com/ManageIQ/manageiq/commit/28b13d6ca787f7379882a39866ae8e4a39356d6a

commit 28b13d6ca787f7379882a39866ae8e4a39356d6a
Author:     Greg Blomquist <gblomqui>
AuthorDate: Wed Jun 3 16:16:05 2015 -0400
Commit:     Greg Blomquist <gblomqui>
CommitDate: Wed Jun 3 16:45:04 2015 -0400

    Fix custom naming for AMQP binding queues
    
    The original fixes for the bugs linked below used the OpenStack server's IP
    address as the hostname information in the binding queue name.  This meant that
    any two appliances that attempted to connect to a single OpenStack env would
    create the same named binding queues.
    
    This fix uses the appliance's ip address in the binding queue name, making the
    name of the binding queue unique per appliance.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1224389
    https://bugzilla.redhat.com/show_bug.cgi?id=1223976

 lib/openstack/amqp/openstack_qpid_event_monitor.rb             | 10 ++++++----
 lib/openstack/amqp/openstack_qpid_receiver.rb                  |  5 +++--
 lib/openstack/amqp/openstack_rabbit_event_monitor.rb           |  6 ++++--
 lib/spec/openstack/amqp/openstack_qpid_event_monitor_spec.rb   |  2 +-
 lib/spec/openstack/amqp/openstack_qpid_receiver_spec.rb        |  2 +-
 lib/spec/openstack/amqp/openstack_rabbit_event_monitor_spec.rb |  2 +-
 vmdb/lib/workers/mixins/event_catcher_openstack_mixin.rb       |  4 +++-
 7 files changed, 19 insertions(+), 12 deletions(-)

Comment 9 Greg Blomquist 2015-06-05 15:15:03 UTC
*** Bug 1228750 has been marked as a duplicate of this bug. ***

Comment 10 Greg Blomquist 2015-06-05 15:16:54 UTC
Bug #1228750 shows the error that was showing up after this failed QE.

Comment 11 CFME Bot 2015-06-24 19:41:32 UTC
New commit detected on manageiq/master:
https://github.com/ManageIQ/manageiq/commit/3649eb07a5e8b1b9a5f56dab11eb205e66758ef5

commit 3649eb07a5e8b1b9a5f56dab11eb205e66758ef5
Author:     Greg Blomquist <gblomqui>
AuthorDate: Tue Jun 23 13:30:07 2015 -0400
Commit:     Greg Blomquist <gblomqui>
CommitDate: Tue Jun 23 16:00:12 2015 -0400

    Include miq_server when retrieving worker
    
    To try to make the way the OpenStack event catcher creates binding queues
    work a little better, the appliance's IP address was looked up and used as part
    of the binding queue's name.
    
    However, there were a couple of things working against this fix.  First, the
    appliance's IP address was not readily available to the worker process.  Second,
    ManageIQ has a DB connection pool with only one connection.  And, threads (i.e.,
    where event catcher workers do all their work) that attempt to run queries are
    opening a new DB connection.
    
    The original fix never actually tried opening the a new connection.  Instead, it
    was perfectly happy to get back a nil value for the appliance and try to lookup
    Nil#ipaddress.
    
    This fix gets around this problem by throwing the appliance record (miq_server,
    actually) into an ivar and making that available to the thread.  This keeps the
    thread from having to query for the miq_server, while still giving it access to
    the MiqServer#ipaddress.
    
    Original PR:
    https://github.com/ManageIQ/manageiq/pull/3050
    
    Fixes:
    https://bugzilla.redhat.com/show_bug.cgi?id=1232484
    
    References:
    https://bugzilla.redhat.com/show_bug.cgi?id=1224389
    https://bugzilla.redhat.com/show_bug.cgi?id=1223976

 vmdb/lib/workers/mixins/event_catcher_openstack_mixin.rb |  2 +-
 vmdb/lib/workers/worker_base.rb                          | 13 +++++++------
 2 files changed, 8 insertions(+), 7 deletions(-)

Comment 13 Greg Blomquist 2015-10-26 19:21:12 UTC
yeah, this is now a wontfix for 5.5 (and beyond).

CFME no longer supports Qpid in OSP deployments because OSP no longer ships with Qpid as of June of 2015.


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