Bug 1479431 - Postinstall scriptlist of nagios-selinux uses wrong page for module.
Postinstall scriptlist of nagios-selinux uses wrong page for module.
Status: CLOSED ERRATA
Product: Fedora EPEL
Classification: Fedora
Component: nagios (Show other bugs)
epel7
Unspecified Linux
unspecified Severity unspecified
: ---
: ---
Assigned To: Stephen John Smoogen
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-08-08 10:36 EDT by Mike Willis
Modified: 2018-04-12 13:46 EDT (History)
12 users (show)

See Also:
Fixed In Version: nagios-4.3.4-5.el7
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2018-04-12 13:46:54 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Mike Willis 2017-08-08 10:36:40 EDT
Description of problem:

When installing nagios-selinux the nagios_epel module is not loaded.

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

nagios-selinux-4.3.2-8.el7.x86_64.rpm


Steps to Reproduce:
1. rpm -ivh nagios-selinux-4.3.2-8.el7.x86_64.rpm
2.
3.

Actual results:

nagios_epel module is not loaded.

[root@konan:production: ~]# semodule -l | grep nagios_epel
[root@konan:production: ~]# 



Expected results:

nagios_epel module is loaded. Or at least there's a message displayed indicating that it failed to load.


Additional info:

Path used to load the module in the postinstall-scriptlet is different to where the module is installed.


if [ "$1" -le "1" ]; then # Fist install
   semodule -i /usr/share/selinux/packages/nagios_epel.pp 2>/dev/null || :
   fixfiles -R nagios restore || :
   
systemctl daemon-reload >/dev/null 2>&1 || : 
if [ $1 -ge 1 ] ; then 
        # Package upgrade, not uninstall 
        systemctl try-restart nagios.service >/dev/null 2>&1 || : 
fi 

fi


[root@konan:production: ~]# rpm -ql nagios-selinux | grep nagios_epel
/usr/share/selinux/packages/nagios/nagios_epel.pp
[root@konan:production: ~]# 

It is not evident that the postinstall-script fails to load the module because errors are sent to /dev/null, which is unhelpful.

Also the postinstall scriptlet seems to have a logic flaw. How will "systemctl try-restart nagios.service" ever get called? The check for $1 being greater than 1 is inside the check for $1 being less than 1.
Comment 1 Fedora Update System 2017-11-20 18:49:15 EST
nagios-4.3.4-5.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-e64eeb6ece
Comment 2 Fedora Update System 2017-11-21 14:32:50 EST
nagios-4.3.4-5.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-2017-e64eeb6ece
Comment 3 Fedora Update System 2018-04-12 13:46:54 EDT
nagios-4.3.4-5.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.

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