Bug 191046 - Nagios initscript fails to stop the daemon
Summary: Nagios initscript fails to stop the daemon
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: nagios
Version: 5
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Mike McGrath
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-05-08 13:42 UTC by Pedro Fernandes Macedo
Modified: 2007-11-30 22:11 UTC (History)
1 user (show)

(edit)
Clone Of:
(edit)
Last Closed: 2006-05-10 01:12:49 UTC


Attachments (Terms of Use)
Patch for nagios initscript (810 bytes, patch)
2006-05-08 13:42 UTC, Pedro Fernandes Macedo
no flags Details | Diff
Test of the original initscript (8.78 KB, text/plain)
2006-05-09 22:34 UTC, Pedro Fernandes Macedo
no flags Details

Description Pedro Fernandes Macedo 2006-05-08 13:42:00 UTC
The initscript shipped currently has two issues:
1 - it doesnt set the PID on /var/run/nagios.pid, thus being unable to properly
stop the daemon
2 - it tries to run commands as the nagios user, through usage of "su - nagios
-c ". Since the rpm creates the user with the nologin shell, the message "This
account is currently not available." is shown.

The attached patch replaces the su call with similar commands that dont require
the usage of the nagios user account and the necessary call to set the pid on
/var/run/nagios.pid.

Comment 1 Pedro Fernandes Macedo 2006-05-08 13:42:00 UTC
Created attachment 128742 [details]
Patch for nagios initscript

Comment 2 Mike McGrath 2006-05-09 13:33:11 UTC
Thanks for the patch, I was unable to recreate this problem.  After started,
nagios will exit properly when issuing a service nagios stop.  Are you able to
create this every time?  Also what version of Fedora are you running?

Comment 3 Pedro Fernandes Macedo 2006-05-09 22:33:22 UTC
That's interesting. For me, on my FC5 install (fully updated), I always get the
same results.
Since I had already replaced the nagios initscript with my patched version , I
extracted the files from the rpm and tried again. Attached is the full log of
the test with the original initscript.

Comment 4 Pedro Fernandes Macedo 2006-05-09 22:34:26 UTC
Created attachment 128823 [details]
Test of the original initscript

Comment 5 Mike McGrath 2006-05-10 01:12:49 UTC
I couldn't completely recreate this (I did get the /sbin/nologin warning).  The
patch was very resonable, I've included it.  Nagios has been built and it should
be released to the general population soon.


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