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

git at icinga.org git at icinga.org
Sat Apr 28 11:11:39 CEST 2012


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

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
possible.
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

Conflicts:

	Changelog

---

 Changelog              |   10 ++++++++
 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, 78 insertions(+), 46 deletions(-)

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




More information about the icinga-checkins mailing list