nagios patches 3 old, 1 new (fix flexible downtime on service hard state change doesn't get triggered/activated)

Ton Voon tonvoon at gmail.com
Wed May 11 23:04:14 CEST 2011


Hi Michael,

Sorry it has taken so long to look at these. Thanks for persisting.

See comments below.

On 30 Apr 2011, at 13:11, Michael Friedrich wrote:

> since there was no further comments on those patches, i did a revision after moving to svn. because there isn't any official git mirror yet, i'm using http://git.weiss.in-berlin.de/repositories/nagios.git and latest HEAD.
> 
> please refer to the already written threads for further information on the patches themselves.
> 
> 
> OLD
> 
> [PATCH] core: fix race condition on flexible downtime commands when duration not set or zero
> 
> =>  added changelog entry
> 0001-fix-race-condition-on-flexible-downtime-commands-whe.patch

I'm going to push this one back to you to create a suitable test case. Use t-tap/test_commands.c and check return code is ERROR.

I'd vary the inputs too to include 0 or blank or nothing

> 
> [PATCH] sanitize compiler warnings on size_t in common/macros.c
> 
> =>  left as it is, re-applied against head.
> 0002-sanitize-compiler-warnings-on-size_t-in-common-macro.patch

Applied, thanks.

> 
> [PATCH] move thread safe macro function prototypes with suffix _r and restore old compatible prototypes again
> 
> =>  verified against latest t-tap tests, updated .gitignore
> 0003-move-thread-safe-macro-function-prototypes-with-suff.patch

I don't know enough around this area, but I know Andreas is keen on re-entrant functions, so I'll defer to him.

> 
> =====
> 
> NEW
> 
> fix flexible downtime on service hard state change doesn't get triggered/activated
> 
> recently, there was a change on flexible downtime triggering,
> allowing soft state changes to active a flexible downtime.
> 
> this change removed the condition on hard_state_change check,
> so it only triggered those from soft state changes but not
> the well known older behavior.
> 
> the tricky part is, that those 2 vars are not the same on each
> state change, so the replacement fix needs a sanitized "near-by"
> addin, which this patch introduces.
> 
> this bug has been evaluated and debugged in deep, the fix
> now runs>2 months on productive systems, allowing us to
> trigger flexible downtimes on hard state changes too, next
> to the soft state changes being detected.
> 
> please check https://dev.icinga.org/issues/1228 for a deeper
> analysis on this.
> 
> 
> 0004-fix-flexible-downtime-on-service-hard-state-change-d.patch

This one requires a test case too, due to its complexity. See t-tap/test_checks.c which has tests in the handle_async_check_results routine.


> please consider them for future releases as it will ease the porting-patches-from-icinga-core procedure.

To be honest, that's not my problem. You can make an argument that it is better for Nagios users, but an argument to make your life easier for future patches is not going to sway me. If you choose to fork, then you're accepting a certain cost of maintenance.

Ton


------------------------------------------------------------------------------
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay




More information about the Developers mailing list