Advertisement
Guest User

Untitled

a guest
Aug 4th, 2015
288
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.94 KB | None | 0 0
  1. 2015-08-04 13:06:05,602 [noc-sae] MRT task=-/218180 object=wiping-115(10.110.0.13) script=DLink.DxS.get_capabilities status=failed code=28 error=Object is not managed
  2. 2015-08-04 13:06:05,615 [noc.lib.debug] UNHANDLED EXCEPTION (2015-08-04 13:06:05.606654)
  3. BRANCH: develop TIP: 1215b77e950f
  4. PROCESS: ./scripts/noc-sae.py
  5. ERROR FINGERPRINT: c6f5163b-dfcb-529c-8fcb-5678dd284c72
  6. WORKING DIRECTORY: /home/noc
  7. EXCEPTION: <type 'exceptions.AttributeError'> 'NoneType' object has no attribute 'id'
  8. START OF TRACEBACK
  9. ------------------------------------------------------------------------
  10. File: sa/sae/sae.py (Line: 501)
  11. Function: log_mrt
  12. 494 error_text=kwargs["error"],
  13. 495 expires=now + datetime.timedelta(days=7)
  14. 496 ).save()
  15. 497 # Log into mrt log
  16. 498 # timestamp, map task id, object id, object name, object addres,
  17. 499 # object profile, script, status
  18. 500 if self.mrt_log:
  19. 501 ==> fn = os.path.join(self.mrt_log_dir, str(task.task.id) + ".csv")
  20. 502 data = [
  21. 503 time.strftime("%Y-%m-%dT%H:%M:%S%Z"),
  22. 504 str(task.id),
  23. 505 str(task.managed_object.id),
  24. 506 task.managed_object.name.encode("utf-8"),
  25. 507 task.managed_object.address,
  26. Variables:
  27. rt = u'-'
  28. status = 'failed'
  29. task = <MapTask: 218180: wiping-115 DLink.DxS.get_capabilities>
  30. level = 20
  31. k = 'error'
  32. args = None
  33. has_task = False
  34. r =
  35. [u'MRT task=-/218180 object=wiping-115(10.110.0.13) script=DLink.DxS.get_capabilities status=failed',
  36. u'code=28',
  37. u'error=Object is not managed']
  38. kwargs = {'code': 28, 'error': 'Object is not managed'}
  39. now = datetime.datetime(2015, 8, 4, 13, 6, 5, 603205)
  40. self = <noc.sa.sae.sae.SAE object at 0x800736090>
  41. ------------------------------------------------------------------------
  42. File: sa/sae/sae.py (Line: 602)
  43. Function: fail_task
  44. 595 @transaction.commit_on_success
  45. 596 def fail_task(mt, code, text):
  46. 597 MapTask.objects.filter(id=mt.id).update(
  47. 598 status="F",
  48. 599 script_result=dict(code=code, text=text)
  49. 600 )
  50. 601 self.log_mrt(logging.INFO, task=mt, status="failed",
  51. 602 ==> code=code, error=text)
  52. 603
  53. 604 @transaction.commit_on_success
  54. 605 def mark_as_running(mt):
  55. 606 MapTask.objects.filter(id=mt.id).update(status="R")
  56. 607
  57. 608 @transaction.commit_on_success
  58. Variables:
  59. text = 'Object is not managed'
  60. self = <noc.sa.sae.sae.SAE object at 0x800736090>
  61. code = 28
  62. mt = <MapTask: 218180: wiping-115 DLink.DxS.get_capabilities>
  63. ------------------------------------------------------------------------
  64. File: lib/python2.7/site-packages/django/db/transaction.py (Line: 224)
  65. Function: inner
  66. 217 def __exit__(self, exc_type, exc_value, traceback):
  67. 218 self.exiting(exc_value, self.using)
  68. 219
  69. 220 def __call__(self, func):
  70. 221 @wraps(func)
  71. 222 def inner(*args, **kwargs):
  72. 223 with self:
  73. 224 ==> return func(*args, **kwargs)
  74. 225 return inner
  75. 226
  76. 227 def _transaction_func(entering, exiting, using):
  77. 228 """
  78. 229 Takes 3 things, an entering function (what to do to start this block of
  79. 230 transaction management), an exiting function (what to do to end it, on both
  80. Variables:
  81. self = <django.db.transaction.Transaction object at 0x80d8486d0>
  82. args =
  83. (<MapTask: 218180: wiping-115 DLink.DxS.get_capabilities>,
  84. 28,
  85. 'Object is not managed')
  86. func = <function fail_task at 0x80bc9a9b0>
  87. kwargs = {}
  88. ------------------------------------------------------------------------
  89. File: sa/sae/sae.py (Line: 634)
  90. Function: process_mrtasks
  91. 627 throttled_shards = set() # shard_id
  92. 628 self.blocked_pools = set() # Reset block status
  93. 629 # Run tasks
  94. 630 fail_invalid_reduce()
  95. 631 for mt in get_pending_tasks():
  96. 632 # Check object is managed
  97. 633 if not mt.managed_object.is_managed:
  98. 634 ==> fail_task(mt, ERR_OBJECT_NOT_MANAGED, "Object is not managed")
  99. 635 continue
  100. 636 # Check for task timeouts
  101. 637 if mt.stop_time < t:
  102. 638 fail_task(mt, ERR_TIMEOUT, text="Timed out")
  103. 639 continue
  104. 640 # Check blocked pools
  105. Variables:
  106. map_callback = <function map_callback at 0x80bc9a758>
  107. fail_invalid_reduce = <function fail_invalid_reduce at 0x80bc9acf8>
  108. mark_as_running = <function mark_as_running at 0x80bc9ab18>
  109. exec_script = <function exec_script at 0x80bc9a668>
  110. self = <noc.sa.sae.sae.SAE object at 0x800736090>
  111. throttled_shards = set([])
  112. mt = <MapTask: 218180: wiping-115 DLink.DxS.get_capabilities>
  113. t = datetime.datetime(2015, 8, 4, 13, 6, 5, 390972)
  114. get_pending_tasks = <function get_pending_tasks at 0x80bc9a398>
  115. fail_task = <function fail_task at 0x80bc9a488>
  116. sae_mrt_rate = 0
  117. shard_mrt_rate = {}
  118. ------------------------------------------------------------------------
  119. File: sa/sae/sae.py (Line: 266)
  120. Function: tick
  121. 259 reset_queries() # Clear debug SQL log
  122. 260 if self.batched_events:
  123. 261 self.logger.info("Writing %d batched events", self.batched_events)
  124. 262 self.event_batch.execute({"w": 0})
  125. 263 self.prepare_event_bulk()
  126. 264 if t - self.last_mrtask_check >= self.mrt_schedule_interval:
  127. 265 # Check Map/Reduce task status
  128. 266 ==> self.process_mrtasks()
  129. 267 self.last_mrtask_check = t
  130. 268 if t - self.last_status_refresh >= self.activator_status_interval:
  131. 269 self.refresh_activator_status()
  132. 270
  133. 271 def write_event(self, data, timestamp=None, managed_object=None):
  134. 272 """
  135. Variables:
  136. self = <noc.sa.sae.sae.SAE object at 0x800736090>
  137. t = 1438682765.390802
  138. ------------------------------------------------------------------------
  139. File: lib/nbsocket/socketfactory.py (Line: 268)
  140. Function: run
  141. 261 last_tick = last_stale = time.time()
  142. 262 while cond() and not self.to_shutdown:
  143. 263 self.loop(1)
  144. 264 t = time.time()
  145. 265 if self.tick_callback and t - last_tick >= 1:
  146. 266 self.metrics.ticks += 1
  147. 267 try:
  148. 268 ==> self.tick_callback()
  149. 269 except Exception:
  150. 270 error_report()
  151. 271 logger.info("Restoring from tick() failure")
  152. 272 last_tick = t
  153. 273 if t - last_stale >= 1:
  154. 274 self.close_stale()
  155. Variables:
  156. self = <noc.lib.nbsocket.socketfactory.SocketFactory object at 0x80812e590>
  157. cond = <function <lambda> at 0x80bc87a28>
  158. t = 1438682765.39077
  159. last_stale = 1438682764.190519
  160. run_forever = True
  161. last_tick = 1438682764.190519
  162. ------------------------------------------------------------------------
  163. END OF TRACEBACK
  164. 2015-08-04 13:06:05,616 [noc.lib.nbsocket.socketfactory] Restoring from tick() failure
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement