Werk #7769: Fix broken computation of host contact groups in some cases

Component Core & setup
Title Fix broken computation of host contact groups in some cases
Date Jun 7, 2019
Checkmk Edition Checkmk Raw (CRE)
Checkmk Version 1.6.0b2 2.0.0i1
Level Prominent Change
Class Bug Fix
Compatibility Compatible - no manual interaction needed

The core config creation was broken in 1.6.0b1 when using the WATO folder hierarchy for assigning contact groups to hosts.

An exception like this was displayed after the update or later, e.g. when executing cmk -U to update the core configuration:

File "/omd/sites/produktiv/lib/python/cmk_base/cee/core_cmc.py", line 457, in cmc_all_hosts
cmc_hosts = CMCHosts(config_cache.all_active_hosts(), CMCHostConfig)
File "/omd/sites/produktiv/lib/python/cmk_base/cee/core_cmc.py", line 501, in __init__
self._compute(hostnames, host_class)
File "/omd/sites/produktiv/lib/python/cmk_base/cee/core_cmc.py", line 513, in _compute
host_config = host_class(hostname)
File "/omd/sites/produktiv/lib/python/cmk_base/cee/core_cmc.py", line 962, in __init__
super(CMCHostConfig, self).__init__(hostname)
File "/omd/sites/produktiv/lib/python/cmk_base/cee/core_cmc.py", line 753, in __init__
self._host_contact_groups = self._host_config.contactgroups
File "/omd/sites/produktiv/lib/python/cmk_base/config.py", line 2471,
in contactgroups
return list(set(cgrs))
TypeError: unhashable type: 'list'

To the list of all Werks