Advertisement
swedeejay

noc-discovery.log

Jan 18th, 2013
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 7.72 KB | None | 0 0
  1. 2013-01-17 11:52:11,860 [inv.discovery] Registering job class: stp_discovery (ignored)
  2. 2013-01-17 11:52:11,861 [inv.discovery] Registering job class: performance_report
  3. 2013-01-17 11:52:11,861 [inv.discovery] Registering job class: version_inventory
  4. 2013-01-17 11:52:11,862 [inv.discovery] Registering job class: mac_discovery
  5. 2013-01-17 11:52:11,862 [inv.discovery] Registering job class: cdp_discovery (ignored)
  6. 2013-01-17 11:52:11,863 [inv.discovery] Registering job class: lldp_discovery (ignored)
  7. 2013-01-17 11:52:11,867 [inv.discovery] Registering job class: ip_discovery
  8. 2013-01-17 11:52:11,871 [inv.discovery] Registering job class: interface_discovery
  9. 2013-01-17 11:52:11,882 [inv.discovery] Registering job class: id_discovery
  10. 2013-01-17 11:52:11,885 [inv.discovery] Running scheduler
  11. 2013-01-17 11:52:11,887 [inv.discovery] Running initial submit for version_inventory
  12. 2013-01-17 11:52:11,911 [inv.discovery] Running initial submit for mac_discovery
  13. 2013-01-17 11:52:11,963 [inv.discovery] Running initial submit for id_discovery
  14. 2013-01-17 11:52:11,969 [inv.discovery] Running initial submit for interface_discovery
  15. 2013-01-17 11:52:11,983 [inv.discovery] Running initial submit for ip_discovery
  16. 2013-01-17 11:52:12,004 [inv.discovery] Running job id_discovery(LAB-Verkstad)
  17. 2013-01-17 11:52:12,072 UNHANDLED EXCEPTION (2013-01-17 11:52:12.062860)
  18. Working directory: /opt/noc
  19. <type 'exceptions.AttributeError'>
  20. 'NoneType' object has no attribute 'mac_discovery'
  21. START OF TRACEBACK
  22. ------------------------------------------------------------------------
  23. File: /opt/noc/inv/discovery/jobs/mac_discovery.py (Line: 92)
  24. Function: can_run
  25.    85             for si in SubInterface.objects.filter(
  26.    86                 managed_object=self.object.id,
  27.    87                 enabled_afi="BRIDGE"):
  28.    88                 try:
  29.    89                     iface = si.interface
  30.    90                 except Exception:
  31.    91                     continue  # Dereference failed
  32.    92 ==>             if iface.profile.mac_discovery:
  33.    93                     return True
  34.    94             # No suitable interfaces
  35.    95             return False
  36.    96    
  37.    97         @classmethod
  38.    98         def get_submit_interval(cls, object):
  39. Variables:
  40.                   si = <SubInterface: ore-fbg1-sw030 Eth 1/25>
  41.                iface = <Interface: ore-fbg1-sw030: Eth 1/25>
  42.                 self = <noc.inv.discovery.jobs.mac_discovery.MACDiscoveryJob object at 0x3d68050>
  43. ------------------------------------------------------------------------
  44. File: /opt/noc/lib/scheduler/scheduler.py (Line: 205)
  45. Function: run_job
  46.   198                 self.remove_job(job.name, job.key)
  47.   199                 return
  48.   200             # Check threaded jobs limit
  49.   201             if job.threaded and self.max_threads:
  50.   202                 if threading.active_count() >= self.max_threads:
  51.   203                     return
  52.   204             # Check job can be run
  53.   205 ==>         if not job.can_run():
  54.   206                 self._complete_job(job, job.S_DEFERRED, None)
  55.   207                 return
  56.   208             # Change status
  57.   209             s = "threaded " if job.threaded else ""
  58.   210             self.info("Running %sjob %s(%s)" % (s, job.name, job.get_display_key()))
  59.   211             job.started = time.time()
  60. Variables:
  61.                  job = <noc.inv.discovery.jobs.mac_discovery.MACDiscoveryJob object at 0x3d68050>
  62.                 self = <noc.inv.discovery.scheduler.DiscoveryScheduler object at 0x1f43190>
  63. ------------------------------------------------------------------------
  64. File: /opt/noc/lib/scheduler/scheduler.py (Line: 357)
  65. Function: run_pending
  66.   350                 if (job.max_delay and
  67.   351                     job_data[self.ATTR_TS] < datetime.datetime.now() - datetime.timedelta(seconds=job.max_delay)):
  68.   352                     self.info("Job %s(%s) is scheduled too late" % (
  69.   353                         job.name, job.get_display_key()))
  70.   354                     job.started = time.time()
  71.   355                     self._complete_job(job, job.S_LATE, None)
  72.   356                     continue
  73.   357 ==>             self.run_job(job)
  74.   358                 n += 1
  75.   359             return n
  76.   360    
  77.   361         def run(self):
  78.   362             if self.reset_running:
  79.   363                 # Change running to waiting
  80. Variables:
  81.                   qs = <pymongo.cursor.Cursor object at 0x3bf7d50>
  82.                 jcls = <class 'noc.inv.discovery.jobs.mac_discovery.MACDiscoveryJob'>
  83.                 keys = [3, 2]
  84.                 self = <noc.inv.discovery.scheduler.DiscoveryScheduler object at 0x1f43190>
  85.             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', }
  86.                   t0 = 1358419931.9835849
  87.                    n = 1
  88.                    q = {'s': 'W', 'ts': {'$lte': datetime.datetime(2013, 1, 17, 11, 52, 11, 992532)}, 'jcls': {'$nin': ['stp_discovery', 'cdp_discovery', 'lldp_discovery']}}
  89.                  job = <noc.inv.discovery.jobs.mac_discovery.MACDiscoveryJob object at 0x3d68050>
  90.                    x = {u'_id': ObjectId('50f02a65cbdbda21b6e4eaea'), u'key': 2}
  91. ------------------------------------------------------------------------
  92. File: /opt/noc/lib/scheduler/scheduler.py (Line: 372)
  93. Function: run
  94.   365                 self.collection.update({
  95.   366                     self.ATTR_STATUS: self.S_RUN
  96.   367                 }, {
  97.   368                     "$set": {self.ATTR_STATUS: self.S_WAIT}
  98.   369                 }, multi=True, safe=True)
  99.   370             self.info("Running scheduler")
  100.   371             while True:
  101.   372 ==>             if not self.run_pending():
  102.   373                     time.sleep(1)
  103.   374                 else:
  104.   375                     self.cleanup()
  105.   376    
  106.   377         def wipe(self):
  107.   378             """
  108. Variables:
  109.                self = <noc.inv.discovery.scheduler.DiscoveryScheduler object at 0x1f43190>
  110. ------------------------------------------------------------------------
  111. File: /opt/noc/inv/discovery/daemon.py (Line: 28)
  112. Function: run
  113.   21    
  114.   22         def run(self):
  115.   23             try:
  116.   24                 PerformanceReportJob.submit(self.scheduler,
  117.   25                     key="performance_report", interval=60)
  118.   26             except self.scheduler.JobExists:
  119.   27                 pass
  120.   28 ==>         self.scheduler.run()
  121.   29    
  122.   30     #    def report_address_collisions(self):
  123.   31     #        ctx = {
  124.   32     #            "count": len(self.address_collisions),
  125.   33     #            "collisions": [
  126.   34     #                {
  127. Variables:
  128.                self = <noc.inv.discovery.daemon.DiscoveryDaemon object at 0x7fdd26c7a910>
  129. ------------------------------------------------------------------------
  130. File: /opt/noc/lib/daemon.py (Line: 364)
  131. Function: guarded_run
  132.  357    
  133.  358         def guarded_run(self):
  134.  359             """
  135.   360             Run daemon and catch common exceptions
  136.   361             :return:
  137.   362             """
  138.  363             try:
  139.  364 ==>             self.run()
  140.  365             except KeyboardInterrupt:
  141.  366                 pass
  142.  367             except MemoryError:
  143.  368                 logging.error("Out of memory. Exiting.")
  144.  369             except SystemExit:
  145.  370                 logging.info("Exiting")
  146. Variables:
  147.                self = <noc.inv.discovery.daemon.DiscoveryDaemon object at 0x7fdd26c7a910>
  148. ------------------------------------------------------------------------
  149. END OF TRACEBACK
  150. 2013-01-17 11:52:12,121 Removing pidfile: /var/run/noc/noc-discovery.pid
  151. 2013-01-17 11:52:12,121 STOP
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement