Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 2014-09-15 16:22:45,484 [root] [fm.correlator: dispose(5416da14f3b68202c9c513d5)] UNHANDLED EXCEPTION (2014-09-15 16:22:45.475847)
- Working directory: /opt/noc
- <class 'bson.errors.InvalidDocument'>
- documents must have only string keys, key was ObjectId('541302e0f3b6823b142d038f')
- START OF TRACEBACK
- ------------------------------------------------------------------------
- File: /opt/noc/lib/python2.7/site-packages/pymongo/cursor.py (Line: 1002)
- Function: _refresh
- 995 else:
- 996 ntoreturn = self.__limit
- 997 self.__send_message(
- 998 message.query(self.__query_options(),
- 999 self.__collection.full_name,
- 1000 self.__skip, ntoreturn,
- 1001 self.__query_spec(), self.__fields,
- 1002 ==> self.__uuid_subtype))
- 1003 if not self.__id:
- 1004 self.__killed = True
- 1005 elif self.__id: # Get More
- 1006 if self.__limit:
- 1007 limit = self.__limit - self.__retrieved
- 1008 if self.__batch_size:
- Variables:
- self = <pymongo.cursor.Cursor object at 0x80f1e8f50>
- ntoreturn = 0
- ------------------------------------------------------------------------
- File: /opt/noc/lib/python2.7/site-packages/pymongo/cursor.py (Line: 1058)
- Function: next
- 1051 def __iter__(self):
- 1052 return self
- 1053
- 1054 def next(self):
- 1055 if self.__empty:
- 1056 raise StopIteration
- 1057 db = self.__collection.database
- 1058 ==> if len(self.__data) or self._refresh():
- 1059 if self.__manipulate:
- 1060 return db._fix_outgoing(self.__data.popleft(),
- 1061 self.__collection)
- 1062 else:
- 1063 return self.__data.popleft()
- 1064 else:
- Variables:
- self = <pymongo.cursor.Cursor object at 0x80f1e8f50>
- db = Database(MongoClient('localhost', 27017), u'noc')
- ------------------------------------------------------------------------
- File: /opt/noc/lib/python2.7/site-packages/mongoengine/queryset/base.py (Line: 1137)
- Function: next
- 1130
- 1131 def next(self):
- 1132 """Wrap the result in a :class:`~mongoengine.Document` object.
- 1133 """
- 1134 if self._limit == 0 or self._none:
- 1135 raise StopIteration
- 1136
- 1137 ==> raw_doc = self._cursor.next()
- 1138 if self._as_pymongo:
- 1139 return self._get_as_pymongo(raw_doc)
- 1140 doc = self._document._from_son(raw_doc,
- 1141 _auto_dereference=self._auto_dereference)
- 1142 if self._scalar:
- 1143 return self._get_scalar(doc)
- Variables:
- self = .. queryset mid-iteration ..
- ------------------------------------------------------------------------
- File: /opt/noc/lib/python2.7/site-packages/mongoengine/queryset/queryset.py (Line: 93)
- Function: _populate_cache
- 86 (until the cursor is exhausted).
- 87 """
- 88 if self._result_cache is None:
- 89 self._result_cache = []
- 90 if self._has_more:
- 91 try:
- 92 for i in xrange(ITER_CHUNK_SIZE):
- 93 ==> self._result_cache.append(self.next())
- 94 except StopIteration:
- 95 self._has_more = False
- 96
- 97 def count(self, with_limit_and_skip=True):
- 98 """Count the selected elements in the query.
- 99
- Variables:
- i = 0
- self = .. queryset mid-iteration ..
- ------------------------------------------------------------------------
- File: /opt/noc/lib/python2.7/site-packages/mongoengine/queryset/queryset.py (Line: 81)
- Function: _iter_results
- 74 upper = len(self._result_cache)
- 75 while pos < upper:
- 76 yield self._result_cache[pos]
- 77 pos = pos + 1
- 78 if not self._has_more:
- 79 raise StopIteration
- 80 if len(self._result_cache) <= pos:
- 81 ==> self._populate_cache()
- 82
- 83 def _populate_cache(self):
- 84 """
- 85 Populates the result cache with ``ITER_CHUNK_SIZE`` more entries
- 86 (until the cursor is exhausted).
- 87 """
- Variables:
- upper = 0
- self = .. queryset mid-iteration ..
- pos = 0
- ------------------------------------------------------------------------
- File: /opt/noc/fm/correlator/daemon.py (Line: 285)
- Function: raise_alarm
- 278 # RCA
- 279 if a.alarm_class.id in self.rca_forward:
- 280 # Check alarm is a consequence of existing one
- 281 self.set_root_cause(a)
- 282 # Check alarm is root cause for existing ones
- 283 if a.alarm_class.id in self.rca_reverse:
- 284 # @todo: Restrict to window
- 285 ==> for aa in ActiveAlarm.objects.filter(alarm_class__in=self.rca_reverse):
- 286 if aa.alarm_class.id in self.rca_forward and a.id != aa.id:
- 287 self.set_root_cause(aa, a)
- 288 # Call handlers
- 289 if a.alarm_class.id in self.handlers:
- 290 for h in self.handlers[a.alarm_class.id]:
- 291 try:
- Variables:
- a = <ActiveAlarm: 5416da15f3b68202d3fb0da4>
- e = <ActiveEvent: 5416da14f3b68202c9c513d5>
- vars = {u'interface': u'Fa 0/20', u'description': u'Simona mp118 po2716604'}
- self = <noc.fm.correlator.daemon.Correlator object at 0x80dfcb1d0>
- r = <noc.fm.correlator.rule.Rule object at 0x80f386d10>
- discriminator = '6a76a9d3b2621233a05e9dea66ad89875f294338'
- ------------------------------------------------------------------------
- File: /opt/noc/fm/correlator/daemon.py (Line: 405)
- Function: dispose_event
- 398 # Process action
- 399 if r.action == "drop":
- 400 e.delete()
- 401 return
- 402 elif r.action == "ignore":
- 403 return
- 404 elif r.action == "raise" and r.combo_condition == "none":
- 405 ==> self.raise_alarm(r, e)
- 406 elif r.action == "clear" and r.combo_condition == "none":
- 407 self.clear_alarm(r, e)
- 408 if r.action in ("raise", "clear"):
- 409 # Write discriminator if can trigger delayed event
- 410 if r.unique and r.event_class.id in self.back_rules:
- 411 discriminator, vars = r.get_vars(e)
- Variables:
- e = <ActiveEvent: 5416da14f3b68202c9c513d5>
- self = <noc.fm.correlator.daemon.Correlator object at 0x80dfcb1d0>
- r = <noc.fm.correlator.rule.Rule object at 0x80f386d10>
- cond = True
- env =
- {'NOC_ACTIVATORS': <PrefixTable: NOC::Activators>,
- 'event': <ActiveEvent: 5416da14f3b68202c9c513d5>,
- 're': <module 're' from '/opt/noc/lib/python2.7/re.pyc'>}
- drc = [<noc.fm.correlator.rule.Rule object at 0x80f386d10>]
- ------------------------------------------------------------------------
- File: /opt/noc/fm/correlator/jobs/dispose.py (Line: 19)
- Function: handler
- 12
- 13
- 14 class AlarmDispositionJob(Job):
- 15 name = "dispose"
- 16 model = ActiveEvent
- 17
- 18 def handler(self):
- 19 ==> self.scheduler.correlator.dispose_event(self.object)
- 20 self.scheduler.correlator.update_stats(success=True)
- 21 return True
- 22
- 23 def on_exception(self):
- 24 self.scheduler.correlator.mark_as_failed(self.object)
- 25 self.scheduler.correlator.update_stats(success=False)
- Variables:
- self =
- <noc.fm.correlator.jobs.dispose.AlarmDispositionJob object at 0x80fdd5d90>
- ------------------------------------------------------------------------
- File: /opt/noc/lib/scheduler/scheduler.py (Line: 283)
- Function: _job_wrapper
- 276 else:
- 277 return self._job_wrapper(job, **kwargs)
- 278
- 279 def _job_wrapper(self, job, **kwargs):
- 280 tb = None
- 281 t0 = time.time()
- 282 try:
- 283 ==> r = job.handler(**kwargs)
- 284 except Exception:
- 285 # error_report()
- 286 tb = get_traceback()
- 287 job.error(tb)
- 288 job.on_exception()
- 289 s = job.S_EXCEPTION
- Variables:
- job =
- <noc.fm.correlator.jobs.dispose.AlarmDispositionJob object at 0x80fdd5d90>
- tb = None
- self = <noc.fm.correlator.scheduler.CorrelatorScheduler object at 0x80f135690>
- t0 = 1410783765.435573
- kwargs = {}
- ------------------------------------------------------------------------
- END OF TRACEBACK
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement