Advertisement
Guest User

Untitled

a guest
Apr 19th, 2012
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.16 KB | None | 0 0
  1. 2012-04-19 11:29:44,436 Loading GeneratorRegistry
  2. 2012-04-19 11:29:44,468 Loading MacroRegistry
  3. 2012-04-19 11:29:44,499 Loading ParserRegistry
  4. 2012-04-19 11:29:44,532 Invalid state map expression: ''
  5. 2012-04-19 11:29:44,549 UNHANDLED EXCEPTION (2012-04-19 11:29:44.532722)
  6. Working directory: /opt/noc
  7. <type 'exceptions.SystemExit'>
  8. 1
  9. START OF TRACEBACK
  10. ------------------------------------------------------------------------
  11. File: /opt/noc/lib/daemon.py (Line: 183)
  12. Function: die
  13. 176 sys.exit(1)
  14. 177 else:
  15. 178 logging.basicConfig(level=logging.DEBUG,
  16. 179 format='%(asctime)s %(message)s')
  17. 180
  18. 181 def die(self, msg):
  19. 182 logging.error(msg)
  20. 183 ==> sys.exit(1)
  21. 184
  22. 185 def on_load_config(self):
  23. 186 """
  24. 187 Called after config has been reloaded on SIGHUP
  25. 188 :return:
  26. 189 """
  27. Variables:
  28. msg = "Invalid state map expression: ''"
  29. self = <noc.inv.discovery.daemon.DiscoveryDaemon object at 0xa28550c>
  30. ------------------------------------------------------------------------
  31. File: /opt/noc/inv/discovery/daemon.py (Line: 113)
  32. Function: get_state_map
  33. 106 except ResourceState.DoesNotExist:
  34. 107 self.die("Unknown resource state: '%s'" % name)
  35. 108
  36. 109 m = {}
  37. 110 for x in s.split(";"):
  38. 111 x = x.strip()
  39. 112 if "->" not in x:
  40. 113 ==> self.die("Invalid state map expression: '%s'" % x)
  41. 114 f, t = [get_state(y.strip()) for y in x.split("->")]
  42. 115 m[f.id] = t
  43. 116 return m
  44. 117
  45. 118 def run(self):
  46. 119 last_i_check = 0
  47. Variables:
  48. x = ''
  49. s = ''
  50. m = {}
  51. self = <noc.inv.discovery.daemon.DiscoveryDaemon object at 0xa28550c>
  52. get_state = <function get_state at 0xa55bd84>
  53. ------------------------------------------------------------------------
  54. File: /opt/noc/inv/discovery/daemon.py (Line: 69)
  55. Function: load_config
  56. 62 self.p_enabled = self.config.getboolean("prefix_discovery",
  57. 63 "enabled")
  58. 64 self.asn = AS.default_as()
  59. 65 self.p_save = (self.p_enabled and
  60. 66 self.config.getboolean("prefix_discovery",
  61. 67 "save"))
  62. 68 self.p_state_map = self.get_state_map(self.config.get("prefix_discovery",
  63. 69 ==> "change_state"))
  64. 70 self.ip_enabled = self.config.getboolean("ip_discovery",
  65. 71 "enabled")
  66. 72 self.asn = AS.default_as()
  67. 73 self.ip_save = (self.ip_enabled and
  68. 74 self.config.getboolean("ip_discovery",
  69. 75 "save"))
  70. Variables:
  71. self = <noc.inv.discovery.daemon.DiscoveryDaemon object at 0xa28550c>
  72. ------------------------------------------------------------------------
  73. File: /opt/noc/lib/daemon.py (Line: 82)
  74. Function: __init__
  75. 75 "stop", "refresh"]:
  76. 76 self.opt_parser.error(
  77. 77 "You must supply one of start|launch|stop|refresh commands")
  78. 78 # Read config
  79. 79 self.pidfile = None
  80. 80 self.config = None
  81. 81 self.instance_id = self.options.instance_id
  82. 82 ==> self.load_config()
  83. 83 # Register signal handlers if any
  84. 84 for s in [s for s in dir(self) if s.startswith("SIG")]:
  85. 85 try:
  86. 86 sig = getattr(signal, s)
  87. 87 except AttributeError:
  88. 88 logging.error(
  89. Variables:
  90. self = <noc.inv.discovery.daemon.DiscoveryDaemon object at 0xa28550c>
  91. ------------------------------------------------------------------------
  92. File: /opt/noc/inv/discovery/daemon.py (Line: 37)
  93. Function: __init__
  94. 30
  95. 31 class DiscoveryDaemon(Daemon):
  96. 32 daemon_name = "noc-discovery"
  97. 33
  98. 34 rx_address = re.compile("[^0-9a-z\-]+")
  99. 35
  100. 36 def __init__(self, *args, **kwargs):
  101. 37 ==> super(DiscoveryDaemon, self).__init__(*args, **kwargs)
  102. 38 self.pmap_interfaces = [p for p in profile_registry.classes
  103. 39 if "get_interfaces" in profile_registry.classes[p].scripts]
  104. 40 self.pmap_ip = [p for p in profile_registry.classes
  105. 41 if "get_ip_discovery" in profile_registry.classes[p].scripts]
  106. 42 self.new_prefixes = []
  107. 43 self.new_addresses = []
  108. Variables:
  109. self = <noc.inv.discovery.daemon.DiscoveryDaemon object at 0xa28550c>
  110. args = ()
  111. kwargs = {}
  112. ------------------------------------------------------------------------
  113. File: ./scripts/noc-discovery.py (Line: 20)
  114. Function: <module>
  115. 13 set_env.setup(use_django=True)
  116. 14
  117. 15 if __name__ == "__main__":
  118. 16 from noc.inv.discovery.daemon import DiscoveryDaemon
  119. 17 from noc.lib.debug import error_report
  120. 18
  121. 19 try:
  122. 20 ==> DiscoveryDaemon().process_command()
  123. 21 except:
  124. 22 error_report()
  125. Variables:
  126. set_env = <module 'set_env' from '/opt/noc/scripts/set_env.pyc'>
  127. __builtins__ = <module '__builtin__' (built-in)>
  128. __file__ = './scripts/noc-discovery.py'
  129. DiscoveryDaemon = <class 'noc.inv.discovery.daemon.DiscoveryDaemon'>
  130. __package__ = None
  131. __name__ = '__main__'
  132. error_report = <function error_report at 0x95efb54>
  133. __doc__ = None
  134. ------------------------------------------------------------------------
  135. END OF TRACEBACK
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement