Open ryepup opened 9 years ago
looking at the code, I think this might be fixed in the 2.4 release
looking at the code, I think this might be fixed in the 2.4 release
yep. well, at least the discovery manager doesn't anymore call this removed function..
shame on the one having removed the function initially but left that call to it from the discovery manager ;)
Discovery is not really well supported anyway, I'm closing this :)
Well, discovery manager is nice. Why doesn't support it anymore ?
I'll try to make discovery works again. Comment discoverymanager lines that aren't used now, but facing a new exception :
Traceback (most recent call last):
File "/usr/bin/shinken-discovery", line 144, in <module>
d = DiscoveryManager(cfg_input, macros, overwrite, runners, output_dir=output_dir, dbmod=dbmod, backend=backend, modules_path=modules_path, merge=merge)
File "/usr/lib/python2.6/site-packages/Shinken-2.2_RC1-py2.6.egg/shinken/discovery/discoverymanager.py", line 352, in __init__
self.conf.is_correct()
File "/usr/lib/python2.6/site-packages/Shinken-2.2_RC1-py2.6.egg/shinken/objects/config.py", line 1501, in is_correct
if not cur.is_correct():
File "/usr/lib/python2.6/site-packages/Shinken-2.2_RC1-py2.6.egg/shinken/objects/item.py", line 1035, in is_correct
if not i.is_correct():
File "/usr/lib/python2.6/site-packages/Shinken-2.2_RC1-py2.6.egg/shinken/objects/host.py", line 495, in is_correct
for c in cls.illegal_object_name_chars:
AttributeError: type object 'Host' has no attribute 'illegal_object_name_chars'
That's weird, illegal_object_name_chars
is in Config Class, and I just don't know how that property pass from Config to Host using class_inherit.
Reinstalled version 2.0.3 and still have the error.
File "/usr/bin/shinken-discovery", line 144, in <module>
d = DiscoveryManager(cfg_input, macros, overwrite, runners, output_dir=output_dir, dbmod=dbmod, backend=backend, modules_path=modules_path, merge=merge)
File "/usr/lib/python2.6/site-packages/Shinken-2.0.3-py2.6.egg/shinken/discovery/discoverymanager.py", line 353, in __init__
self.conf.is_correct()
File "/usr/lib/python2.6/site-packages/Shinken-2.0.3-py2.6.egg/shinken/objects/config.py", line 1483, in is_correct
if not cur.is_correct():
File "/usr/lib/python2.6/site-packages/Shinken-2.0.3-py2.6.egg/shinken/objects/item.py", line 833, in is_correct
if not i.is_correct():
File "/usr/lib/python2.6/site-packages/Shinken-2.0.3-py2.6.egg/shinken/objects/host.py", line 476, in is_correct
for c in cls.illegal_object_name_chars:
AttributeError: type object 'Host' has no attribute 'illegal_object_name_chars'
the 'illegal_object_name_chars' attribute is "duplicated/copied" in Host + Service + Contact by this mean actually :
# We load every useful parameter so no need to access global conf later
# Must be called after a change in a global conf parameter
def load_global_conf(cls, conf):
""" Used to put global values in the sub Class like
hosts or services """
# conf have properties, if 'enable_notifications':
# { [...] 'class_inherit': [(Host, None), (Service, None),
# (Contact, None)]}
# get the name and put the value if None, put the Name
# (not None) if not (not clear?)
for prop, entry in conf.properties.items():
# If we have a class_inherit, and the arbiter really send us it
# if 'class_inherit' in entry and hasattr(conf, prop):
if hasattr(conf, prop):
for (cls_dest, change_name) in entry.class_inherit:
if cls_dest == cls: # ok, we've got something to get
value = getattr(conf, prop)
if change_name is None:
setattr(cls, prop, value)
else:
setattr(cls, change_name, value)
Getting a
AttributeError: 'Config' object has no attribute 'create_reversed_list'
error when trying to runshinken-discovery
. Shinken is a recent installation via pip.shinken-discovery
- 1.0.1shinken
- 2.2Seems to be discussed a little on this create_reversed_list not defined forum thread, where they trace it to 3e8ab43b712cf32c7243a6d7b60a79baf2411de3.