Branch: refs/heads/master
Home:
https://github.com/tribe29/checkmk
Commit: 81c74f7de1ebf278a893deb0e0491a679a17cc8d
https://github.com/tribe29/checkmk/commit/81c74f7de1ebf278a893deb0e0491a679…
Author: Lars Michelsen <lm(a)tribe29.com>
Date: 2020-08-27 (Thu, 27 Aug 2020)
Changed paths:
A .werks/11260
M cmk/ec/main.py
Log Message:
-----------
11260 FIX Fix crash in EC configuration (regression since 1.6.0p14)
When there were open events in the Event Console that were created by a rule
that was removed from the Event Console, this resulted in an exception on the
Event Console configuration page (IndexError (list index out of range)).
However, this message was rather a consequence error. The original error
message was found in var/log/mkeventd.log. There you could find messages of
this kind:
C+:
2020-08-27 14:19:42,913 [40] [cmk.mkeventd.StatusServer] Error handling client :
'my_rule'
Traceback (most recent call last):
File "/omd/sites/stable/lib/python/cmk/ec/main.py", line 3031, in serve
File "/omd/sites/stable/lib/python/cmk/ec/main.py", line 3071, in
handle_client
File "/omd/sites/stable/lib/python/cmk/ec/main.py", line 3092, in
_answer_query
File "/omd/sites/stable/lib/python/cmk/ec/main.py", line 2753, in query
File "/omd/sites/stable/lib/python/cmk/ec/main.py", line 2871, in _enumerate
File "/omd/sites/stable/lib/python/cmk/ec/main.py", line 736, in get_status
row += self._add_event_limit_status()
File "/omd/sites/stable/lib/python/cmk/ec/main.py", line 766, in
_add_event_limit_status
self.get_rules_with_active_event_limit(),
File "/omd/sites/stable/lib/python/cmk/ec/main.py", line 1784, in
get_rules_with_active_event_limit
if num_events >= self._get_rule_event_limit(rule_id)[0]:
File "/omd/sites/stable/lib/python/cmk/ec/main.py", line 1885, in
_get_rule_event_limit
rule = self._rule_by_id.get(rule_id)
KeyError: 'my_rule'
C-:
Change-Id: I0648769d99cdae526f4fcfba2a1abc99be4ee89a