Bug 1264109 - [events] There is no separate VDS_LOW_MEM event for subscription
[events] There is no separate VDS_LOW_MEM event for subscription
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine (Show other bugs)
3.6.0
Unspecified Unspecified
medium Severity medium
: ovirt-3.6.1
: ---
Assigned To: Moti Asayag
Jiri Belka
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-09-17 10:10 EDT by Jiri Belka
Modified: 2016-04-19 21:30 EDT (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-04-19 21:30:41 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)


External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 46425 ovirt-engine-3.6 MERGED webadmin: Add event for host low memory Never
oVirt gerrit 46426 master MERGED webadmin: Add event for host low memory Never
oVirt gerrit 47002 ovirt-engine-3.6 MERGED webadmin: Clarify host low free memory message Never
oVirt gerrit 47004 master MERGED webadmin: Clarify host low free memory message Never

  None (edit)
Description Jiri Belka 2015-09-17 10:10:56 EDT
Description of problem:
Surprisingly BZ1145983 unlinked VDS_LOW_MEM and VDS_LOW_SWAP. But there's only 'Host free swap memory is under defined threshold' for subscription in UI.

It seems the two config options were unlinked correctly (https://bugzilla.redhat.com/show_bug.cgi?id=1145983#c5) but to get notification it seems one has to assigned 'Host free swap memory is under defined threshold' to get info about any of these two events :)

Anyway, there should be separate VDS_LOW_MEM for subscription in UI with title:

  'Host free memory is under defined threshold'

And the message should be:

  'Available memory of host ${host} [${curr_free_mem} MB] is under defined threshold [${threshold} MB].'

Why? I need to monitor there's a specific amount of free memory on hosts for guaranteeing hosted-engine will start on such hosts if it crashed on the one where it is currently running.

Worth backporting https://bugzilla.redhat.com/show_bug.cgi?id=1145983 to ZStream?

Version-Release number of selected component (if applicable):
3.5.4/3.6.0

How reproducible:
100%

Steps to Reproduce:
1. try to assign from UI for 'Available memory of host... under defined...' / Host free memory is under defined threshold'
2.
3.

Actual results:
seems not possible to subscribe for VDS_LOW_MEM with its own uniq title in UI (manage events in ui)

Expected results:
should be possible

Additional info:

[root@jb-rhevm36 tmp]# egrep "VDS_LOW_(MEM|SWAP)" /usr/share/doc/ovirt-engine/AuditLogMessages.properties                                                                                                           
VDS_LOW_MEM=Available memory of host ${HostName} [${AvailableMemory} MB] is under defined threshold [${Threshold} MB].
VDS_LOW_SWAP=Available swap memory of host ${HostName} [${AvailableSwapMemory} MB] is under defined threshold [${Threshold} MB].
[root@jb-rhevm36 tmp]# egrep -IR "VDS_LOW_(MEM|SWAP)" /usr/share/ovirt-engine/dbscripts
/usr/share/ovirt-engine/dbscripts/data/01500_insert_event_map.sql:INSERT INTO event_map (event_up_name, event_down_name) VALUES ('VDS_LOW_SWAP', '');
Comment 1 Jiri Belka 2015-09-30 10:56:39 EDT
sorry but the message you invested is odd and it brings even more confusion:

--- a/frontend/webadmin/modules/uicompat/src/main/resources/org/ovirt/engine/ui/uicompat/LocalizedEnums.properties
+++ b/frontend/webadmin/modules/uicompat/src/main/resources/org/ovirt/engine/ui/uicompat/LocalizedEnums.properties
@@ -500,6 +500,7 @@ AuditLogType___VDS_SET_NONOPERATIONAL=Host state was set to non-operational
 AuditLogType___VDS_SET_NONOPERATIONAL_IFACE_DOWN=Host state was set to non-operational due to a missing Interface
 AuditLogType___VDS_SET_NONOPERATIONAL_DOMAIN=Host state was set to non-operational due to inaccessible Storage Domain
 AuditLogType___SYSTEM_CHANGE_STORAGE_POOL_STATUS_NO_HOST_FOR_SPM=Failed electing an SPM for the Data-Center
+AuditLogType___VDS_LOW_MEM=Host memory usage is under defined threshold
 AuditLogType___VDS_HIGH_MEM_USE=Host memory usage exceeded defined threshold
 AuditLogType___HOST_INTERFACE_HIGH_NETWORK_USE=Host network interface usage exceeded defined threshold
 AuditLogType___VDS_HIGH_CPU_USE=Host cpu usage exceeded defined threshold

oddness of the text above describes already long existing msg below:

#  egrep "VDS_LOW_MEM" /usr/share/doc/ovirt-engine/AuditLogMessages.properties
VDS_LOW_MEM=Available memory of host ${HostName} [${AvailableMemory} MB] is under defined threshold [${Threshold} MB].

i hope it is clear that the value is to get alert when free memory falls below defined threshold.

no idea why NIH syndrom ignored my original descr and proposition.
Comment 2 Jiri Belka 2015-10-29 12:52:41 EDT
I still see bad/old text for VDS_LOW_MEM in Users -> $user -> Event Notifier -> Manage Events - General Host Events.

now - Host memory usage is under defined threshold
should be - Host free memory is under defined threshold
Comment 3 Moti Asayag 2015-10-29 16:41:56 EDT
The patch was merged to ovirt-engine-3.6 branch and not to 3.6.0, therefore it will be available later on, when rhevm will be based on ovirt-engine-3.6 branch.

There is no good way to update the bug to reflect the fixed version since it was opened on product RHEVM instead of ovirt.

The bug will remain on POST, and will be moved to MODIFIED when applicable.
Comment 4 Oved Ourfali 2015-11-24 02:06:19 EST
Bug should be on MODIFIED. Once 3.6.1 is build, it will be moved to ON_QA.
Comment 5 Jiri Belka 2015-12-03 06:20:46 EST
ok, rhevm-3.6.1.1-0.1.el6.noarch

# grep 'message=.*Available memory' /var/log/ovirt-engine/notifier/notifier.log | nl
     1  2015-12-03 12:14:32,905 FINE    [org.ovirt.engine.core.notifier.dao.EventsManager getAuditLogEvents] event 0 => AuditLogEvent:{id='1710', logTypeName='VDS_LOW_MEM', type='alertMessage', userId='00000000-0000-0000-0000-000000000000', userName='null', vmId='00000000-0000-0000-0000-000000000000', vmName='null', vmTemplateId='null', vmTemplateName='null', vdsId='f20224c4-5d58-4680-a73b-335ee061cde6', vdsName='dell-r210ii-13.rhev.lab.eng.brq.redhat.com', storagePoolId='00000000-0000-0000-0000-000000000000', storagePoolName='', storageDomainId='00000000-0000-0000-0000-000000000000', storageDomainName='', logTime='2015-12-03 12:14:25.976', severity='WARNING', message='Available memory of host dell-r210ii-13.rhev.lab.eng.brq.redhat.com [6991 MB] is under defined threshold [7168 MB].'}

# grep Message: /var/log/ovirt-engine/engine.log  | sed 's/^.*\(Message:.*\)/\1/' | grep 'Available memory'
Message: Available memory of host dell-r210ii-13.rhev.lab.eng.brq.redhat.com [6991 MB] is under defined threshold [7168 MB].

2015-12-03 12:14:47,905 FINE    [org.ovirt.engine.core.notifier.transport.smtp.Smtp idle] Send mail body='Time:2015-12-03 12:14:25.976
Message:Available memory of host dell-r210ii-13.rhev.lab.eng.brq.redhat.com [6991 MB] is under defined threshold [7168 MB].
Severity:WARNING
Host Name: dell-r210ii-13.rhev.lab.eng.brq.redhat.com
'

Mail received.

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