Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 2015-07-10 15:05:40,568 [noc.lib.scheduler.job] [inv.discovery][lldp_discovery][392] Running job
- 2015-07-10 15:05:40,572 [noc.lib.scheduler.job] [inv.discovery][lldp_discovery][392] Running script get_lldp_neighbors
- 2015-07-10 15:05:40,793 [noc.lib.debug] UNHANDLED EXCEPTION (2015-07-10 15:05:40.586040)
- BRANCH: develop TIP: 597dfadc4983
- PROCESS: ./scripts/noc-discovery.py
- ERROR FINGERPRINT: 4accbd6c-6be3-5d9d-900d-3dd87028086e
- WORKING DIRECTORY: /opt/noc
- EXCEPTION: <type 'exceptions.KeyError'> u'get_lldp_neighbors'
- START OF TRACEBACK
- ------------------------------------------------------------------------
- File: sa/models/maptask.py (Line: 108)
- Function: create_task
- 101 sp[-1] not in object.profile.scripts):
- 102 status = "F"
- 103 result = {
- 104 "code": ERR_INVALID_SCRIPT,
- 105 "text": "Invalid script %s" % script
- 106 }
- 107 if not timeout:
- 108 ==> timeout = object.profile.scripts[sp[-1]].get_timeout()
- 109 if not timeout:
- 110 timeout = 60
- 111 now = datetime.datetime.now()
- 112 # Create task
- 113 t = MapTask(
- 114 task=None,
- Variables:
- status = 'F'
- object = <ManagedObject: hsw01-gts9-ktv>
- script = u'Huawei.VRP3.get_lldp_neighbors'
- sp = [u'Huawei', u'VRP3', u'get_lldp_neighbors']
- params = {}
- result = {'text': u'Invalid script Huawei.VRP3.get_lldp_neighbors', 'code': 13}
- timeout = None
- cls = <class 'noc.sa.models.maptask.MapTask'>
- ------------------------------------------------------------------------
- File: lib/scheduler/scheduler.py (Line: 264)
- Function: create_task
- 257 :return:
- 258 """
- 259 @transaction.commit_on_success
- 260 def create_task(job):
- 261 return MapTask.create_task(
- 262 job.get_managed_object(),
- 263 job.map_task,
- 264 ==> job.get_map_task_params()
- 265 )
- 266
- 267 # Dereference job
- 268 self.metrics.jobs_dereference_count += 1
- 269 if not job.dereference():
- 270 self.logger.info("Cannot dereference job %s(%s). Removing",
- Variables:
- job =
- <noc.inv.discovery.jobs.lldp_discovery.LLDPLinkDiscoveryJob object at 0x4286410>
- ------------------------------------------------------------------------
- File: lib/python2.6/site-packages/django/db/transaction.py (Line: 224)
- Function: inner
- 217 def __exit__(self, exc_type, exc_value, traceback):
- 218 self.exiting(exc_value, self.using)
- 219
- 220 def __call__(self, func):
- 221 @wraps(func)
- 222 def inner(*args, **kwargs):
- 223 with self:
- 224 ==> return func(*args, **kwargs)
- 225 return inner
- 226
- 227 def _transaction_func(entering, exiting, using):
- 228 """
- 229 Takes 3 things, an entering function (what to do to start this block of
- 230 transaction management), an exiting function (what to do to end it, on both
- Variables:
- self = <django.db.transaction.Transaction object at 0x4286690>
- args =
- (<noc.inv.discovery.jobs.lldp_discovery.LLDPLinkDiscoveryJob object at 0x4286410>,)
- func = <function create_task at 0x4280a28>
- kwargs = {}
- ------------------------------------------------------------------------
- File: lib/scheduler/scheduler.py (Line: 307)
- Function: run_job
- 300 self._run_job_handler(
- 301 job,
- 302 object=job.get_managed_object(),
- 303 result=job.beef[job.key])
- 304 else:
- 305 job.logger.info("Running script %s", job.map_task)
- 306 # Run in MRT mode
- 307 ==> t = create_task(job)
- 308 self.active_mrt[t.id] = job
- 309 else:
- 310 self._run_job_handler(job)
- 311
- 312 def _run_job_handler(self, job, **kwargs):
- 313 if job.threaded:
- Variables:
- s = ''
- create_task = <function create_task at 0x4280c08>
- job =
- <noc.inv.discovery.jobs.lldp_discovery.LLDPLinkDiscoveryJob object at 0x4286410>
- self = <noc.inv.discovery.scheduler.DiscoveryScheduler object at 0x3e25090>
- ------------------------------------------------------------------------
- File: lib/scheduler/scheduler.py (Line: 527)
- Function: run_pending
- 520 continue
- 521 # Check for group limits
- 522 group = job.get_group()
- 523 if self.can_run(job):
- 524 if group is not None:
- 525 with self.running_lock:
- 526 self.running_count[group] += 1
- 527 ==> self.run_job(job)
- 528 n += 1
- 529 return n
- 530
- 531 def run(self):
- 532 if self.reset_running:
- 533 # Change running to waiting
- Variables:
- group = 'discovery-392'
- jcls = <class 'noc.inv.discovery.jobs.lldp_discovery.LLDPLinkDiscoveryJob'>
- self = <noc.inv.discovery.scheduler.DiscoveryScheduler object at 0x3e25090>
- get_complete_tasks = <function get_complete_tasks at 0x42809b0>
- job_data =
- {u'_id': ObjectId('558d1c3b7e85c90f5bc18e97'),
- u'data': None,
- u'f': 0,
- u'jcls': u'lldp_discovery',
- u'key': 392,
- u'last': datetime.datetime(2015, 7, 10, 15, 5, 25, 504000),
- u'ldur': 0.056463003158569336,
- u'log': [],
- u'ls': u'F',
- u'runs': 1638,
- u's': u'W',
- u'schedule': {u'failed_interval': 600,
- u'interval': 86400,
- u'offset': 0.079226934248661673},
- u'st': datetime.datetime(2015, 6, 26, 12, 33, 58, 260000),
- u'tb': {u'code': 13,
- u'text': u'Invalid script Huawei.VRP3.get_lldp_neighbors'},
- u'ts': datetime.datetime(2015, 7, 9, 13, 24, 39, 699000)}
- n = 2
- job =
- <noc.inv.discovery.jobs.lldp_discovery.LLDPLinkDiscoveryJob object at 0x4286410>
- ------------------------------------------------------------------------
- File: lib/scheduler/scheduler.py (Line: 543)
- Function: run
- 536 self.ATTR_STATUS: self.S_RUN
- 537 }, {
- 538 "$set": {self.ATTR_STATUS: self.S_WAIT}
- 539 }, multi=True, safe=True)
- 540 self.ensure_indexes()
- 541 self.logger.info("Running scheduler")
- 542 while True:
- 543 ==> if not self.run_pending():
- 544 time.sleep(1)
- 545 else:
- 546 self.cleanup()
- 547
- 548 def get_faults(self, job_name, key=None):
- 549 """
- Variables:
- self = <noc.inv.discovery.scheduler.DiscoveryScheduler object at 0x3e25090>
- ------------------------------------------------------------------------
- File: inv/discovery/daemon.py (Line: 37)
- Function: run
- 30
- 31 def run(self):
- 32 try:
- 33 PerformanceReportJob.submit(self.scheduler,
- 34 key="performance_report", interval=60)
- 35 except self.scheduler.JobExists:
- 36 pass
- 37 ==> self.scheduler.run()
- 38
- 39 def load_config(self):
- 40 super(DiscoveryDaemon, self).load_config()
- 41 self.load_beef_map()
- 42 log_jobs = self.config.get("main", "log_jobs") or None
- 43 self.scheduler.set_job_log(log_jobs)
- Variables:
- self = <noc.inv.discovery.daemon.DiscoveryDaemon object at 0x7fdb6423a510>
- ------------------------------------------------------------------------
- File: lib/daemon/base.py (Line: 433)
- Function: guarded_run
- 426 :return:
- 427 """
- 428 if self.start_delay:
- 429 self.logger.info("Delaying start for %s seconds",
- 430 self.start_delay)
- 431 time.sleep(self.start_delay)
- 432 try:
- 433 ==> self.run()
- 434 except KeyboardInterrupt:
- 435 pass
- 436 except MemoryError:
- 437 self.logger.error("Out of memory. Exiting.")
- 438 except SystemExit:
- 439 self.logger.info("Exiting")
- Variables:
- self = <noc.inv.discovery.daemon.DiscoveryDaemon object at 0x7fdb6423a510>
- ------------------------------------------------------------------------
- END OF TRACEBACK
- 2015-07-10 15:05:40,795 [noc-discovery] Removing pidfile: /var/run/noc/noc-discovery.pid
- 2015-07-10 15:05:40,796 [noc-discovery] STOP
- 2015-07-10 15:05:44,720 [noc.lib.perf] Stats are disabled
- 2015-07-10 15:05:44,720 [noc.lib.threadpool] Pool settings: name=pool start_threads=1 max_threads=30 min_spare=1 max_spare=7 backlog=30
- 2015-07-10 15:05:44,720 [noc-discovery] Initializing solutions
- 2015-07-10 15:05:44,734 [root] Loading VCSRegistry
- 2015-07-10 15:05:44,741 [root] Loading MacroRegistry
- 2015-07-10 15:05:44,753 [root] Loading ParserRegistry
- 2015-07-10 15:05:44,797 [noc-discovery] Delaying start for 10 seconds
- 2015-07-10 15:05:54,808 [noc.lib.scheduler.scheduler] [inv.discovery] Resetting running jobs
- 2015-07-10 15:05:54,810 [noc.lib.scheduler.scheduler] [inv.discovery] Checking indexes: ts
- 2015-07-10 15:05:54,811 [noc.lib.scheduler.scheduler] [inv.discovery] Checking indexes: jcls, key
- 2015-07-10 15:05:54,813 [noc.lib.scheduler.scheduler] [inv.discovery] Checking indexes: s, ts, jcls
- 2015-07-10 15:05:54,817 [noc.lib.scheduler.scheduler] [inv.discovery] Checking indexes: key, s
- 2015-07-10 15:05:54,828 [noc.lib.scheduler.scheduler] [inv.discovery] Indexes are ready
- 2015-07-10 15:05:54,829 [noc.lib.scheduler.scheduler] [inv.discovery] Running scheduler
- 2015-07-10 15:05:54,917 [noc.lib.scheduler.job] [inv.discovery][lldp_discovery][216] Running job
- 2015-07-10 15:05:54,923 [noc.lib.scheduler.job] [inv.discovery][lldp_discovery][216] Running script get_lldp_neighbors
- 2015-07-10 15:05:54,977 [noc.lib.scheduler.job] [inv.discovery][interface_discovery][386] Running job
- 2015-07-10 15:05:54,980 [noc.lib.scheduler.job] [inv.discovery][interface_discovery][386] Running script get_interfaces
- 2015-07-10 15:05:55,027 [noc.lib.scheduler.job] [inv.discovery][lldp_discovery][392] Running job
- 2015-07-10 15:05:55,031 [noc.lib.scheduler.job] [inv.discovery][lldp_discovery][392] Running script get_lldp_neighbors
- 2015-07-10 15:05:55,263 [noc.lib.debug] UNHANDLED EXCEPTION (2015-07-10 15:05:55.049402)
- BRANCH: develop TIP: 597dfadc4983
Advertisement
Add Comment
Please, Sign In to add comment