When I use this invalid configuration, I get an exception instead of a proper error message:
define service {
service_description DummyService
use generic-service
check_command dummy_service_check
register 0
}
Traceback (most recent call last):
File "/usr/bin/shinken-arbiter", line 7, in <module>
execfile(__file__)
File "/data/shinken-source/bin/shinken-arbiter", line 118, in <module>
daemon.main()
File "/data/shinken-source/shinken/daemons/arbiterdaemon.py", line 590, in main
self.load_config_file()
File "/data/shinken-source/shinken/daemons/arbiterdaemon.py", line 361, in load_config_file
self.conf.create_objects(raw_objects)
File "/data/shinken-source/shinken/objects/config.py", line 718, in create_objects
self.create_objects_for_type(raw_objects, t)
File "/data/shinken-source/shinken/objects/config.py", line 742, in create_objects_for_type
setattr(self, prop, clss(lst, initial_index))
File "/data/shinken-source/shinken/objects/item.py", line 709, in __init__
self.add_items(items, index_items)
File "/data/shinken-source/shinken/objects/item.py", line 729, in add_items
self.add_template(i)
File "/data/shinken-source/shinken/objects/service.py", line 1062, in add_template
"host_name%s" % (objcls, tpl.get_source())
AttributeError: 'Service' object has no attribute 'get_source'
You get the error message when you correct the configuration, by changing service_description to name or by setting register to 1.
In my tests, I wasn't able to trigger this bug for a host
When I use this invalid configuration, I get an exception instead of a proper error message:
You get the error message when you correct the configuration, by changing
service_description
toname
or by settingregister
to 1.In my tests, I wasn't able to trigger this bug for a host