Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 2013-01-17 11:52:11,860 [inv.discovery] Registering job class: stp_discovery (ignored)
- 2013-01-17 11:52:11,861 [inv.discovery] Registering job class: performance_report
- 2013-01-17 11:52:11,861 [inv.discovery] Registering job class: version_inventory
- 2013-01-17 11:52:11,862 [inv.discovery] Registering job class: mac_discovery
- 2013-01-17 11:52:11,862 [inv.discovery] Registering job class: cdp_discovery (ignored)
- 2013-01-17 11:52:11,863 [inv.discovery] Registering job class: lldp_discovery (ignored)
- 2013-01-17 11:52:11,867 [inv.discovery] Registering job class: ip_discovery
- 2013-01-17 11:52:11,871 [inv.discovery] Registering job class: interface_discovery
- 2013-01-17 11:52:11,882 [inv.discovery] Registering job class: id_discovery
- 2013-01-17 11:52:11,885 [inv.discovery] Running scheduler
- 2013-01-17 11:52:11,887 [inv.discovery] Running initial submit for version_inventory
- 2013-01-17 11:52:11,911 [inv.discovery] Running initial submit for mac_discovery
- 2013-01-17 11:52:11,963 [inv.discovery] Running initial submit for id_discovery
- 2013-01-17 11:52:11,969 [inv.discovery] Running initial submit for interface_discovery
- 2013-01-17 11:52:11,983 [inv.discovery] Running initial submit for ip_discovery
- 2013-01-17 11:52:12,004 [inv.discovery] Running job id_discovery(LAB-Verkstad)
- 2013-01-17 11:52:12,072 UNHANDLED EXCEPTION (2013-01-17 11:52:12.062860)
- Working directory: /opt/noc
- <type 'exceptions.AttributeError'>
- 'NoneType' object has no attribute 'mac_discovery'
- START OF TRACEBACK
- ------------------------------------------------------------------------
- File: /opt/noc/inv/discovery/jobs/mac_discovery.py (Line: 92)
- Function: can_run
- 85 for si in SubInterface.objects.filter(
- 86 managed_object=self.object.id,
- 87 enabled_afi="BRIDGE"):
- 88 try:
- 89 iface = si.interface
- 90 except Exception:
- 91 continue # Dereference failed
- 92 ==> if iface.profile.mac_discovery:
- 93 return True
- 94 # No suitable interfaces
- 95 return False
- 96
- 97 @classmethod
- 98 def get_submit_interval(cls, object):
- Variables:
- si = <SubInterface: ore-fbg1-sw030 Eth 1/25>
- iface = <Interface: ore-fbg1-sw030: Eth 1/25>
- self = <noc.inv.discovery.jobs.mac_discovery.MACDiscoveryJob object at 0x3d68050>
- ------------------------------------------------------------------------
- File: /opt/noc/lib/scheduler/scheduler.py (Line: 205)
- Function: run_job
- 198 self.remove_job(job.name, job.key)
- 199 return
- 200 # Check threaded jobs limit
- 201 if job.threaded and self.max_threads:
- 202 if threading.active_count() >= self.max_threads:
- 203 return
- 204 # Check job can be run
- 205 ==> if not job.can_run():
- 206 self._complete_job(job, job.S_DEFERRED, None)
- 207 return
- 208 # Change status
- 209 s = "threaded " if job.threaded else ""
- 210 self.info("Running %sjob %s(%s)" % (s, job.name, job.get_display_key()))
- 211 job.started = time.time()
- Variables:
- job = <noc.inv.discovery.jobs.mac_discovery.MACDiscoveryJob object at 0x3d68050>
- self = <noc.inv.discovery.scheduler.DiscoveryScheduler object at 0x1f43190>
- ------------------------------------------------------------------------
- File: /opt/noc/lib/scheduler/scheduler.py (Line: 357)
- Function: run_pending
- 350 if (job.max_delay and
- 351 job_data[self.ATTR_TS] < datetime.datetime.now() - datetime.timedelta(seconds=job.max_delay)):
- 352 self.info("Job %s(%s) is scheduled too late" % (
- 353 job.name, job.get_display_key()))
- 354 job.started = time.time()
- 355 self._complete_job(job, job.S_LATE, None)
- 356 continue
- 357 ==> self.run_job(job)
- 358 n += 1
- 359 return n
- 360
- 361 def run(self):
- 362 if self.reset_running:
- 363 # Change running to waiting
- Variables:
- qs = <pymongo.cursor.Cursor object at 0x3bf7d50>
- jcls = <class 'noc.inv.discovery.jobs.mac_discovery.MACDiscoveryJob'>
- keys = [3, 2]
- self = <noc.inv.discovery.scheduler.DiscoveryScheduler object at 0x1f43190>
- job_data = {u'jcls': u'mac_discovery', u'schedule': {u'interval': 86400, u'randomize': True, u'failed_interval': 86400, u'offset': 0.23261706470344656}, u'ts': datetime.datetime(2013, 1, 12, 6, 25, 42, 313000), u's': u'W', }
- t0 = 1358419931.9835849
- n = 1
- q = {'s': 'W', 'ts': {'$lte': datetime.datetime(2013, 1, 17, 11, 52, 11, 992532)}, 'jcls': {'$nin': ['stp_discovery', 'cdp_discovery', 'lldp_discovery']}}
- job = <noc.inv.discovery.jobs.mac_discovery.MACDiscoveryJob object at 0x3d68050>
- x = {u'_id': ObjectId('50f02a65cbdbda21b6e4eaea'), u'key': 2}
- ------------------------------------------------------------------------
- File: /opt/noc/lib/scheduler/scheduler.py (Line: 372)
- Function: run
- 365 self.collection.update({
- 366 self.ATTR_STATUS: self.S_RUN
- 367 }, {
- 368 "$set": {self.ATTR_STATUS: self.S_WAIT}
- 369 }, multi=True, safe=True)
- 370 self.info("Running scheduler")
- 371 while True:
- 372 ==> if not self.run_pending():
- 373 time.sleep(1)
- 374 else:
- 375 self.cleanup()
- 376
- 377 def wipe(self):
- 378 """
- Variables:
- self = <noc.inv.discovery.scheduler.DiscoveryScheduler object at 0x1f43190>
- ------------------------------------------------------------------------
- File: /opt/noc/inv/discovery/daemon.py (Line: 28)
- Function: run
- 21
- 22 def run(self):
- 23 try:
- 24 PerformanceReportJob.submit(self.scheduler,
- 25 key="performance_report", interval=60)
- 26 except self.scheduler.JobExists:
- 27 pass
- 28 ==> self.scheduler.run()
- 29
- 30 # def report_address_collisions(self):
- 31 # ctx = {
- 32 # "count": len(self.address_collisions),
- 33 # "collisions": [
- 34 # {
- Variables:
- self = <noc.inv.discovery.daemon.DiscoveryDaemon object at 0x7fdd26c7a910>
- ------------------------------------------------------------------------
- File: /opt/noc/lib/daemon.py (Line: 364)
- Function: guarded_run
- 357
- 358 def guarded_run(self):
- 359 """
- 360 Run daemon and catch common exceptions
- 361 :return:
- 362 """
- 363 try:
- 364 ==> self.run()
- 365 except KeyboardInterrupt:
- 366 pass
- 367 except MemoryError:
- 368 logging.error("Out of memory. Exiting.")
- 369 except SystemExit:
- 370 logging.info("Exiting")
- Variables:
- self = <noc.inv.discovery.daemon.DiscoveryDaemon object at 0x7fdd26c7a910>
- ------------------------------------------------------------------------
- END OF TRACEBACK
- 2013-01-17 11:52:12,121 Removing pidfile: /var/run/noc/noc-discovery.pid
- 2013-01-17 11:52:12,121 STOP
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement