Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
[dev.icinga.com #1579] retain status file over an init script reload #636
This issue has been migrated from Redmine: https://dev.icinga.com/issues/1579
Created by mfriedrich on 2011-05-23 20:50:06 +00:00
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.
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.
2011-06-04 11:03:16 +00:00 by mfriedrich f6df030
2011-06-04 11:04:45 +00:00 by mfriedrich a46b9ba
Updated by mfriedrich on 2011-05-24 14:26:30 +00:00
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.
Updated by mfriedrich on 2011-06-04 10:52:10 +00:00
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.