Alignak-monitoring-contrib / alignak-module-backend

Alignak modules (arbiter, broker, scheduler) for the backend
GNU Affero General Public License v3.0
0 stars 2 forks source link

Backend broker: get references exception #131

Open mohierf opened 6 years ago

mohierf commented 6 years ago

Catch this!

[2017-12-07 08:40:09 CET] ERROR: [alignak.module.backend_broker] Manage brok exception: u'5a28f024e8a5071fdef7845b'
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/alignak_module_backend-1.0.1-py2.7.egg/alignak_module_backend/broker/module.py", line 857, in manage_brok
    ret = self.get_refs()
  File "/usr/local/lib/python2.7/site-packages/alignak_module_backend-1.0.1-py2.7.egg/alignak_module_backend/broker/module.py", line 292, in get_refs
    serv_mapping['__'.join([hosts[item['host']], item['name']])] = item['_id']
KeyError: u'5a28f024e8a5071fdef7845b'

This is probably because we did not got the host linked to the service that we just fetched from the backend ... this may happen when a new host got created but was not yet fecthed by the broker module