Module: check_mk
Branch: master
Commit: 8f4c04a05a877385a7fb85b0c554abf3a599085b
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8f4c04a05a8773…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Sep 3 16:01:30 2018 +0200
6530 FIX Fixed possible error "You can not override a builtin auxiliary tag"
after update
During the tag migration from 1.5 or newer a problem could happen that
the auxiliary tags "snmp" and "tcp" were not removed correctly. This
happened when the titles of these auxiliary tags have been changed in
the site.
Workaround with 1.5.0p2 or older: Have a look at the
/omd/sites/[SITE]/etc/check_mk/multisite.d/wato/hosttags.mk file. First
create a backup of this file, then look for entries like this:
wato_aux_tags += \
[('snmp', u'monitor via SNMP'), ('tcp', u'monitor via Check_MK
Agent')]
Try to remove the line and reload the GUI. The issue should be gone now.
Change-Id: Ie3adf0c35c405cf21a80ac14dc630bd351c19f52
---
.werks/6530 | 24 ++++++++++++++++++++++++
cmk/gui/config.py | 12 +++++-------
2 files changed, 29 insertions(+), 7 deletions(-)
diff --git a/.werks/6530 b/.werks/6530
new file mode 100644
index 0000000..5e3b910
--- /dev/null
+++ b/.werks/6530
@@ -0,0 +1,24 @@
+Title: Fixed possible error "You can not override a builtin auxiliary tag"
after update
+Level: 1
+Component: multisite
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.6.0i1
+Date: 1535963347
+
+During the tag migration from 1.5 or newer a problem could happen that the auxiliary
+tags "snmp" and "tcp" were not removed correctly. This happened when
the titles of these
+auxiliary tags have been changed in the site.
+
+This is a regression since 1.5.0p1 (caused by #6247).
+
+Workaround with 1.5.0p2 or older: Have a look at the
+/omd/sites/[SITE]/etc/check_mk/multisite.d/wato/hosttags.mk file. First create
+a backup of this file, then look for entries like this:
+
+wato_aux_tags += \
+[('snmp', u'monitor via SNMP'), ('tcp', u'monitor via
Check_MK Agent')]
+
+Try to remove the line and reload the GUI. The issue should be gone now.
diff --git a/cmk/gui/config.py b/cmk/gui/config.py
index 3a75b74..5e81451 100644
--- a/cmk/gui/config.py
+++ b/cmk/gui/config.py
@@ -845,16 +845,14 @@ def remove_old_sample_config_tag_groups(host_tags, aux_tags):
except ValueError:
pass # Not there or modified
- legacy_aux_tags = [
- ('snmp', u'monitor via SNMP'),
- ('tcp', u'monitor via Check_MK Agent'),
+ legacy_aux_tag_ids = [
+ 'snmp',
+ 'tcp',
]
- for aux_tag in legacy_aux_tags:
- try:
+ for aux_tag in aux_tags[:]:
+ if aux_tag[0] in legacy_aux_tag_ids:
aux_tags.remove(aux_tag)
- except ValueError:
- pass # Not there or modified
def extend_user_modified_tag_groups(host_tags):