Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1051093 - [notifier] MAIL_SERVER=----- error could be more understandable
Summary: [notifier] MAIL_SERVER=----- error could be more understandable
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-notification-service
Version: 3.4.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 3.4.0
Assignee: Martin Perina
QA Contact: GenadiC
URL:
Whiteboard: infra
Depends On: 1071536
Blocks: rhev3.4beta 1142926
TreeView+ depends on / blocked
 
Reported: 2014-01-09 16:49 UTC by Jiri Belka
Modified: 2016-02-10 19:43 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-12 14:05:51 UTC
oVirt Team: Infra
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
oVirt gerrit 24471 None None None Never
oVirt gerrit 24699 None None None Never

Description Jiri Belka 2014-01-09 16:49:26 UTC
Description of problem:
MAIL_SERVER value is not checked so carefully as HTML_MESSAGE_FORMAT for example. See comparison:

2014-01-09 17:41:53,475 INFO  [org.ovirt.engine.core.utils.LocalConfig] Value of property "HTML_MESSAGE_FORMAT" is "-11".
...snip...
2014-01-09 17:41:53,723 ERROR [org.ovirt.engine.core.notifier.Notifier] Failed to run the event notification service.
java.lang.IllegalArgumentException: The value "-11" for property "HTML_MESSAGE_FORMAT" is not a valid boolean.
        at org.ovirt.engine.core.utils.LocalConfig.getBoolean(LocalConfig.java:349)


vs

2014-01-09 17:42:42,947 INFO  [org.ovirt.engine.core.utils.LocalConfig] Value of property "MAIL_SERVER" is "---".
...snip...
2014-01-09 17:42:42,957 ERROR [org.ovirt.engine.core.notifier.Notifier] Failed to run the event notification service.
java.net.UnknownHostException: ---
        at java.net.Inet4AddressImpl.lookupAllHostAddr(Native Method)


Version-Release number of selected component (if applicable):
is31 - rhevm-tools-3.3.0-0.44.el6ev.noarch

How reproducible:
100%

Steps to Reproduce:
1. MAIL_SERVER=------
2. restart
3.

Actual results:
not so understandable as one would like

Expected results:
something like...

2014-01-09 17:41:53,723 ERROR [org.ovirt.engine.core.notifier.Notifier] Failed to run the event notification service.
java.lang.IllegalArgumentException: The value "----" for property "MAIL_SERVER" is not a ..... (domain|host|...)

Additional info:

Comment 1 Jiri Belka 2014-01-09 16:50:48 UTC
2014-01-09 17:42:42,957 ERROR [org.ovirt.engine.core.notifier.Notifier] Failed to run the event notification service.
java.net.UnknownHostException: ---
        at java.net.Inet4AddressImpl.lookupAllHostAddr(Native Method)
        at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:901)
        at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1293)
        at java.net.InetAddress.getAllByName0(InetAddress.java:1246)
        at java.net.InetAddress.getAllByName(InetAddress.java:1162)
        at java.net.InetAddress.getAllByName(InetAddress.java:1098)
        at org.ovirt.engine.core.notifier.Notifier.main(Notifier.java:84)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.jboss.modules.Module.run(Module.java:292)
        at org.jboss.modules.Main.main(Main.java:455)

Comment 2 Eli Mesika 2014-02-18 15:36:41 UTC
Moving to assigned due to an abandoned patch

Comment 3 Martin Perina 2014-02-19 06:38:59 UTC
Validation of hostname specified in MAIL_SERVER has been removed completely.

Comment 4 Jiri Belka 2014-03-06 11:18:12 UTC
notifier is broken, see BZ1071536.

Comment 5 GenadiC 2014-03-12 12:47:23 UTC
It's impossible to verify this BZ as due to filter bug, no event would be submitted for sending (see comment 4)

Comment 6 Martin Perina 2014-03-12 13:33:03 UTC
BZ1071536 is fixed in oVirt 3.4.0 RC2, so you can test once new RHEVM build will be prepared

Comment 7 Martin Perina 2014-03-16 13:07:28 UTC
Since BZ1071536 in RHEVM 3.4.0 av3, this can also be verified.

Comment 8 GenadiC 2014-03-23 09:50:09 UTC
No error message.
I got Info message instead of error:  Value of property "MAIL_SERVER" is "----------------------------------------"

Comment 9 Martin Perina 2014-03-24 04:59:46 UTC
That's correct, see comment 3, validation of MAIL_SERVER property is now removed completely. There will be an error in notifier.log when an email cannot be sent to specified server.

Comment 10 GenadiC 2014-03-24 08:44:52 UTC
Verified in av3.1

Comment 11 Itamar Heim 2014-06-12 14:05:51 UTC
Closing as part of 3.4.0


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