Module: check_mk
Branch: master
Commit: 8aae6704f3daad5e02828ea125e625e4663463fa
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8aae6704f3daad…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Oct 18 21:11:24 2013 -0400
FIX: avoid removal of tags from rules when not yet acknowledged
Currently - when the user deleted a tag or tag group that
was in use by rules - he was asked if he wanted to remove
the tag, but it had already been removed!
---
ChangeLog | 7 ++++---
web/htdocs/wato.py | 17 +++++++++--------
2 files changed, 13 insertions(+), 11 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index b03421f..7be4f6c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
1.2.3i5:
Core:
+ * Automatically remove duplicate checks when monitoring with Agent+SNMP
+ at the same time. TCP based ones have precedence.
+ * inventory check of SNMP devices now does scan per default (configurable)
* FIX: inventory check now honors settings for exit code
* FIX: avoid exception nodes of cluster have different agent type
* FIX: continue inventory, if one check does not support it
@@ -8,9 +11,6 @@
* FIX: fixed error handling in SNMP scan, inventory check fails now
if SNMP agent is not responding
* FIX: Ignore snmp_check_interval cache in interactive situations (e.g. -nv)
- * Automatically remove duplicate checks when monitoring with Agent+SNMP
- at the same time. TCP based ones have precedence.
- * inventory check of SNMP devices now does scan per default (configurable)
Event Console:
* check_mkevents now available as C binary: check_mkevents_c
@@ -66,6 +66,7 @@
* FIX: correct display of number of hosts in bulk inventory
* FIX: nailed down ".siteid" exception when added new site
* FIX: fixed setting for locking mode from 'ait' to 'wait'
+ * FIX: avoid removal of tags from rules when not yet acknowledged
1.2.3i4:
Core:
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 1352af3..aabffb9 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -10156,15 +10156,16 @@ def change_host_tags_in_rules(folder, operations, mode):
if type(operations) == list: # this list of tags to remove
for tag in operations:
if tag != None and (tag in tag_specs or "!"+tag in
tag_specs):
- modified = True
if rulespec not in affected_rulespecs:
affected_rulespecs.append(rulespec)
- if tag in tag_specs and mode == "delete":
- rules_to_delete.add(nr)
- elif tag in tag_specs:
- tag_specs.remove(tag)
- elif "+"+tag in tag_specs:
- tag_specs.remove("!"+tag)
+ if mode != "check":
+ modified = True
+ if tag in tag_specs and mode == "delete":
+ rules_to_delete.add(nr)
+ elif tag in tag_specs:
+ tag_specs.remove(tag)
+ elif "+"+tag in tag_specs:
+ tag_specs.remove("!"+tag)
# Removal or renamal of single tag choices
else:
@@ -10176,10 +10177,10 @@ def change_host_tags_in_rules(folder, operations, mode):
continue
if old_tag in tag_specs or ("!" + old_tag) in tag_specs:
- modified = True
if rulespec not in affected_rulespecs:
affected_rulespecs.append(rulespec)
if mode != "check":
+ modified = True
if old_tag in tag_specs:
tag_specs.remove(old_tag)
if new_tag: