Description of problem: rhevm-tools claims its ownership of /etc/ovirt-engine/notifier/notifier.conf but such file does not exist. And it is mentioned in Admin Guide and an admin is supposed to edit this file to override defaults. # rpm -ql rhevm-tools | grep '/etc/.*notifier.conf' /etc/ovirt-engine/notifier/notifier.conf /etc/ovirt-engine/notifier/notifier.conf.d # ls -l /etc/ovirt-engine/notifier/notifier.conf ls: cannot access /etc/ovirt-engine/notifier/notifier.conf: No such file or directory # ls -l /etc/ovirt-engine/notifier/notifier.conf.d/ total 4 # cat /etc/ovirt-engine/notifier/notifier.conf.d/10-setup-jboss.conf JBOSS_HOME="/usr/share/jbossas" Version-Release number of selected component (if applicable): is19 How reproducible: 100% Steps to Reproduce: 1. rpm -ql rhevm-tools 2. ls -l /etc/ovirt-engine/notifier/notifier.conf 3. Actual results: /etc/ovirt-engine/notifier/notifier.conf is missing Expected results: should exist Additional info:
FYI, the service fails as it cannot find MAIL_SERVER defined. I suppose it should be configured during engine-setup as rhevm-tools is installed by default. It would make sense. One question more won't kill anybody, engine-setup is already raising questions about websocket-proxy and redhat-support-plugin (which based on answer creates config file in /etc), so why not to ask if an admin is going to use notifier, if so, then ask him for his mail settings. -%- 2013-10-18 09:55:55,979 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:75) 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) -%- -%- 2013-10-18 09:55:55,943 INFO [org.ovirt.engine.core.utils.LocalConfig] Loaded file "/etc/ovirt-engine/notifier/notifier.conf.d/10-setup-jboss.conf". 2013-10-18 09:55:55,944 INFO [org.ovirt.engine.core.utils.LocalConfig] Value of property "DAYS_TO_KEEP_HISTORY" is "0". 2013-10-18 09:55:55,944 INFO [org.ovirt.engine.core.utils.LocalConfig] Value of property "DAYS_TO_SEND_ON_STARTUP" is "0". 2013-10-18 09:55:55,944 INFO [org.ovirt.engine.core.utils.LocalConfig] Value of property "ENGINE_ETC" is "/etc/ovirt-engine". 2013-10-18 09:55:55,944 INFO [org.ovirt.engine.core.utils.LocalConfig] Value of property "ENGINE_INTERVAL_IN_SECONDS" is "300". 2013-10-18 09:55:55,945 INFO [org.ovirt.engine.core.utils.LocalConfig] Value of property "ENGINE_LOG" is "/var/log/ovirt-engine". 2013-10-18 09:55:55,945 INFO [org.ovirt.engine.core.utils.LocalConfig] Value of property "ENGINE_MONITOR_RETRIES" is "3". 2013-10-18 09:55:55,945 INFO [org.ovirt.engine.core.utils.LocalConfig] Value of property "ENGINE_PID" is "/var/lib/ovirt-engine/ovirt-engine.pid". 2013-10-18 09:55:55,945 INFO [org.ovirt.engine.core.utils.LocalConfig] Value of property "ENGINE_TIMEOUT_IN_SECONDS" is "30". 2013-10-18 09:55:55,945 INFO [org.ovirt.engine.core.utils.LocalConfig] Value of property "ENGINE_USR" is "/usr/share/ovirt-engine". 2013-10-18 09:55:55,946 INFO [org.ovirt.engine.core.utils.LocalConfig] Value of property "FAILED_QUERIES_NOTIFICATION_RECIPIENTS" is "". 2013-10-18 09:55:55,946 INFO [org.ovirt.engine.core.utils.LocalConfig] Value of property "FAILED_QUERIES_NOTIFICATION_THRESHOLD" is "30". 2013-10-18 09:55:55,972 INFO [org.ovirt.engine.core.utils.LocalConfig] Value of property "HTML_MESSAGE_FORMAT" is "false". 2013-10-18 09:55:55,972 INFO [org.ovirt.engine.core.utils.LocalConfig] Value of property "INTERVAL_IN_SECONDS" is "120". 2013-10-18 09:55:55,972 INFO [org.ovirt.engine.core.utils.LocalConfig] Value of property "IS_HTTPS_PROTOCOL" is "false". 2013-10-18 09:55:55,973 INFO [org.ovirt.engine.core.utils.LocalConfig] Value of property "JBOSS_HOME" is "/usr/share/jbossas". 2013-10-18 09:55:55,973 INFO [org.ovirt.engine.core.utils.LocalConfig] Value of property "MAIL_ENABLE_SSL" is "false". 2013-10-18 09:55:55,973 INFO [org.ovirt.engine.core.utils.LocalConfig] Value of property "MAIL_FROM" is "". 2013-10-18 09:55:55,973 INFO [org.ovirt.engine.core.utils.LocalConfig] Value of property "MAIL_PASSWORD" is "". 2013-10-18 09:55:55,974 INFO [org.ovirt.engine.core.utils.LocalConfig] Value of property "MAIL_PORT" is "25". 2013-10-18 09:55:55,974 INFO [org.ovirt.engine.core.utils.LocalConfig] Value of property "MAIL_PORT_SSL" is "465". 2013-10-18 09:55:55,974 INFO [org.ovirt.engine.core.utils.LocalConfig] Value of property "MAIL_REPLY_TO" is "". 2013-10-18 09:55:55,974 INFO [org.ovirt.engine.core.utils.LocalConfig] Value of property "MAIL_SERVER" is "". 2013-10-18 09:55:55,975 INFO [org.ovirt.engine.core.utils.LocalConfig] Value of property "MAIL_USER" is "". 2013-10-18 09:55:55,975 INFO [org.ovirt.engine.core.utils.LocalConfig] Value of property "NOTIFIER_STOP_INTERVAL" is "1". 2013-10-18 09:55:55,975 INFO [org.ovirt.engine.core.utils.LocalConfig] Value of property "NOTIFIER_STOP_TIME" is "30". 2013-10-18 09:55:55,975 INFO [org.ovirt.engine.core.utils.LocalConfig] Value of property "REPEAT_NON_RESPONSIVE_NOTIFICATION" is "false". 2013-10-18 09:55:55,976 INFO [org.ovirt.engine.core.utils.LocalConfig] Value of property "SSL_IGNORE_CERTIFICATE_ERRORS" is "false". 2013-10-18 09:55:55,976 INFO [org.ovirt.engine.core.utils.LocalConfig] Value of property "SSL_IGNORE_HOST_VERIFICATION" is "false". 2013-10-18 09:55:55,976 INFO [org.ovirt.engine.core.utils.LocalConfig] Value of property "SSL_PROTOCOL" is "TLS". -%- -%- # egrep -v "^[ \t]*$|^#" /usr/share/ovirt-engine/services/ovirt-engine-notifier/ovirt-engine-notifier.conf JBOSS_HOME="/usr/share/jbossas" ENGINE_ETC="/etc/ovirt-engine" ENGINE_LOG="/var/log/ovirt-engine" ENGINE_USR="/usr/share/ovirt-engine" NOTIFIER_STOP_TIME=30 NOTIFIER_STOP_INTERVAL=1 INTERVAL_IN_SECONDS=120 MAIL_SERVER= MAIL_PORT=25 MAIL_PORT_SSL=465 MAIL_USER= MAIL_PASSWORD= MAIL_ENABLE_SSL=false HTML_MESSAGE_FORMAT=false MAIL_FROM= MAIL_REPLY_TO= DAYS_TO_KEEP_HISTORY=0 DAYS_TO_SEND_ON_STARTUP=0 FAILED_QUERIES_NOTIFICATION_THRESHOLD=30 FAILED_QUERIES_NOTIFICATION_RECIPIENTS= ENGINE_INTERVAL_IN_SECONDS=300 ENGINE_MONITOR_RETRIES=3 ENGINE_TIMEOUT_IN_SECONDS=30 IS_HTTPS_PROTOCOL=false SSL_PROTOCOL=TLS SSL_IGNORE_CERTIFICATE_ERRORS=false SSL_IGNORE_HOST_VERIFICATION=false REPEAT_NON_RESPONSIVE_NOTIFICATION=false -%-
(In reply to Jiri Belka from comment #0) > Description of problem: > rhevm-tools claims its ownership of /etc/ovirt-engine/notifier/notifier.conf > but such file does not exist. And it is mentioned in Admin Guide and an > admin is supposed to edit this file to override defaults. The notifier is aligned to ovirt-engine configuration using drop dir. The /etc/ovirt-engine/notifier/notifier.conf remained as ghost to allow previous configuration to outlive upgrade. (In reply to Jiri Belka from comment #1) > FYI, the service fails as it cannot find MAIL_SERVER defined. > > I suppose it should be configured during engine-setup as rhevm-tools is > installed by default. It would make sense. One question more won't kill > anybody, engine-setup is already raising questions about websocket-proxy and > redhat-support-plugin (which based on answer creates config file in /etc), > so why not to ask if an admin is going to use notifier, if so, then ask him > for his mail settings. There can be no default to MAIL_SERVER and as far as I know the notifier has service always configured manually. Unlike the websocket proxy, the notifier is not required feature for product core features. So I am unsure about adding it to setup. If you think it should be added, please open a separate RFE for it, most likely it will not happen for 3.3. Thanks!
can't we add an example conf file ?
(In reply to Barak from comment #3) > can't we add an example conf file ? No need, all variables available at /usr/share/ovirt-engine/services/ovirt-engine-notifier/ovirt-engine-notifier.conf which serve as default file. Sames goes to any other service we have.
(In reply to Alon Bar-Lev from comment #4) > (In reply to Barak from comment #3) > > can't we add an example conf file ? > > No need, all variables available at > /usr/share/ovirt-engine/services/ovirt-engine-notifier/ovirt-engine-notifier. > conf which serve as default file. Sames goes to any other service we have. Jiri has a point here, So either we have a commented example conf file, Or have it configured as a part of setup or a separate utility. The customer should not guess the parameters.
(In reply to Barak from comment #5) > (In reply to Alon Bar-Lev from comment #4) > > (In reply to Barak from comment #3) > > > can't we add an example conf file ? > > > > No need, all variables available at > > /usr/share/ovirt-engine/services/ovirt-engine-notifier/ovirt-engine-notifier. > > conf which serve as default file. Sames goes to any other service we have. > > Jiri has a point here, > > So either we have a commented example conf file, > Or have it configured as a part of setup or a separate utility. > The customer should not guess the parameters. if you want to configure this during setup, please file RFE, as it was never supported, and this is new request, unrelated to this bug. Maintaining commented file is incorrect, as it tend to be out of sync, and user tend to update the template, which is incorrect as it cause problem when updating packages as template changes. Maintaining commented file is confusing as using drop dir makes it possible to have multiple configuration file example: /etc/ovirt-engine/notifier/notifier.conf.d/50-mail-server.conf --- MAIL_SERVER=smtp.google.com --- What we can do is add README within /etc/ovirt-engine/engine.conf.d and /etc/ovirt-engine/notifier/notifier.conf.d referring the defaults file.
(In reply to Barak from comment #5) > (In reply to Alon Bar-Lev from comment #4) > > (In reply to Barak from comment #3) > > > can't we add an example conf file ? > > > > No need, all variables available at > > /usr/share/ovirt-engine/services/ovirt-engine-notifier/ovirt-engine-notifier. > > conf which serve as default file. Sames goes to any other service we have. > > Jiri has a point here, > > So either we have a commented example conf file, > Or have it configured as a part of setup or a separate utility. > The customer should not guess the parameters. My point was the existence of the conf file. The conf file is described in the Admin Guide but it does not exist. I do not understand what's so problematic to behave like normally like any daemon - while installing a package, example conf file is placed into /etc, if files is untouched then it is updated if needed during upgrade. Why to reinvent wheel? Imagine you would install for example postfix and you would know there should be conf files in /etc/postfix but this dir would not exist. Pretty stupid right? No an admin have to find where to get such config files... This was my point.
1. admin guide should be updated. 2. 'normal daemon' is not installing example conf into /etc, not any more, it crated too much issues when updating packages (the rpmsave, rpmnew hell). what you refer is the old 'normal daemon' approach. current daemons have documentation of what can be specified in configuration, while user puts only the variables he needs in drop dir that is not overridden by future updates, hence ease maintenance.
packaging: setup: add README file to configuration drop dirs This adds: /etc/ovirt-engine/notifier/notifier.conf.d/README /etc/ovirt-engine/ovirt-websocket-proxy.conf.d/README /etc/ovirt-engine/engine.conf.d/README With the following text: --- xxxx service configuration directory Only *.conf are considered. Files are sorted by name, last wins. Variables available at: /usr/share/ovirt-engine/services/xxx/xxx.conf --- I think this should settle the gap.
ok is21, README file exists. I doubt this is the best approach... Administration Guide was _not_ updates. 2013-11-01 10:13:08,577 WARN [org.ovirt.engine.core.utils.LocalConfig] The file "/etc/ovirt-engine/notifier/notifier.conf" doesn't exist or isn't readable. Will return an empty set of properties.
(In reply to Jiri Belka from comment #10) > ok is21, README file exists. I doubt this is the best approach... > Administration Guide was _not_ updates. This is documentation bug, no? > 2013-11-01 10:13:08,577 WARN [org.ovirt.engine.core.utils.LocalConfig] The > file "/etc/ovirt-engine/notifier/notifier.conf" doesn't exist or isn't > readable. Will return an empty set of properties. This is fine. Thanks!
Closing - RHEV 3.3 Released