Bug 1486695

Summary: Multiple notifications when embedded ansible role fails to start
Product: Red Hat CloudForms Management Engine Reporter: Vatsal Parekh <vparekh>
Component: ApplianceAssignee: Nick Carboni <ncarboni>
Status: CLOSED ERRATA QA Contact: Kedar Kulkarni <kkulkarn>
Severity: medium Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: abellott, cbolz, cpelland, hkataria, ikaur, jfrey, jhardy, mpovolny, ncarboni, ncatling, niroy, obarenbo, pmukhedk, simaishi, smallamp
Target Milestone: GA   
Target Release: 5.10.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.10.0.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-02-07 23:02:39 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: CFME Core Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Screenshot none

Description Vatsal Parekh 2017-08-30 11:24:21 UTC
Created attachment 1320032 [details]
Screenshot

Description of problem:
After enabling Embedded ansible from configuration, getting multiple notification of the same thing 'The role Embedded Ansible has started activation on server EVM' for 30+ times

Version-Release number of selected component (if applicable):
Version master.20170830014642_aa4dab9

How reproducible:


Steps to Reproduce:
1.Enable Embedded ansible with some other roles
2.Multiple notifications occur 
3.

Actual results:


Expected results:
Only single notification for single activity

Additional info:

Comment 2 ncatling 2017-09-21 14:53:28 UTC
I'm seeing this in CFME 5.8.1.5.

300+ notifications in the last 30 minutes following evm:restart.

production log shows:
INFO -- : [ActionCable] Broadcasting to notifications_1: {:level=>"info", :created_at=>Thu, 21 Sep 2017 14:19:35 UTC +00:00, :text=>"The role %{role_name} has started activation on
server %{server_name}", :bindings=>{:role_name=>{:text=>"Embedded Ansible"}, :server_name=>{:text=>"EVM"}}}

Embedded Ansible was already enabled.

Comment 10 Imaan 2017-11-07 11:50:14 UTC
Team,

Customer is getting Multiple notification on same activity. For example Virtual machine vm_name01 has been provisioned successfully.

Version: 5.8.2.3

Comment 13 Nick Carboni 2018-01-02 14:34:37 UTC
This is looking more like a general request to de-duplicate notifications.

As for the embedded ansible case, adding the role to settings.yml will not help as that just tells the server what roles to set on startup. If your setup is failing constantly you will still see the notification that we are attempting to initialize the role every time we try. I don't think there is anything we can change about that unless we do some generic notification dedup.

As for the provisioning notification, there is likely an issue in the underlying provisioning system which is causing those notifications. I would raise a bug targeting that rather than just trying to hide the notifications.

Jason, do you think we should do notification dedup or just close this?

Comment 15 Nick Carboni 2018-02-16 14:11:04 UTC
Prasad,

Yes, I would open a new bug about getting multiple notifications for provisioning based on the number of groups assigned.

I'll update the title here to make this specific to the issue where the embedded ansible role is failing to start, which also generates many notifications.

Also

Comment 17 CFME Bot 2018-05-09 17:55:45 UTC
New commit detected on ManageIQ/manageiq/master:

https://github.com/ManageIQ/manageiq/commit/92884fefccdb6a773e5b14e46ddb08b41b6396c0
commit 92884fefccdb6a773e5b14e46ddb08b41b6396c0
Author:     Nick Carboni <ncarboni>
AuthorDate: Tue May  8 15:03:10 2018 -0400
Commit:     Nick Carboni <ncarboni>
CommitDate: Tue May  8 15:03:10 2018 -0400

    Deduplicate notifications for the embedded ansible role

    This commit changes the notification behavior so that a new notification
    is only created when either there is no existing one for that server
    or the existing one has been read.

    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1486695

 app/models/embedded_ansible_worker/runner.rb | 7 +-
 spec/models/embedded_ansible_worker/runner_spec.rb | 87 +-
 2 files changed, 63 insertions(+), 31 deletions(-)

Comment 18 Kedar Kulkarni 2018-07-02 15:46:03 UTC
On  5.10.0.2.20180626170006_40dc459 I saw there were only 2 notifications when I tried to activate the embedded ansible role, 1 immediately after it started activation and 1 after it was activated.

Comment 19 errata-xmlrpc 2019-02-07 23:02:39 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/RHSA-2019:0212