Bug #1579

retain status file over an init script reload

Added by dnsmichi almost 3 years ago. Updated almost 3 years ago.

Status:ResolvedStart date:05/23/2011
Priority:NormalDue date:
Assignee:dnsmichi% Done:

100%

Category:Status Data
Target version:Icinga 1.x - 1.4.1
Icinga Version: OS Version:

Description

even though this patch was against nagios 2.7 it could still be valid for the recent versions.

point is - event broker modules might still block the core on startup, like it happens with idoutils. but using the classic ui shouldn't be harmed by that. so the overall idea is to either make the neb module non blocking but the other one to just keep the status.dat over restart, not deleting it.

patch was done by opsview, attached.
http://labs.opsview.com/2007/09/nagios-patch-day/

It doesn’t delete the status file on a HUP signal. This gives the impression that Nagios is still running even though no new status information is being updated. We think this is acceptable – after all, CGIs are displaying the “latest” data, it just so happens that there is no update at this precise moment. The status file age doesn’t change, so nagiostat will show that the data is getting older, but it removes that scary screen

thing is - the cgis must check against the age of status.dat then. this can be taken out of icingastats code somehow (or check_nagios/icinga too).

i would make this behavior the default, and just allowing to disable it on demand.

nagios_keep_status_file_during_reload.patch Magnifier (2.19 KB) dnsmichi, 05/23/2011 10:50 pm


Related issues

Related to IDOUtils - Feature #866: non-blocking icinga core while config dump at startup to ... Closed 10/08/2010

Associated revisions

Revision f6df0307
Added by dnsmichi almost 3 years ago

core: fix retain status file over an init script reload #1579

refs #1579

Revision a46b9ba5
Added by dnsmichi almost 3 years ago

core: fix retain status file over an init script reload #1579

refs #1579

History

#1 Updated by dnsmichi almost 3 years ago

  • Category set to Status Data
  • Status changed from New to Assigned
  • Assignee set to dnsmichi
  • Target version set to 1.5

#2 Updated by dnsmichi almost 3 years ago

one thing to remark - the initscript should be aware of the status.dat location and delete that on a plain stop, but not restart/reload then. or handling that externally shouldn't happen either way.

#3 Updated by dnsmichi almost 3 years ago

the patch is as is is already within the core. the root cause is the init script itsself.

first off, the deletion of status.dat and icinga.cmd upon start and stop is wrong, this should be handled by the daemon (detecting the sigrestart).

secondary, a sigrestart is only detected by SIGHUP which is only true for /etc/init.d/icinga reload but not restart where stop and start are invoked, but not a SIGHUP being sent. so restarting the core itsself will cause the status.dat to be deleted either way. Issueing an icinga reload will keep the file as it was suspected to be.

maybe the cgis could check for actual data age in order to reflect long lasting reloads then, but that's another story.

#4 Updated by dnsmichi almost 3 years ago

  • Tracker changed from Feature to Bug
  • Subject changed from retain status file over a reload to retain status file over a init script reload

#5 Updated by dnsmichi almost 3 years ago

  • Subject changed from retain status file over a init script reload to retain status file over an init script reload

#6 Updated by dnsmichi almost 3 years ago

  • Target version changed from 1.5 to 1.4.1

#7 Updated by dnsmichi almost 3 years ago

i re-consider this a bug, so attached for r1.4 and 1.4.1 release.

#8 Updated by dnsmichi almost 3 years ago

  • Status changed from Assigned to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF