Bug 1266139 - CFME needs to subscribe to neutron rabbit exchange for Openstack cloud provider events
CFME needs to subscribe to neutron rabbit exchange for Openstack cloud provid...
Status: VERIFIED
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Providers (Show other bugs)
5.4.0
Unspecified Unspecified
medium Severity medium
: GA
: 5.6.0
Assigned To: Ladislav Smola
Dave Johnson
provider:openstack
: ZStream
Depends On:
Blocks: 1347701
  Show dependency treegraph
 
Reported: 2015-09-24 11:06 EDT by Marius Cornea
Modified: 2018-03-28 17:28 EDT (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1347701 (view as bug list)
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
rrasouli: needinfo-


Attachments (Terms of Use)
cfme timelines (69.14 KB, image/png)
2016-06-15 23:45 EDT, Ronnie Rasouli
no flags Details
evm log (3.12 MB, application/x-xz)
2016-06-15 23:53 EDT, Ronnie Rasouli
no flags Details
events (17.55 KB, text/plain)
2016-06-21 04:29 EDT, Marius Cornea
no flags Details

  None (edit)
Description Marius Cornea 2015-09-24 11:06:35 EDT
Description of problem:
CFME currently uses the quantum exchange for the Openstack cloud provider events. 

In OSP7 the exchange name is neutron:
[root@overcloud-controller-0 neutron]# grep control_exchange neutron.conf 
# control_exchange=openstack
control_exchange=neutron 

https://github.com/ManageIQ/manageiq/blob/master/config/vmdb.tmpl.yml#L291

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

How reproducible:
100%

Steps to Reproduce:
1. Activate neutron notifications on the Openstack controllers
2. Check Timelines for neutron events

Actual results:
No neutron events show up.

Expected results:
Neutron events show up.
Comment 2 Marius Cornea 2015-11-13 06:02:02 EST
We should make sure that we don't get duplicate events if using neutron and quantum.
Comment 3 Ladislav Smola 2015-11-13 07:58:28 EST
https://github.com/ManageIQ/manageiq/pull/5426 only floating ip related events should appear in the timelines
Comment 4 CFME Bot 2015-11-13 11:21:08 EST
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/7131a22745c255f1bc2f9c714c0b5749ca7d7675

commit 7131a22745c255f1bc2f9c714c0b5749ca7d7675
Author:     Ladislav Smola <lsmola@redhat.com>
AuthorDate: Fri Nov 13 13:55:40 2015 +0100
Commit:     Ladislav Smola <lsmola@redhat.com>
CommitDate: Fri Nov 13 13:55:40 2015 +0100

    OpenStack catch Neutron events
    
    OpenStack catch Neutron events
    
    Implements BZ:
    https://bugzilla.redhat.com/show_bug.cgi?id=1266139

 config/vmdb.tmpl.yml | 1 +
 1 file changed, 1 insertion(+)
Comment 5 Ronnie Rasouli 2016-06-15 23:45 EDT
Created attachment 1168557 [details]
cfme timelines
Comment 6 Ronnie Rasouli 2016-06-15 23:49:35 EDT
tested on 5.6.0.10-rc2.1
Created floating-ip and networks

[stack@instack ~]$ ceilometer event-type-list
+-----------------------+
| Event Type            |
+-----------------------+
| identity.authenticate |
| network.create.end    |
| network.create.start  |
| subnet.create.end     |
| subnet.create.start   |
+-----------------------+

The network events did not show up
Comment 7 Ronnie Rasouli 2016-06-15 23:53 EDT
Created attachment 1168558 [details]
evm log
Comment 8 Marek Aufart 2016-06-16 04:08:13 EDT
Network related events should be visible in Network Provider (instead of Cloud Provider).
Comment 9 Ronnie Rasouli 2016-06-16 09:12:59 EDT
nova floating-ip-associate quatInstance 172.16.23.141
nova floating-ip-disassociate quatInstance 172.16.23.141

events showing:
[stack@undercloud ~]$ ceilometer event-type-list
+-------------------------------------+
| Event Type                          |
+-------------------------------------+
| compute.instance.create.end         |
| compute.instance.create.start       |
| compute.instance.delete.end         |
| compute.instance.delete.start       |
| compute.instance.exists             |
| compute.instance.shutdown.end       |
| compute.instance.shutdown.start     |
| compute.instance.update             |
| floatingip.create.end               |
| floatingip.create.start             |
| floatingip.update.end               |
| floatingip.update.start             |
| identity.authenticate               |
| port.create.end                     |
| port.create.start                   |
| port.delete.end                     |
| port.delete.start                   |
| scheduler.select_destinations.end   |
| scheduler.select_destinations.start |
+-------------------------------------+

Very strange why the openstack doesn't report network.floating_ip.deallocate network.floating_ip.allocate
Comment 15 Marius Cornea 2016-06-21 04:28:31 EDT
During the floating ip association operations I noticed the following events received by miq using this script[1]: floatingip.update.start, floatingip.update.end, floatingip.create.start, floatingip.create.end so I believe we don't capture those. According to [2] we're capturing floating_ip.allocate, floating_ip.deallocate, floating_ip.associate, floating_ip.disassociate

CLI commands that I run:

neutron floatingip-associate 548af7f5-57ac-455a-a0b0-0e3ee1ce0a30 8d50f69b-a770-497c-aacb-3960c2a08ad9
neutron floatingip-disassociate 548af7f5-57ac-455a-a0b0-0e3ee1ce0a30 8d50f69b-a770-497c-aacb-3960c2a08ad9
neutron floatingip-create 8e12b1bd-325e-40d7-8af1-81f36f6c7da0

Attaching events captured with the script.

[1] https://raw.githubusercontent.com/ManageIQ/manageiq/master/gems/pending/openstack/test/event_monitor_example.rb
[2] https://github.com/ManageIQ/manageiq/blob/master/config/settings.yml#L580-L583
Comment 16 Marius Cornea 2016-06-21 04:29 EDT
Created attachment 1170147 [details]
events
Comment 17 Ladislav Smola 2016-08-02 12:25:41 EDT
@Marius you should see all the events in MIQ DB, all events are being captured

The settings.yaml holds only definition for which ones you want to display in Timelines. Which is user configurable, so you can test with listing the events you are interested in, by typing them in settings.

We should open an RFE for expanding the default settings.yaml, with more default events.
Comment 18 Marius Cornea 2016-08-04 10:04:27 EDT
(In reply to Ladislav Smola from comment #17)
> @Marius you should see all the events in MIQ DB, all events are being
> captured
> 
> The settings.yaml holds only definition for which ones you want to display
> in Timelines. Which is user configurable, so you can test with listing the
> events you are interested in, by typing them in settings.
> 
> We should open an RFE for expanding the default settings.yaml, with more
> default events.

Could you please provide the steps on how to see the events in the MIQ DB?
Comment 19 Ladislav Smola 2016-08-05 06:26:35 EDT
In rails c, is't either MiqEvent or EmsEvent. Optionally you can specify the wanted events in the settings.yaml and they should show up in the timeline.
Comment 20 Ladislav Smola 2016-08-24 10:06:18 EDT
The additional check is adding the event into config/settings.yml (you can do it through UI), e.g. the same as compute.instance.create.end. And then the events should be visible in provider's timeline.

If there is a network manager, it should be under network manager timelines.
Comment 21 Ronnie Rasouli 2016-09-25 08:41:27 EDT
added under:
   :network:
      :critical:
      - network.floating_ip.allocate
      - network.floating_ip.deallocate
      - network.floating_ip.associate
      - network.floating_ip.disassociate
      - network.create.end
      - network.create.start
      - port.create.end
      - port.create.start
      - port.update.start
      - subnet.create.end
      - subnet.create.start
      - subnet.delete.end
      - subnet.delete.start
I can see in timelines network events.
verified on 5.6.2.0

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