Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1517925
Summary: | Updating nagios package causes nagios service to be disabled. | ||
---|---|---|---|
Product: | [Fedora] Fedora EPEL | Reporter: | Mike Willis <mike.willis> |
Component: | nagios | Assignee: | Stephen John Smoogen <smooge> |
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | high | Docs Contact: | |
Priority: | unspecified | ||
Version: | epel7 | CC: | affix, athmanem, b.heden, herrold, jose.p.oliveira.oss, lemenkov, linux, mike.willis, ondrejj, shawn.starr, smooge, smooge, s, swilkerson |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | nagios-4.4.3-1.el7 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2019-02-02 00:39:37 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Mike Willis
2017-11-27 17:20:36 UTC
Thank you for finding that problem. I will put in a fix in the next set of packages though I am not sure why I didn't see this happen on our production boxes before. I will check with Fedora package group if I can safely remove the /dev/null or if it will cause noise or other problems. This issue is present in nagios-4.3.4-5.el7. OK I thought I fixed it but I clearly didn't. There seems to be some logic the %preun is doing when I thought it wouldn't. I think the problem is in %post not %pre The commands in %preun have if [ $1 -eq 0 ] ; then fi around them which (according to https://fedoraproject.org/wiki/Packaging:Scriptlets) will only be true when the package is being uninstalled. %post still has this in /usr/bin/systemctl --no-reload preset nagios.service with no conditional around it and if that's run without sending all the output in to /dev/null this is what's displayed [root@foo: ~]# /usr/bin/systemctl --no-reload preset nagios.service Removed symlink /etc/systemd/system/multi-user.target.wants/nagios.service. [root@foo: ~]# I think that command needs to have a conditional around it so that it only gets run on install, not upgrade. Or maybe it could be removed entirely since there is no systemd preset file in the package and the default is disabled. As reported in the mailing list, the nagios update bump did NOT disable or remove and enable. Then again ,I was pre-testing items from smooge. My local issue seemed to be stricter parsing of config files, and the problem was made visible by 'pre-flighting' rules (and not the more generic 'weak tea' from systemd) My rubric to address the matter was: grep nagios /var/log/messages ... and look for noise ... this was probably optional, but as it did not rule silently, I ... did 'one off' relabels of editted rules cd /etc/nagios/ restorecon -Rv nagios.cfg /usr/sbin/nagios -v /etc/nagios/nagios.cfg ... and edit as needed ... once it preflights silently: systemctl restart nagios.service ... optionally, as it adds a 'belt and suspenders' enablement: systemctl enable nagios.service (In reply to R P Herrold from comment #5) > As reported in the mailing list, the nagios update bump did NOT disable or > remove and enable. Installing nagios-4.3.4.3.el7 as an update disabled the nagios service on my servers. Installing nagios-4.3.4-5.el7 disabled the nagios service on my servers. I have recreated the issue by installing an older version of the rpm, ensuring the nagios service is enabled, running "yum update", watching the nagios package get updated, then observing that the nagios service is disabled. > My local issue seemed to be stricter parsing of config files I don't see the relevance of any of that to the issue I opened this bug report about. I have built nagios-4.3.4-10.el7 which should have this fixed in it. It should show up in the epel testing in 1-2 days. Its upstream build is https://koji.fedoraproject.org/koji/taskinfo?taskID=26584394 Please test and let me know nagios-4.3.4-10.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-a010142a4d I've installed the nagios-4.3.4-10.el7 packages and the nagios service is still enabled. :D What's the reason(s) for sending all output of every command in %post %pre %whatever to /dev/null ? The usual reasons are: 1. Output can be sent to the screen in weird ways which tools are not expecting. This can cause tools to crash or do unexpected things. 2. Putting the data in a file can cause problems because it is not tracked by most tools and rpm -Uvh *rpm would fill up various systems. nagios-4.3.4-10.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-a010142a4d nagios-4.3.4-13.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-41e9ecf98a nagios-4.3.4-13.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-41e9ecf98a nagios-4.4.2-3.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-0346a55d0f nagios-4.4.2-3.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-0346a55d0f *** Bug 1568273 has been marked as a duplicate of this bug. *** nagios-4.4.3-1.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2019-d661b588d2 nagios-4.4.3-1.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2019-d661b588d2 nagios-4.4.3-1.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report. |