Guest User

Untitled

a guest
Jul 10th, 2015
371
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.94 KB | None | 0 0
  1. 2015-07-10 15:05:40,568 [noc.lib.scheduler.job] [inv.discovery][lldp_discovery][392] Running job
  2. 2015-07-10 15:05:40,572 [noc.lib.scheduler.job] [inv.discovery][lldp_discovery][392] Running script get_lldp_neighbors
  3. 2015-07-10 15:05:40,793 [noc.lib.debug] UNHANDLED EXCEPTION (2015-07-10 15:05:40.586040)
  4. BRANCH: develop TIP: 597dfadc4983
  5. PROCESS: ./scripts/noc-discovery.py
  6. ERROR FINGERPRINT: 4accbd6c-6be3-5d9d-900d-3dd87028086e
  7. WORKING DIRECTORY: /opt/noc
  8. EXCEPTION: <type 'exceptions.KeyError'> u'get_lldp_neighbors'
  9. START OF TRACEBACK
  10. ------------------------------------------------------------------------
  11. File: sa/models/maptask.py (Line: 108)
  12. Function: create_task
  13. 101 sp[-1] not in object.profile.scripts):
  14. 102 status = "F"
  15. 103 result = {
  16. 104 "code": ERR_INVALID_SCRIPT,
  17. 105 "text": "Invalid script %s" % script
  18. 106 }
  19. 107 if not timeout:
  20. 108 ==> timeout = object.profile.scripts[sp[-1]].get_timeout()
  21. 109 if not timeout:
  22. 110 timeout = 60
  23. 111 now = datetime.datetime.now()
  24. 112 # Create task
  25. 113 t = MapTask(
  26. 114 task=None,
  27. Variables:
  28. status = 'F'
  29. object = <ManagedObject: hsw01-gts9-ktv>
  30. script = u'Huawei.VRP3.get_lldp_neighbors'
  31. sp = [u'Huawei', u'VRP3', u'get_lldp_neighbors']
  32. params = {}
  33. result = {'text': u'Invalid script Huawei.VRP3.get_lldp_neighbors', 'code': 13}
  34. timeout = None
  35. cls = <class 'noc.sa.models.maptask.MapTask'>
  36. ------------------------------------------------------------------------
  37. File: lib/scheduler/scheduler.py (Line: 264)
  38. Function: create_task
  39. 257 :return:
  40. 258 """
  41. 259 @transaction.commit_on_success
  42. 260 def create_task(job):
  43. 261 return MapTask.create_task(
  44. 262 job.get_managed_object(),
  45. 263 job.map_task,
  46. 264 ==> job.get_map_task_params()
  47. 265 )
  48. 266
  49. 267 # Dereference job
  50. 268 self.metrics.jobs_dereference_count += 1
  51. 269 if not job.dereference():
  52. 270 self.logger.info("Cannot dereference job %s(%s). Removing",
  53. Variables:
  54. job =
  55. <noc.inv.discovery.jobs.lldp_discovery.LLDPLinkDiscoveryJob object at 0x4286410>
  56. ------------------------------------------------------------------------
  57. File: lib/python2.6/site-packages/django/db/transaction.py (Line: 224)
  58. Function: inner
  59. 217 def __exit__(self, exc_type, exc_value, traceback):
  60. 218 self.exiting(exc_value, self.using)
  61. 219
  62. 220 def __call__(self, func):
  63. 221 @wraps(func)
  64. 222 def inner(*args, **kwargs):
  65. 223 with self:
  66. 224 ==> return func(*args, **kwargs)
  67. 225 return inner
  68. 226
  69. 227 def _transaction_func(entering, exiting, using):
  70. 228 """
  71. 229 Takes 3 things, an entering function (what to do to start this block of
  72. 230 transaction management), an exiting function (what to do to end it, on both
  73. Variables:
  74. self = <django.db.transaction.Transaction object at 0x4286690>
  75. args =
  76. (<noc.inv.discovery.jobs.lldp_discovery.LLDPLinkDiscoveryJob object at 0x4286410>,)
  77. func = <function create_task at 0x4280a28>
  78. kwargs = {}
  79. ------------------------------------------------------------------------
  80. File: lib/scheduler/scheduler.py (Line: 307)
  81. Function: run_job
  82. 300 self._run_job_handler(
  83. 301 job,
  84. 302 object=job.get_managed_object(),
  85. 303 result=job.beef[job.key])
  86. 304 else:
  87. 305 job.logger.info("Running script %s", job.map_task)
  88. 306 # Run in MRT mode
  89. 307 ==> t = create_task(job)
  90. 308 self.active_mrt[t.id] = job
  91. 309 else:
  92. 310 self._run_job_handler(job)
  93. 311
  94. 312 def _run_job_handler(self, job, **kwargs):
  95. 313 if job.threaded:
  96. Variables:
  97. s = ''
  98. create_task = <function create_task at 0x4280c08>
  99. job =
  100. <noc.inv.discovery.jobs.lldp_discovery.LLDPLinkDiscoveryJob object at 0x4286410>
  101. self = <noc.inv.discovery.scheduler.DiscoveryScheduler object at 0x3e25090>
  102. ------------------------------------------------------------------------
  103. File: lib/scheduler/scheduler.py (Line: 527)
  104. Function: run_pending
  105. 520 continue
  106. 521 # Check for group limits
  107. 522 group = job.get_group()
  108. 523 if self.can_run(job):
  109. 524 if group is not None:
  110. 525 with self.running_lock:
  111. 526 self.running_count[group] += 1
  112. 527 ==> self.run_job(job)
  113. 528 n += 1
  114. 529 return n
  115. 530
  116. 531 def run(self):
  117. 532 if self.reset_running:
  118. 533 # Change running to waiting
  119. Variables:
  120. group = 'discovery-392'
  121. jcls = <class 'noc.inv.discovery.jobs.lldp_discovery.LLDPLinkDiscoveryJob'>
  122. self = <noc.inv.discovery.scheduler.DiscoveryScheduler object at 0x3e25090>
  123. get_complete_tasks = <function get_complete_tasks at 0x42809b0>
  124. job_data =
  125. {u'_id': ObjectId('558d1c3b7e85c90f5bc18e97'),
  126. u'data': None,
  127. u'f': 0,
  128. u'jcls': u'lldp_discovery',
  129. u'key': 392,
  130. u'last': datetime.datetime(2015, 7, 10, 15, 5, 25, 504000),
  131. u'ldur': 0.056463003158569336,
  132. u'log': [],
  133. u'ls': u'F',
  134. u'runs': 1638,
  135. u's': u'W',
  136. u'schedule': {u'failed_interval': 600,
  137. u'interval': 86400,
  138. u'offset': 0.079226934248661673},
  139. u'st': datetime.datetime(2015, 6, 26, 12, 33, 58, 260000),
  140. u'tb': {u'code': 13,
  141. u'text': u'Invalid script Huawei.VRP3.get_lldp_neighbors'},
  142. u'ts': datetime.datetime(2015, 7, 9, 13, 24, 39, 699000)}
  143. n = 2
  144. job =
  145. <noc.inv.discovery.jobs.lldp_discovery.LLDPLinkDiscoveryJob object at 0x4286410>
  146. ------------------------------------------------------------------------
  147. File: lib/scheduler/scheduler.py (Line: 543)
  148. Function: run
  149. 536 self.ATTR_STATUS: self.S_RUN
  150. 537 }, {
  151. 538 "$set": {self.ATTR_STATUS: self.S_WAIT}
  152. 539 }, multi=True, safe=True)
  153. 540 self.ensure_indexes()
  154. 541 self.logger.info("Running scheduler")
  155. 542 while True:
  156. 543 ==> if not self.run_pending():
  157. 544 time.sleep(1)
  158. 545 else:
  159. 546 self.cleanup()
  160. 547
  161. 548 def get_faults(self, job_name, key=None):
  162. 549 """
  163. Variables:
  164. self = <noc.inv.discovery.scheduler.DiscoveryScheduler object at 0x3e25090>
  165. ------------------------------------------------------------------------
  166. File: inv/discovery/daemon.py (Line: 37)
  167. Function: run
  168. 30
  169. 31 def run(self):
  170. 32 try:
  171. 33 PerformanceReportJob.submit(self.scheduler,
  172. 34 key="performance_report", interval=60)
  173. 35 except self.scheduler.JobExists:
  174. 36 pass
  175. 37 ==> self.scheduler.run()
  176. 38
  177. 39 def load_config(self):
  178. 40 super(DiscoveryDaemon, self).load_config()
  179. 41 self.load_beef_map()
  180. 42 log_jobs = self.config.get("main", "log_jobs") or None
  181. 43 self.scheduler.set_job_log(log_jobs)
  182. Variables:
  183. self = <noc.inv.discovery.daemon.DiscoveryDaemon object at 0x7fdb6423a510>
  184. ------------------------------------------------------------------------
  185. File: lib/daemon/base.py (Line: 433)
  186. Function: guarded_run
  187. 426 :return:
  188. 427 """
  189. 428 if self.start_delay:
  190. 429 self.logger.info("Delaying start for %s seconds",
  191. 430 self.start_delay)
  192. 431 time.sleep(self.start_delay)
  193. 432 try:
  194. 433 ==> self.run()
  195. 434 except KeyboardInterrupt:
  196. 435 pass
  197. 436 except MemoryError:
  198. 437 self.logger.error("Out of memory. Exiting.")
  199. 438 except SystemExit:
  200. 439 self.logger.info("Exiting")
  201. Variables:
  202. self = <noc.inv.discovery.daemon.DiscoveryDaemon object at 0x7fdb6423a510>
  203. ------------------------------------------------------------------------
  204. END OF TRACEBACK
  205. 2015-07-10 15:05:40,795 [noc-discovery] Removing pidfile: /var/run/noc/noc-discovery.pid
  206. 2015-07-10 15:05:40,796 [noc-discovery] STOP
  207. 2015-07-10 15:05:44,720 [noc.lib.perf] Stats are disabled
  208. 2015-07-10 15:05:44,720 [noc.lib.threadpool] Pool settings: name=pool start_threads=1 max_threads=30 min_spare=1 max_spare=7 backlog=30
  209. 2015-07-10 15:05:44,720 [noc-discovery] Initializing solutions
  210. 2015-07-10 15:05:44,734 [root] Loading VCSRegistry
  211. 2015-07-10 15:05:44,741 [root] Loading MacroRegistry
  212. 2015-07-10 15:05:44,753 [root] Loading ParserRegistry
  213. 2015-07-10 15:05:44,797 [noc-discovery] Delaying start for 10 seconds
  214. 2015-07-10 15:05:54,808 [noc.lib.scheduler.scheduler] [inv.discovery] Resetting running jobs
  215. 2015-07-10 15:05:54,810 [noc.lib.scheduler.scheduler] [inv.discovery] Checking indexes: ts
  216. 2015-07-10 15:05:54,811 [noc.lib.scheduler.scheduler] [inv.discovery] Checking indexes: jcls, key
  217. 2015-07-10 15:05:54,813 [noc.lib.scheduler.scheduler] [inv.discovery] Checking indexes: s, ts, jcls
  218. 2015-07-10 15:05:54,817 [noc.lib.scheduler.scheduler] [inv.discovery] Checking indexes: key, s
  219. 2015-07-10 15:05:54,828 [noc.lib.scheduler.scheduler] [inv.discovery] Indexes are ready
  220. 2015-07-10 15:05:54,829 [noc.lib.scheduler.scheduler] [inv.discovery] Running scheduler
  221. 2015-07-10 15:05:54,917 [noc.lib.scheduler.job] [inv.discovery][lldp_discovery][216] Running job
  222. 2015-07-10 15:05:54,923 [noc.lib.scheduler.job] [inv.discovery][lldp_discovery][216] Running script get_lldp_neighbors
  223. 2015-07-10 15:05:54,977 [noc.lib.scheduler.job] [inv.discovery][interface_discovery][386] Running job
  224. 2015-07-10 15:05:54,980 [noc.lib.scheduler.job] [inv.discovery][interface_discovery][386] Running script get_interfaces
  225. 2015-07-10 15:05:55,027 [noc.lib.scheduler.job] [inv.discovery][lldp_discovery][392] Running job
  226. 2015-07-10 15:05:55,031 [noc.lib.scheduler.job] [inv.discovery][lldp_discovery][392] Running script get_lldp_neighbors
  227. 2015-07-10 15:05:55,263 [noc.lib.debug] UNHANDLED EXCEPTION (2015-07-10 15:05:55.049402)
  228. BRANCH: develop TIP: 597dfadc4983
Advertisement
Add Comment
Please, Sign In to add comment