"/etc/init.d/nagios2 reload" fails if it is run twice

Bug #161226 reported by Ralph Livock
8
Affects Status Importance Assigned to Milestone
lsb (Debian)
Fix Released
Unknown
lsb (Ubuntu)
Fix Released
Undecided
Unassigned
nagios2 (Debian)
Fix Released
Unknown
nagios2 (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: nagios2-common

Version:
dpkg says that /etc/init.d/nagios2 comes from nagios2-common and that I have version 2.9-1 of nagios2-common.

To reproduce:
While nagios2 is running, run:
  # /etc/init.d/nagios2 reload
to tell nagios2 to reload its config.

Then (nagios2 is still running) try to reload the config again:
  # /etc/init.d/nagios2 reload
It fails this time because it things nagios2 is not running

The output is:
root@bugs:/etc/init.d# /etc/init.d/nagios2 reload
 * Reloading nagios2 monitoring daemon configuration files nagios2 [ OK ]
root@bugs:/etc/init.d# /etc/init.d/nagios2 reload
 * Reloading nagios2 monitoring daemon configuration files nagios2
 * Not running.

Looking at /etc/init.d/nagios2, it uses:
  killproc -p $THEPIDFILE $DAEMON 1
to send a HUP to nagios2.

Unfortunately, killproc (which comes from /lib/lsb/init-functions) always deletes the PID file if it manages to send the signal to the process successfully.

/lib/lsb/init-functions comes from package lsb-base which I have at version 3.1-23.1ubuntu3.

Maybe /etc/init.d/nagios2 should call start-stop-daemon directly rather than calling killproc.

Oh, and I looked at /etc/init.d/nagios (for the Nagios 1 version) and it looks as if it would have the same problem.

Revision history for this message
Albert Damen (albrt) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. This bug is known upstream and has been solved with a new version of lsb-base, which does not remove the pid file anymore.

Changed in nagios2:
status: New → Confirmed
Albert Damen (albrt)
Changed in lsb:
status: New → Confirmed
Changed in nagios2:
status: Confirmed → Invalid
Changed in lsb:
status: Unknown → Fix Released
Changed in nagios2:
status: Unknown → Fix Released
Revision history for this message
Albert Damen (albrt) wrote :

lsb-base 3.1-24ubuntu1 has been released in the development version of Ubuntu - the Hardy Heron. With this version the reload of nagios2 can be repeated multiple times, without problems. Therefore I am closing this bug now.

If you need a fix for the bug in previous versions of Ubuntu, please follow the instructions for "How to request new packages" at https://help.ubuntu.com/community/UbuntuBackports#request-new-packages

Thanks again!

Changed in lsb:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.