Advertisement
Guest User

Untitled

a guest
Sep 15th, 2014
285
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.59 KB | None | 0 0
  1. 2014-09-15 16:22:45,484 [root] [fm.correlator: dispose(5416da14f3b68202c9c513d5)] UNHANDLED EXCEPTION (2014-09-15 16:22:45.475847)
  2. Working directory: /opt/noc
  3. <class 'bson.errors.InvalidDocument'>
  4. documents must have only string keys, key was ObjectId('541302e0f3b6823b142d038f')
  5. START OF TRACEBACK
  6. ------------------------------------------------------------------------
  7. File: /opt/noc/lib/python2.7/site-packages/pymongo/cursor.py (Line: 1002)
  8. Function: _refresh
  9. 995 else:
  10. 996 ntoreturn = self.__limit
  11. 997 self.__send_message(
  12. 998 message.query(self.__query_options(),
  13. 999 self.__collection.full_name,
  14. 1000 self.__skip, ntoreturn,
  15. 1001 self.__query_spec(), self.__fields,
  16. 1002 ==> self.__uuid_subtype))
  17. 1003 if not self.__id:
  18. 1004 self.__killed = True
  19. 1005 elif self.__id: # Get More
  20. 1006 if self.__limit:
  21. 1007 limit = self.__limit - self.__retrieved
  22. 1008 if self.__batch_size:
  23. Variables:
  24. self = <pymongo.cursor.Cursor object at 0x80f1e8f50>
  25. ntoreturn = 0
  26. ------------------------------------------------------------------------
  27. File: /opt/noc/lib/python2.7/site-packages/pymongo/cursor.py (Line: 1058)
  28. Function: next
  29. 1051 def __iter__(self):
  30. 1052 return self
  31. 1053
  32. 1054 def next(self):
  33. 1055 if self.__empty:
  34. 1056 raise StopIteration
  35. 1057 db = self.__collection.database
  36. 1058 ==> if len(self.__data) or self._refresh():
  37. 1059 if self.__manipulate:
  38. 1060 return db._fix_outgoing(self.__data.popleft(),
  39. 1061 self.__collection)
  40. 1062 else:
  41. 1063 return self.__data.popleft()
  42. 1064 else:
  43. Variables:
  44. self = <pymongo.cursor.Cursor object at 0x80f1e8f50>
  45. db = Database(MongoClient('localhost', 27017), u'noc')
  46. ------------------------------------------------------------------------
  47. File: /opt/noc/lib/python2.7/site-packages/mongoengine/queryset/base.py (Line: 1137)
  48. Function: next
  49. 1130
  50. 1131 def next(self):
  51. 1132 """Wrap the result in a :class:`~mongoengine.Document` object.
  52. 1133 """
  53. 1134 if self._limit == 0 or self._none:
  54. 1135 raise StopIteration
  55. 1136
  56. 1137 ==> raw_doc = self._cursor.next()
  57. 1138 if self._as_pymongo:
  58. 1139 return self._get_as_pymongo(raw_doc)
  59. 1140 doc = self._document._from_son(raw_doc,
  60. 1141 _auto_dereference=self._auto_dereference)
  61. 1142 if self._scalar:
  62. 1143 return self._get_scalar(doc)
  63. Variables:
  64. self = .. queryset mid-iteration ..
  65. ------------------------------------------------------------------------
  66. File: /opt/noc/lib/python2.7/site-packages/mongoengine/queryset/queryset.py (Line: 93)
  67. Function: _populate_cache
  68. 86 (until the cursor is exhausted).
  69. 87 """
  70. 88 if self._result_cache is None:
  71. 89 self._result_cache = []
  72. 90 if self._has_more:
  73. 91 try:
  74. 92 for i in xrange(ITER_CHUNK_SIZE):
  75. 93 ==> self._result_cache.append(self.next())
  76. 94 except StopIteration:
  77. 95 self._has_more = False
  78. 96
  79. 97 def count(self, with_limit_and_skip=True):
  80. 98 """Count the selected elements in the query.
  81. 99
  82. Variables:
  83. i = 0
  84. self = .. queryset mid-iteration ..
  85. ------------------------------------------------------------------------
  86. File: /opt/noc/lib/python2.7/site-packages/mongoengine/queryset/queryset.py (Line: 81)
  87. Function: _iter_results
  88. 74 upper = len(self._result_cache)
  89. 75 while pos < upper:
  90. 76 yield self._result_cache[pos]
  91. 77 pos = pos + 1
  92. 78 if not self._has_more:
  93. 79 raise StopIteration
  94. 80 if len(self._result_cache) <= pos:
  95. 81 ==> self._populate_cache()
  96. 82
  97. 83 def _populate_cache(self):
  98. 84 """
  99. 85 Populates the result cache with ``ITER_CHUNK_SIZE`` more entries
  100. 86 (until the cursor is exhausted).
  101. 87 """
  102. Variables:
  103. upper = 0
  104. self = .. queryset mid-iteration ..
  105. pos = 0
  106. ------------------------------------------------------------------------
  107. File: /opt/noc/fm/correlator/daemon.py (Line: 285)
  108. Function: raise_alarm
  109. 278 # RCA
  110. 279 if a.alarm_class.id in self.rca_forward:
  111. 280 # Check alarm is a consequence of existing one
  112. 281 self.set_root_cause(a)
  113. 282 # Check alarm is root cause for existing ones
  114. 283 if a.alarm_class.id in self.rca_reverse:
  115. 284 # @todo: Restrict to window
  116. 285 ==> for aa in ActiveAlarm.objects.filter(alarm_class__in=self.rca_reverse):
  117. 286 if aa.alarm_class.id in self.rca_forward and a.id != aa.id:
  118. 287 self.set_root_cause(aa, a)
  119. 288 # Call handlers
  120. 289 if a.alarm_class.id in self.handlers:
  121. 290 for h in self.handlers[a.alarm_class.id]:
  122. 291 try:
  123. Variables:
  124. a = <ActiveAlarm: 5416da15f3b68202d3fb0da4>
  125. e = <ActiveEvent: 5416da14f3b68202c9c513d5>
  126. vars = {u'interface': u'Fa 0/20', u'description': u'Simona mp118 po2716604'}
  127. self = <noc.fm.correlator.daemon.Correlator object at 0x80dfcb1d0>
  128. r = <noc.fm.correlator.rule.Rule object at 0x80f386d10>
  129. discriminator = '6a76a9d3b2621233a05e9dea66ad89875f294338'
  130. ------------------------------------------------------------------------
  131. File: /opt/noc/fm/correlator/daemon.py (Line: 405)
  132. Function: dispose_event
  133. 398 # Process action
  134. 399 if r.action == "drop":
  135. 400 e.delete()
  136. 401 return
  137. 402 elif r.action == "ignore":
  138. 403 return
  139. 404 elif r.action == "raise" and r.combo_condition == "none":
  140. 405 ==> self.raise_alarm(r, e)
  141. 406 elif r.action == "clear" and r.combo_condition == "none":
  142. 407 self.clear_alarm(r, e)
  143. 408 if r.action in ("raise", "clear"):
  144. 409 # Write discriminator if can trigger delayed event
  145. 410 if r.unique and r.event_class.id in self.back_rules:
  146. 411 discriminator, vars = r.get_vars(e)
  147. Variables:
  148. e = <ActiveEvent: 5416da14f3b68202c9c513d5>
  149. self = <noc.fm.correlator.daemon.Correlator object at 0x80dfcb1d0>
  150. r = <noc.fm.correlator.rule.Rule object at 0x80f386d10>
  151. cond = True
  152. env =
  153. {'NOC_ACTIVATORS': <PrefixTable: NOC::Activators>,
  154. 'event': <ActiveEvent: 5416da14f3b68202c9c513d5>,
  155. 're': <module 're' from '/opt/noc/lib/python2.7/re.pyc'>}
  156. drc = [<noc.fm.correlator.rule.Rule object at 0x80f386d10>]
  157. ------------------------------------------------------------------------
  158. File: /opt/noc/fm/correlator/jobs/dispose.py (Line: 19)
  159. Function: handler
  160. 12
  161. 13
  162. 14 class AlarmDispositionJob(Job):
  163. 15 name = "dispose"
  164. 16 model = ActiveEvent
  165. 17
  166. 18 def handler(self):
  167. 19 ==> self.scheduler.correlator.dispose_event(self.object)
  168. 20 self.scheduler.correlator.update_stats(success=True)
  169. 21 return True
  170. 22
  171. 23 def on_exception(self):
  172. 24 self.scheduler.correlator.mark_as_failed(self.object)
  173. 25 self.scheduler.correlator.update_stats(success=False)
  174. Variables:
  175. self =
  176. <noc.fm.correlator.jobs.dispose.AlarmDispositionJob object at 0x80fdd5d90>
  177. ------------------------------------------------------------------------
  178. File: /opt/noc/lib/scheduler/scheduler.py (Line: 283)
  179. Function: _job_wrapper
  180. 276 else:
  181. 277 return self._job_wrapper(job, **kwargs)
  182. 278
  183. 279 def _job_wrapper(self, job, **kwargs):
  184. 280 tb = None
  185. 281 t0 = time.time()
  186. 282 try:
  187. 283 ==> r = job.handler(**kwargs)
  188. 284 except Exception:
  189. 285 # error_report()
  190. 286 tb = get_traceback()
  191. 287 job.error(tb)
  192. 288 job.on_exception()
  193. 289 s = job.S_EXCEPTION
  194. Variables:
  195. job =
  196. <noc.fm.correlator.jobs.dispose.AlarmDispositionJob object at 0x80fdd5d90>
  197. tb = None
  198. self = <noc.fm.correlator.scheduler.CorrelatorScheduler object at 0x80f135690>
  199. t0 = 1410783765.435573
  200. kwargs = {}
  201. ------------------------------------------------------------------------
  202. END OF TRACEBACK
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement