Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 2015-08-04 13:06:05,602 [noc-sae] MRT task=-/218180 object=wiping-115(10.110.0.13) script=DLink.DxS.get_capabilities status=failed code=28 error=Object is not managed
- 2015-08-04 13:06:05,615 [noc.lib.debug] UNHANDLED EXCEPTION (2015-08-04 13:06:05.606654)
- BRANCH: develop TIP: 1215b77e950f
- PROCESS: ./scripts/noc-sae.py
- ERROR FINGERPRINT: c6f5163b-dfcb-529c-8fcb-5678dd284c72
- WORKING DIRECTORY: /home/noc
- EXCEPTION: <type 'exceptions.AttributeError'> 'NoneType' object has no attribute 'id'
- START OF TRACEBACK
- ------------------------------------------------------------------------
- File: sa/sae/sae.py (Line: 501)
- Function: log_mrt
- 494 error_text=kwargs["error"],
- 495 expires=now + datetime.timedelta(days=7)
- 496 ).save()
- 497 # Log into mrt log
- 498 # timestamp, map task id, object id, object name, object addres,
- 499 # object profile, script, status
- 500 if self.mrt_log:
- 501 ==> fn = os.path.join(self.mrt_log_dir, str(task.task.id) + ".csv")
- 502 data = [
- 503 time.strftime("%Y-%m-%dT%H:%M:%S%Z"),
- 504 str(task.id),
- 505 str(task.managed_object.id),
- 506 task.managed_object.name.encode("utf-8"),
- 507 task.managed_object.address,
- Variables:
- rt = u'-'
- status = 'failed'
- task = <MapTask: 218180: wiping-115 DLink.DxS.get_capabilities>
- level = 20
- k = 'error'
- args = None
- has_task = False
- r =
- [u'MRT task=-/218180 object=wiping-115(10.110.0.13) script=DLink.DxS.get_capabilities status=failed',
- u'code=28',
- u'error=Object is not managed']
- kwargs = {'code': 28, 'error': 'Object is not managed'}
- now = datetime.datetime(2015, 8, 4, 13, 6, 5, 603205)
- self = <noc.sa.sae.sae.SAE object at 0x800736090>
- ------------------------------------------------------------------------
- File: sa/sae/sae.py (Line: 602)
- Function: fail_task
- 595 @transaction.commit_on_success
- 596 def fail_task(mt, code, text):
- 597 MapTask.objects.filter(id=mt.id).update(
- 598 status="F",
- 599 script_result=dict(code=code, text=text)
- 600 )
- 601 self.log_mrt(logging.INFO, task=mt, status="failed",
- 602 ==> code=code, error=text)
- 603
- 604 @transaction.commit_on_success
- 605 def mark_as_running(mt):
- 606 MapTask.objects.filter(id=mt.id).update(status="R")
- 607
- 608 @transaction.commit_on_success
- Variables:
- text = 'Object is not managed'
- self = <noc.sa.sae.sae.SAE object at 0x800736090>
- code = 28
- mt = <MapTask: 218180: wiping-115 DLink.DxS.get_capabilities>
- ------------------------------------------------------------------------
- File: lib/python2.7/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 0x80d8486d0>
- args =
- (<MapTask: 218180: wiping-115 DLink.DxS.get_capabilities>,
- 28,
- 'Object is not managed')
- func = <function fail_task at 0x80bc9a9b0>
- kwargs = {}
- ------------------------------------------------------------------------
- File: sa/sae/sae.py (Line: 634)
- Function: process_mrtasks
- 627 throttled_shards = set() # shard_id
- 628 self.blocked_pools = set() # Reset block status
- 629 # Run tasks
- 630 fail_invalid_reduce()
- 631 for mt in get_pending_tasks():
- 632 # Check object is managed
- 633 if not mt.managed_object.is_managed:
- 634 ==> fail_task(mt, ERR_OBJECT_NOT_MANAGED, "Object is not managed")
- 635 continue
- 636 # Check for task timeouts
- 637 if mt.stop_time < t:
- 638 fail_task(mt, ERR_TIMEOUT, text="Timed out")
- 639 continue
- 640 # Check blocked pools
- Variables:
- map_callback = <function map_callback at 0x80bc9a758>
- fail_invalid_reduce = <function fail_invalid_reduce at 0x80bc9acf8>
- mark_as_running = <function mark_as_running at 0x80bc9ab18>
- exec_script = <function exec_script at 0x80bc9a668>
- self = <noc.sa.sae.sae.SAE object at 0x800736090>
- throttled_shards = set([])
- mt = <MapTask: 218180: wiping-115 DLink.DxS.get_capabilities>
- t = datetime.datetime(2015, 8, 4, 13, 6, 5, 390972)
- get_pending_tasks = <function get_pending_tasks at 0x80bc9a398>
- fail_task = <function fail_task at 0x80bc9a488>
- sae_mrt_rate = 0
- shard_mrt_rate = {}
- ------------------------------------------------------------------------
- File: sa/sae/sae.py (Line: 266)
- Function: tick
- 259 reset_queries() # Clear debug SQL log
- 260 if self.batched_events:
- 261 self.logger.info("Writing %d batched events", self.batched_events)
- 262 self.event_batch.execute({"w": 0})
- 263 self.prepare_event_bulk()
- 264 if t - self.last_mrtask_check >= self.mrt_schedule_interval:
- 265 # Check Map/Reduce task status
- 266 ==> self.process_mrtasks()
- 267 self.last_mrtask_check = t
- 268 if t - self.last_status_refresh >= self.activator_status_interval:
- 269 self.refresh_activator_status()
- 270
- 271 def write_event(self, data, timestamp=None, managed_object=None):
- 272 """
- Variables:
- self = <noc.sa.sae.sae.SAE object at 0x800736090>
- t = 1438682765.390802
- ------------------------------------------------------------------------
- File: lib/nbsocket/socketfactory.py (Line: 268)
- Function: run
- 261 last_tick = last_stale = time.time()
- 262 while cond() and not self.to_shutdown:
- 263 self.loop(1)
- 264 t = time.time()
- 265 if self.tick_callback and t - last_tick >= 1:
- 266 self.metrics.ticks += 1
- 267 try:
- 268 ==> self.tick_callback()
- 269 except Exception:
- 270 error_report()
- 271 logger.info("Restoring from tick() failure")
- 272 last_tick = t
- 273 if t - last_stale >= 1:
- 274 self.close_stale()
- Variables:
- self = <noc.lib.nbsocket.socketfactory.SocketFactory object at 0x80812e590>
- cond = <function <lambda> at 0x80bc87a28>
- t = 1438682765.39077
- last_stale = 1438682764.190519
- run_forever = True
- last_tick = 1438682764.190519
- ------------------------------------------------------------------------
- END OF TRACEBACK
- 2015-08-04 13:06:05,616 [noc.lib.nbsocket.socketfactory] Restoring from tick() failure
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement