Description of problem: When customer activates the host in the maintenance mode, it causes multiple notification pop-ups in RHV admin portal. Though pop-ups are cosmetic but those extra pop-ups are annoying while working in admin portal. Version-Release number of selected component (if applicable): RHEL 7.6 rhvm-4.2.8.3-0.1.el7ev.noarch The client OS - Windows 2008 R2 Browser version - Firefox 64.0.2 (For this user it was happening since RHV4.1, but they raised the concerns now) How reproducible: Steps to Reproduce: 1. Put the host in maintenance mode. 2. Activate the host in maintenance mode. Actual results: Multiple pop-ups appear for single event. Expected results: There should be a single pop-up for single event. Additional info: 1. Restarting ovirt-engine service does not help. 2. Temporary workaround is to stop this notifications pop-up by using "Do Not Disturb" button above the notifications. But customer interested in permanent solution. 3. These pop-ups are not infinite, they stop after 20 or so of them appear and they disappear by themselves except one.
I'm almost sure we are not created mutliple audit log events for signle activation, so it seems to me like UI code issue.
sync2jira
I have set https://github.com/oVirt/ovirt-engine/blob/7002b8bf78c44e7b5ea60896306905812e47430d/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/AuditLogType.java#L1664 to true so that messages will be logged in the db even when the host's status is unassigned (https://github.com/oVirt/ovirt-engine/blob/e84e4831d7dc679e1e7969fbffa559715a43524b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/InitVdsOnUpCommand.java#L414) The last message in the db related to host deploy is- log_type_name | VDS_DETECTED message | Status of host node01 was set to Up. and it appears once, so it looks like this can be an issue with multiple queries of the job in the UI part
As mentioned above we were not able to reproduce the issue, where single event is store multiple times in audit_log table. Also the raised multiple notification about "Finished Activating Host" is not part of audit_log, but it's a result of quering status of a job. So the problem is somewhere in GWT code which is quering jobs and displaying those notifications. Those notification popups were introduced by UX team, so Sharon could you please take over the bug?
This seems a regression after BZ [1]. The fix provided there added explicitly an exception for activating host from maintenance mode. To prevent displaying multiple notifications a timestamp was used. However it seems that in some cases the time resolution is too low - check my comment [2] for details. The general rule seems to work well for all other types of notifications. [1] https://bugzilla.redhat.com/show_bug.cgi?id=1471082 [2] https://gerrit.ovirt.org/c/ovirt-engine/+/82714/5/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/presenter/overlay/TasksPresenterWidget.java#74
Problem is triggered by time difference between client and server. Steps to re-create: 1. adjust clock on the client - move it back to be 2 min earlier then server clock 2. move host to maintenance 3. activate the host Result: notifications are being displayed for ca 2 min
Steps 1: 1. Put the host in maintenance mode. 2. Activate the host in maintenance mode. Steps 2: 1. adjust clock on the client - move it back to be 2 min earlier then server clock 2. move host to maintenance 3. activate the host Results: I was not able to reproduce the issue with either duplicate events or prolonged notifications. Verified in: ovirt-engine-4.5.0.2-0.7.el8ev.noarch
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 (Moderate: RHV Manager (ovirt-engine) [ovirt-4.5.0] security update), 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-2022:4711