Bug 998928 - RHS-C: No error message seen while starting "ovirt-engine-notifier" when "MAIL_SERVER" is NOT defined
Summary: RHS-C: No error message seen while starting "ovirt-engine-notifier" when "MAI...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: rhsc
Version: 2.1
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Bala.FA
QA Contact: Prasanth
URL:
Whiteboard:
: 1058635 (view as bug list)
Depends On:
Blocks: 957769 1035040
TreeView+ depends on / blocked
 
Reported: 2013-08-20 11:05 UTC by Prasanth
Modified: 2014-09-22 19:07 UTC (History)
16 users (show)

Fixed In Version: rhsc-3.0.0-0.12.el6rhs
Doc Type: Bug Fix
Doc Text:
Previously, there were no errors reported when you start the ovirt-engine-notifier and there was no notification that the ovirt-engine-notifier started successfully. With this fix, the error message "No transport is enabled, nothing to do" is displayed when starting the "ovirt-engine-notifier" when "MAIL_SERVER" is not defined
Clone Of: 989382
Environment:
Last Closed: 2014-09-22 19:07:08 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2014:1277 0 normal SHIPPED_LIVE Red Hat Storage Console 3.0 enhancement and bug fix update 2014-09-22 23:06:30 UTC

Description Prasanth 2013-08-20 11:05:20 UTC
+++ This bug was initially created as a clone of Bug #989382 +++

Description of problem:

No error message seen while starting "ovirt-engine-notifier" when "MAIL_SERVER" is NOT defined

Version-Release number of selected component (if applicable):  Red Hat Storage Console Version: 2.1.0-0.bb6.el6rhs 


How reproducible: Always


Steps to Reproduce:
1. # /etc/init.d/ovirt-engine-notifier start
2 .# /etc/init.d/ovirt-engine-notifier status


Actual results:

[root@rhs-client3 conf]# /etc/init.d/ovirt-engine-notifier start
Starting oVirt Engine Notifier:                            [  OK  ]                                                                                                                           
[root@rhs-client3 conf]# /etc/init.d/ovirt-engine-notifier status
 dead but pid file exists


Expected results:

If the MAIL_SERVER is not defined, we should be getting a meaningful error message something like: "Error: $MAIL_SERVER is not defined, please check for this in configuration file" instead of simply starting the service and showing the status as "dead but pid file exists". In short, the error message should be proper and provide a useful message to the user.

--- Additional comment from RHEL Product and Program Management on 2013-07-29 04:16:45 EDT ---

Since this issue was entered in bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

--- Additional comment from Sahina Bose on 2013-07-31 10:12:58 EDT ---

The issue still exists so moving back to Assigned

--- Additional comment from Alon Bar-Lev on 2013-08-07 02:28:01 EDT ---

Yair,
What about this one?
Alon

--- Additional comment from Yair Zaslavsky on 2013-08-12 08:45:12 EDT ---

infra will take ownership of tihs one.

--- Additional comment from Alon Bar-Lev on 2013-08-13 06:12:18 EDT ---

To summarize:

Any error of service startup should be written to the service log file:

/var/log/ovirt-engine/notifier/notifier.log

The problem in rhel is that for some reason the log file is created but no messages are written into. This works OK on fedora with the same configuration.

--- Additional comment from Martin Perina on 2013-08-13 06:43:41 EDT ---

Can you see an error in /var/log/ovirt-engine/notifier/notifier.log? In particular there should be something like:

Check configuration file, 'MAIL_SERVER' is missing

If your notifier.log is empty, then it's a problem described in http://bugzilla.redhat.com/989422

--- Additional comment from Prasanth on 2013-08-19 06:29:14 EDT ---

(In reply to Martin Perina from comment #6)
> Can you see an error in /var/log/ovirt-engine/notifier/notifier.log? In
> particular there should be something like:
> 
> Check configuration file, 'MAIL_SERVER' is missing
> 
> If your notifier.log is empty, then it's a problem described in
> http://bugzilla.redhat.com/989422

Yes, I can see the following in the logs:

-------------
2013-08-19 15:57:19,584 ERROR [org.ovirt.engine.core.notifier.Notifier] Failed to run the event notification service. 
java.lang.IllegalArgumentException: Check configuration file, 'MAIL_SERVER' is missing
        at org.ovirt.engine.core.notifier.Notifier.main(Notifier.java:82)
        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:270)
        at org.jboss.modules.Main.main(Main.java:411)
-------------

--- Additional comment from Alon Bar-Lev on 2013-08-19 06:53:56 EDT ---

(In reply to Prasanth from comment #7)
> (In reply to Martin Perina from comment #6)
> > Can you see an error in /var/log/ovirt-engine/notifier/notifier.log? In
> > particular there should be something like:
> > 
> > Check configuration file, 'MAIL_SERVER' is missing
> > 
> > If your notifier.log is empty, then it's a problem described in
> > http://bugzilla.redhat.com/989422
> 
> Yes, I can see the following in the logs:
> 
> -------------
> 2013-08-19 15:57:19,584 ERROR [org.ovirt.engine.core.notifier.Notifier]
> Failed to run the event notification service. 
> java.lang.IllegalArgumentException: Check configuration file, 'MAIL_SERVER'
> is missing

So we are ok. Strange how the jboss change does not effect your environment.

Comment 2 Scott Haines 2013-09-23 23:35:00 UTC
Targeting for 2.1.z U2 (Corbett) release.

Comment 3 Shalaka 2013-12-26 10:17:53 UTC
This bug has been identified as known issue, hence, please add the DocText.

Comment 4 Dusmant 2014-02-04 10:00:34 UTC
*** Bug 1058635 has been marked as a duplicate of this bug. ***

Comment 5 Shalaka 2014-02-06 10:13:14 UTC
Please review the edited Doc Text ans sign off.

Comment 6 Bala.FA 2014-02-06 10:55:34 UTC
why can't we have similar doc text as this bz#989382?

Comment 7 Sahina Bose 2014-07-08 10:58:06 UTC
Moving this to ON_QA as the issue was fixed upstream and is now available in RHSC 3.0

Comment 8 Prasanth 2014-07-09 11:50:14 UTC
(In reply to Sahina Bose from comment #7)
> Moving this to ON_QA as the issue was fixed upstream and is now available in
> RHSC 3.0

I don't see that it's fixed in RHSC 3.0 during my testing. See below:

#################################
[root@dhcp42-228 ]# /etc/init.d/ovirt-engine-notifier start
Starting oVirt Engine Notifier: 
Validation result:
stderr: No transport is enabled, nothing to do
Validation failed returncode is 1:
                                                           [FAILED]
 
[root@dhcp42-228 ]# /etc/init.d/ovirt-engine-notifier status
ovirt-engine-notifier is stopped
#################################


From notifier.log:
#################################
2014-07-09 17:00:03,624 ERROR [org.ovirt.engine.core.notifier.Notifier] Failed to initialize
java.lang.RuntimeException: No transport is enabled, nothing to do
        at org.ovirt.engine.core.notifier.Notifier.main(Notifier.java:63)
        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:312)
        at org.jboss.modules.Main.main(Main.java:460)
#################################


However, looking at https://bugzilla.redhat.com/show_bug.cgi?id=989382#c16 from the cloned RHEVM bug, I could see the following as the fix:

*****************
Verified in  3.4.0-0.7.beta2.el6.

[root@pb-rh34 ~]# /etc/init.d/ovirt-engine-notifier start
Starting oVirt Engine Notifier: 
Validation result:
stderr: Check configuration file, 'MAIL_SERVER' is missing
Validation failed returncode is 1:
                                                           [FAILED]
[root@pb-rh34 ~]# /etc/init.d/ovirt-engine-notifier status
ovirt-engine-notifier is stopped
*****************

Can you check and confirm if the corresponding patch in upstream for this bug is actually availalbe in RHSC 3.0 or if I'm missing something here?

Comment 9 Sahina Bose 2014-07-09 14:39:22 UTC
Yes, it is available..
From your test results, the error in the notifier.log is the same as the one that is displayed in the Validation result 
"No transport is enabled, nothing to do"

The reason you see different messages from that mentioned in bug 989382, is because of refactoring done to support SNMP trap as a notification method and hence the generic error message. 
If neither SNMP_MANAGERS nor MAIL_SERVER is configured, this is the message returned.

Comment 10 Prasanth 2014-07-15 08:01:32 UTC
(In reply to Sahina Bose from comment #9)
> Yes, it is available..
> From your test results, the error in the notifier.log is the same as the one
> that is displayed in the Validation result 
> "No transport is enabled, nothing to do"
> 
> The reason you see different messages from that mentioned in bug 989382, is
> because of refactoring done to support SNMP trap as a notification method
> and hence the generic error message. 
> If neither SNMP_MANAGERS nor MAIL_SERVER is configured, this is the message
> returned.

If the above mentioned error message is the expected result for both rhsc and rhevm, you may move this bug back to ON_QA for further verification. 

But I feel that the following error message gives more meaningful message to the customers:

-----
stderr: Check configuration file, 'MAIL_SERVER'or SNMP_MANAGERS is missing
Validation failed returncode is 1:
-----

What is your thought on that?

Comment 11 Sahina Bose 2014-07-18 05:41:45 UTC
Moving bug back as this is the expected error in both RHSC and RHEVM currently.

Regarding the suggested error message, yes - this is more informative. This could be incorporated in a later release if feasible. Adding mperina for info

Comment 12 Prasanth 2014-07-18 07:34:23 UTC
(In reply to Sahina Bose from comment #11)
> Moving bug back as this is the expected error in both RHSC and RHEVM
> currently.
> 
> Regarding the suggested error message, yes - this is more informative. This
> could be incorporated in a later release if feasible. Adding mperina for info

Based on the above comment, marking this bug as Verified.

#########
[root@dhcp42-228 ~]# /etc/init.d/ovirt-engine-notifier start
Starting oVirt Engine Notifier: 
Validation result:
stderr: No transport is enabled, nothing to do
Validation failed returncode is 1:
                                                           [FAILED]
[root@dhcp42-228 ~]# 
[root@dhcp42-228 ~]# 
[root@dhcp42-228 ~]# /etc/init.d/ovirt-engine-notifier status
ovirt-engine-notifier is stopped
#########

Once I hear from mperina, I'll go ahead and open a BZ for improving this error message.

Comment 13 Martin Perina 2014-09-01 13:23:45 UTC
It's not a problem to change error message, I created following bug BZ1136026 for this with suggested error message:

  "No transport is enabled, please enable at least one of SMTP (using MAIL_SERVER option) or SNMP (using SNMP_MANAGERS option) transports"

If you would like to change it, please suggest different content in BZ1136026

Comment 14 Bhavana 2014-09-20 11:56:41 UTC
Hi Bala, 

I have edited the doc text. Kindly verify it for technical accuracy and sign-off.

Comment 15 Bala.FA 2014-09-20 12:44:44 UTC
Looks good to me.

Comment 17 errata-xmlrpc 2014-09-22 19:07:08 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.

http://rhn.redhat.com/errata/RHEA-2014-1277.html


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