[icinga-checkins] icinga.org: icinga-core/r1.7: core: add trigger_time to downtimes to allow calculating of flexible downtimes endtime #2537

git at icinga.org git at icinga.org
Tue Apr 24 17:23:42 CEST 2012

Module: icinga-core
Branch: r1.7
Commit: f03dbcdb41e727a3b095aa7b3d406e27dd26404c
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=f03dbcdb41e727a3b095aa7b3d406e27dd26404c

Author: Michael Friedrich <michael.friedrich at univie.ac.at>
Date:   Sun Apr 22 22:02:28 2012 +0200

core: add trigger_time to downtimes to allow calculating of flexible downtimes endtime #2537

in order to fix #2536 we must introduce that as a
feature. fetching the actual time when a downtime
is started (triggered) is mandatory for calculating
the flexible downtimes, especially when the duration
is less than end-start time.
the bug found in #2536 actually does not trigger the
endtime after trigger time + duration (because it is
unknown), but waits for the end time provided by the
external command.
this leads into rescheduling the flexible downtime
looping duration by duration til endtime, incrementing
the scheduled_downtime_depth counter as long as
the docs cleary state that a flexible downtime only
lasts one duration, and then exits. the overlapping
is NOT what we want.

furthermore, introducing this as a basis for fixing
issue #2536 we can actually re-use that in future
changes to show the user the actual time a downtime
was entered - and not the start time which could
be somewhere in the past.

entry_time is only the time when the command was
sent and does not help here.

refs #2537
refs #2536


 Changelog              |    5 ++++
 base/broker.c          |    5 +++-
 common/downtime.c      |   56 +++++++++++++++++++++++++++--------------------
 include/broker.h       |    2 +-
 include/downtime.h     |   13 ++++++-----
 include/nebstructs.h   |    2 +
 t-tap/stub_broker.c    |    2 +-
 t-tap/stub_downtime.c  |    2 +-
 t-tap/stub_xddefault.c |    4 +-
 xdata/xdddefault.c     |    8 +++---
 xdata/xdddefault.h     |    4 +-
 xdata/xrddefault.c     |    8 +++++-
 xdata/xsddefault.c     |    8 +++++-
 13 files changed, 73 insertions(+), 46 deletions(-)

Diff:   https://git.icinga.org/?p=icinga-core.git;a=commitdiff;h=f03dbcdb41e727a3b095aa7b3d406e27dd26404c

More information about the icinga-checkins mailing list