This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 1020793 - [notifier] If Alert and Issue Solved Notifications are both discovered during next iteration, the order is messed
[notifier] If Alert and Issue Solved Notifications are both discovered during...
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-notification-service (Show other bugs)
3.3.0
Unspecified Unspecified
unspecified Severity urgent
: ---
: 3.4.0
Assigned To: Mooli Tayer
Pavel Stehlik
infra
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-18 05:39 EDT by Jiri Belka
Modified: 2016-02-10 14:10 EST (History)
7 users (show)

See Also:
Fixed In Version: ovirt-3.4.0-alpha1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-06-12 10:03:49 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Infra
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
notifier.log (7.12 KB, application/x-gzip)
2013-10-18 05:39 EDT, Jiri Belka
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 20870 None None None Never

  None (edit)
Description Jiri Belka 2013-10-18 05:39:50 EDT
Created attachment 813685 [details]
notifier.log

Description of problem:
If Alert and Issue Solved Notifications are both check during next iteration, the order is messed. It means, when "opening" event such as 'Migration started', which in notifier language called 'Alert Notification' and its "closing" event, here 'Migration completed', in notifier language called 'Issue Solved Notification', are both discovered during next iteration (after INTERNAL_IN_SECONDS, defaults to 120 secs), the order how the events are sent via mail is messed. First is sent closing event then opening.

-%-
2013-10-18 10:54:43,530 DEBUG [org.ovirt.engine.core.notifier.NotificationService] Finish event notification service iteration
2013-10-18 10:55:32,976 DEBUG [org.ovirt.engine.core.notifier.EngineMonitorService] checkServerStatus return: true
2013-10-18 10:56:43,531 DEBUG [org.ovirt.engine.core.notifier.NotificationService] Start event notification service iteration
2013-10-18 10:56:43,545 DEBUG [org.ovirt.engine.core.notifier.utils.sender.mail.EventSenderMailImpl] Send email to [jbelka@redhat.com]
 subject:
 [Issue Solved Notification. (jb-rh33.rhev.lab.eng.brq.redhat.com), [Migration completed (VM: jb-w8-x86, Source: dell-r210ii-13, Destination: dell-r210ii-03, Duration: 41 sec).]]
 body:
 [Time:2013-10-18 10:55:45.237
Message:Migration completed (VM: jb-w8-x86, Source: dell-r210ii-13, Destination: dell-r210ii-03, Duration: 41 sec).
Severity:0
User Name: admin@internal
VM Name: jb-w8-x86
Host Name: dell-r210ii-13
Template Name: Blank
Data Center Name: Default
]
2013-10-18 10:56:45,027 DEBUG [org.ovirt.engine.core.notifier.utils.sender.mail.EventSenderMailImpl] Send email to [jbelka@redhat.com]
 subject:
 [Alert Notification. (jb-rh33.rhev.lab.eng.brq.redhat.com), [Migration started (VM: jb-w8-x86, Source: dell-r210ii-13, Destination: dell-r210ii-03, User: admin@internal).]]
 body:
 [Time:2013-10-18 10:55:03.305
Message:Migration started (VM: jb-w8-x86, Source: dell-r210ii-13, Destination: dell-r210ii-03, User: admin@internal).
Severity:0
User Name: admin@internal
VM Name: jb-w8-x86
Host Name: dell-r210ii-13
Template Name: Blank
Data Center Name: Default
]
-%-

This is obviously an error. Notifier should know correlation between events. First Alert, then Issue Solved (if any).

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

How reproducible:
100%

Steps to Reproduce:
1. put notifier into debug level
2. wait for 'Finish event notification service iteration' in the log
3. start a migration of simple VM (no big disk! so it can be migrated inside INTERVAL_IN_SECONDS value)
4. double-check if your migration finished before next 'Start event notification service iteration'
5. If so, see next lines for 'Send mail' and their subject

Actual results:
first is sent "closing" notification, then "opening"

Expected results:
smarter notifier

Additional info:
Comment 1 Mooli Tayer 2013-11-04 10:02:23 EST
Patch proposed upstream -
Notification will now be sent according to creation time.
Note It is still possible that I send Message a and then Message b and b is received first, but I don't see any solution for that.
Comment 2 Sandro Bonazzola 2014-01-14 03:42:47 EST
ovirt 3.4.0 alpha has been released
Comment 3 Jiri Belka 2014-01-27 05:24:14 EST
ok, ovirt-engine-tools-3.4.0-0.2.master.20140112020439.git9ad8529.el6.noarch

2014-01-27 10:23:04,952 INFO  [org.ovirt.engine.core.notifier.utils.sender.mail.EventSenderMailImpl] Send email to [jbelka@redhat.com]
 subject:
 [Alert Notification. (jb-rh34.rhev.lab.eng.brq.redhat.com), [Host dell-r210ii-13 was switched to Maintenance mode by admin@internal.]]
2014-01-27 10:23:04,952 DEBUG [org.ovirt.engine.core.notifier.utils.sender.mail.EventSenderMailImpl] body:
 [Time:2014-01-27 10:21:07.957
Message:Host dell-r210ii-13 was switched to Maintenance mode by admin@internal.
Severity:0
User Name: admin@internal
Host Name: dell-r210ii-13
]
2014-01-27 10:23:06,790 INFO  [org.ovirt.engine.core.notifier.utils.sender.mail.EventSenderMailImpl] Send email to [jbelka@redhat.com]
 subject:
 [Issue Solved Notification. (jb-rh34.rhev.lab.eng.brq.redhat.com), [Host dell-r210ii-13 was activated by admin@internal.]]
2014-01-27 10:23:06,790 DEBUG [org.ovirt.engine.core.notifier.utils.sender.mail.EventSenderMailImpl] body:
 [Time:2014-01-27 10:21:12.901
Message:Host dell-r210ii-13 was activated by admin@internal.
Severity:0
User Name: admin@internal
Host Name: dell-r210ii-13
]
Comment 4 Itamar Heim 2014-06-12 10:03:49 EDT
Closing as part of 3.4.0

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