Advertisement
openmsk

Discover

Jul 4th, 2017
562
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 264.94 KB | None | 0 0
  1. 2017-07-04 10:34:45.002280  [box] Starting at e7cab67f-f689-48f9-84a7-52ec2bffc0d1[10.0.4.111:19006] (Lag 167.01ms)
  2. 2017-07-04 10:34:45.008482 [discovery|box|DeviceName|profile]  Checking profile accordance
  3. 2017-07-04 10:34:45.008738 [discovery|box|DeviceName|profile]  Compiling "Profile Check rules"
  4. 2017-07-04 10:34:45.106206 [discovery|box|DeviceName|profile]  Use snmp_v2c_get for request
  5. 2017-07-04 10:34:45.110898 [discovery|box|DeviceName|profile]  Set path: None
  6. 2017-07-04 10:34:45.185049 [discovery|box|DeviceName|profile]  UNHANDLED EXCEPTION (2017-07-04 10:34:45.112488)
  7. BRANCH: feature/microservices TIP: 0db95855ccf8
  8. PROCESS: ./services/discovery/service.py
  9. ERROR FINGERPRINT: 63d23b53-e459-5cf6-a8b0-b3cf3621d591
  10. WORKING DIRECTORY: /opt/noc
  11. EXCEPTION: <type 'exceptions.TypeError'> unsupported type for timedelta seconds component: datetime.timedelta
  12. START OF TRACEBACK
  13. ------------------------------------------------------------------------
  14. File: core/dcs/base.py (Line: 225)
  15. Function: resolve
  16.   218         @tornado.gen.coroutine
  17.   219         def resolve(self, hint=None, wait=True, timeout=None, full_result=False):
  18.   220             metrics["dcs.resolver.requests"] += 1
  19.   221             if wait:
  20.   222                 # Wait until service catalog populated
  21.   223                 try:
  22.   224                     yield self.ready_event.wait(
  23.   225 ==>                     timeout=datetime.timedelta(seconds=timeout or self.dcs.DEFAULT_SERVICE_RESOLUTION_TIMEOUT)
  24.   226                     )
  25.   227                 except tornado.gen.TimeoutError:
  26.   228                     metrics["dcs.resolver.errors"] += 1
  27.   229                     raise ResolutionError()
  28.   230             if not wait and not self.ready_event.is_set():
  29.   231                 raise ResolutionError()
  30. Variables:
  31.                 self = <noc.core.dcs.consuldcs.ConsulResolver object at 0x7ff19ec1cad0>
  32.                 hint = None
  33.              timeout = None
  34.          full_result = False
  35.                 wait = True
  36. ------------------------------------------------------------------------
  37. File: lib/python2.7/site-packages/tornado/gen.py (Line: 307)
  38. Function: wrapper
  39.   300                     # Inline the first iteration of Runner.run.  This lets us
  40.   301                     # avoid the cost of creating a Runner when the coroutine
  41.   302                     # never actually yields, which in turn allows us to
  42.   303                     # use "optional" coroutines in critical path code without
  43.   304                     # performance penalty for the synchronous case.
  44.   305                     try:
  45.   306                         orig_stack_contexts = stack_context._state.contexts
  46.   307 ==>                     yielded = next(result)
  47.   308                         if stack_context._state.contexts is not orig_stack_contexts:
  48.   309                             yielded = TracebackFuture()
  49.   310                             yielded.set_exception(
  50.   311                                 stack_context.StackContextInconsistentError(
  51.   312                                     'stack_context inconsistency (probably caused '
  52.   313                                     'by yield within a "with StackContext" block)'))
  53. Variables:
  54.                 func = <function resolve at 0x7ff1b91302a8>
  55.                 args = (<noc.core.dcs.consuldcs.ConsulResolver object at 0x7ff19ec1cad0>,)
  56.              yielded = None
  57.     replace_callback = True
  58.               future = None
  59.               result = <generator object resolve at 0x7ff19f54dfa0>
  60.  orig_stack_contexts = ((), None)
  61.               kwargs = {'wait': True, 'full_result': False, 'timeout': None, 'hint': None}
  62. ------------------------------------------------------------------------
  63. File: lib/python2.7/site-packages/tornado/concurrent.py (Line: 238)
  64. Function: result
  65.   231             before the `Future` is done, so the ``timeout`` is never used.
  66.   232             """
  67.  233             self._clear_tb_log()
  68.  234             if self._result is not None:
  69.  235                 return self._result
  70.  236             if self._exc_info is not None:
  71.  237                 try:
  72.  238 ==>                 raise_exc_info(self._exc_info)
  73.  239                 finally:
  74.  240                     self = None
  75.  241             self._check_done()
  76.  242             return self._result
  77.  243    
  78.  244         def exception(self, timeout=None):
  79. Variables:
  80.                self = None
  81.             timeout = None
  82. ------------------------------------------------------------------------
  83. File: lib/python2.7/site-packages/tornado/gen.py (Line: 1055)
  84. Function: run
  85. 1048                         return
  86. 1049                     self.future = None
  87. 1050                     try:
  88. 1051                         orig_stack_contexts = stack_context._state.contexts
  89. 1052                         exc_info = None
  90. 1053    
  91. 1054                         try:
  92. 1055 ==>                         value = future.result()
  93. 1056                         except Exception:
  94. 1057                             self.had_exception = True
  95. 1058                             exc_info = sys.exc_info()
  96. 1059                         future = None
  97. 1060    
  98. 1061                         if exc_info is not None:
  99. Variables:
  100.                self = <tornado.gen.Runner object at 0x7ff1a35f23d0>
  101.               value = <noc.core.dcs.consuldcs.ConsulResolver object at 0x7ff19ec1cad0>
  102.             yielded = None
  103.              future = None
  104. orig_stack_contexts = ((), None)
  105.            exc_info = None
  106. ------------------------------------------------------------------------
  107. File: core/dcs/base.py (Line: 114)
  108. Function: resolve
  109.  107    
  110.  108         @tornado.gen.coroutine
  111.  109         def resolve(self, name, hint=None, wait=True, timeout=None,
  112.  110                     full_result=False):
  113.  111             resolver = yield self.get_resolver(name)
  114.  112             r = yield resolver.resolve(
  115.  113                 hint=hint, wait=wait, timeout=timeout,
  116.  114 ==>             full_result=full_result
  117.  115             )
  118.  116             raise tornado.gen.Return(r)
  119.  117    
  120.  118         @tornado.gen.coroutine
  121.  119         def expire_resolvers(self):
  122.  120             with self.resolvers_lock:
  123. Variables:
  124.                name = u'activator-default'
  125.                hint = None
  126.                self = <noc.core.dcs.consuldcs.ConsulDCS object at 0x7ff1ae99a150>
  127.            resolver = <noc.core.dcs.consuldcs.ConsulResolver object at 0x7ff19ec1cad0>
  128.         full_result = False
  129.             timeout = None
  130.                wait = True
  131. ------------------------------------------------------------------------
  132. File: lib/python2.7/site-packages/tornado/gen.py (Line: 1063)
  133. Function: run
  134. 1056                         except Exception:
  135. 1057                             self.had_exception = True
  136. 1058                             exc_info = sys.exc_info()
  137. 1059                         future = None
  138. 1060    
  139. 1061                         if exc_info is not None:
  140. 1062                             try:
  141. 1063 ==>                             yielded = self.gen.throw(*exc_info)
  142. 1064                             finally:
  143. 1065                                 # Break up a reference to itself
  144. 1066                                 # for faster GC on CPython.
  145. 1067                                 exc_info = None
  146. 1068                         else:
  147. 1069                             yielded = self.gen.send(value)
  148. Variables:
  149.                self = <tornado.gen.Runner object at 0x7ff1a35f23d0>
  150.               value = <noc.core.dcs.consuldcs.ConsulResolver object at 0x7ff19ec1cad0>
  151.             yielded = None
  152.              future = None
  153. orig_stack_contexts = ((), None)
  154.            exc_info = None
  155. ------------------------------------------------------------------------
  156. File: lib/python2.7/site-packages/tornado/concurrent.py (Line: 238)
  157. Function: result
  158.  231             before the `Future` is done, so the ``timeout`` is never used.
  159.  232             """
  160.   233             self._clear_tb_log()
  161.   234             if self._result is not None:
  162.   235                 return self._result
  163.   236             if self._exc_info is not None:
  164.   237                 try:
  165.   238 ==>                 raise_exc_info(self._exc_info)
  166.   239                 finally:
  167.   240                     self = None
  168.   241             self._check_done()
  169.   242             return self._result
  170.   243    
  171.   244         def exception(self, timeout=None):
  172. Variables:
  173.                 self = None
  174.              timeout = None
  175. ------------------------------------------------------------------------
  176. File: lib/python2.7/site-packages/tornado/gen.py (Line: 1055)
  177. Function: run
  178.  1048                         return
  179.  1049                     self.future = None
  180.  1050                     try:
  181.  1051                         orig_stack_contexts = stack_context._state.contexts
  182.  1052                         exc_info = None
  183.  1053    
  184.  1054                         try:
  185.  1055 ==>                         value = future.result()
  186.  1056                         except Exception:
  187.  1057                             self.had_exception = True
  188.  1058                             exc_info = sys.exc_info()
  189.  1059                         future = None
  190.  1060    
  191.  1061                         if exc_info is not None:
  192. Variables:
  193.             exc_info = None
  194.                 self = <tornado.gen.Runner object at 0x7ff1a360b7d0>
  195.               future = None
  196.  orig_stack_contexts = ((), None)
  197. ------------------------------------------------------------------------
  198. File: core/service/rpc.py (Line: 148)
  199. Function: _call
  200.   141             # Get services
  201.   142             response = None
  202.   143             for t in self._service.iter_rpc_retry_timeout():
  203.   144                 # Resolve service against service catalog
  204.   145                 if self._hints:
  205.   146                     svc = random.choice(self._hints)
  206.   147                 else:
  207.   148 ==>                 svc = yield self._service.dcs.resolve(self._service_name)
  208.   149                 response = yield make_call(
  209.   150                     "http://%s/api/%s/" % (svc, self._api),
  210.   151                     body
  211.   152                 )
  212.   153                 if response:
  213.   154                     break
  214. Variables:
  215.                 body =
  216. '{"params":["10.12.0.8","communityName","1.3.6.1.2.1.1.2.0"],"method":"snmp_v2c_get","id":0}'
  217.                 self = <noc.core.service.rpc.RPCProxy object at 0x7ff19f702bd0>
  218.                 args = (u'10.12.0.8', u'communityName', '1.3.6.1.2.1.1.2.0')
  219.                   t0 = 1499153685.109118
  220.             response = None
  221.                  tid = 0
  222.                    t = 0.1
  223.               kwargs = {}
  224.                  msg =
  225. {'id': 0,
  226.  'method': 'snmp_v2c_get',
  227.  'params': [u'10.12.0.8', u'communityName', '1.3.6.1.2.1.1.2.0']}
  228.               method = 'snmp_v2c_get'
  229.            make_call = <function make_call at 0x7ff19f293488>
  230.            is_notify = False
  231. ------------------------------------------------------------------------
  232. File: lib/python2.7/site-packages/tornado/gen.py (Line: 1063)
  233. Function: run
  234.  1056                         except Exception:
  235.  1057                             self.had_exception = True
  236.  1058                             exc_info = sys.exc_info()
  237.  1059                         future = None
  238.  1060    
  239.  1061                         if exc_info is not None:
  240.  1062                             try:
  241.  1063 ==>                             yielded = self.gen.throw(*exc_info)
  242.  1064                             finally:
  243.  1065                                 # Break up a reference to itself
  244.  1066                                 # for faster GC on CPython.
  245.  1067                                 exc_info = None
  246.  1068                         else:
  247.  1069                             yielded = self.gen.send(value)
  248. Variables:
  249.             exc_info = None
  250.                 self = <tornado.gen.Runner object at 0x7ff1a360b7d0>
  251.               future = None
  252.  orig_stack_contexts = ((), None)
  253. ------------------------------------------------------------------------
  254. File: lib/python2.7/site-packages/tornado/concurrent.py (Line: 238)
  255. Function: result
  256.   231             before the `Future` is done, so the ``timeout`` is never used.
  257.   232             """
  258.  233             self._clear_tb_log()
  259.  234             if self._result is not None:
  260.  235                 return self._result
  261.  236             if self._exc_info is not None:
  262.  237                 try:
  263.  238 ==>                 raise_exc_info(self._exc_info)
  264.  239                 finally:
  265.  240                     self = None
  266.  241             self._check_done()
  267.  242             return self._result
  268.  243    
  269.  244         def exception(self, timeout=None):
  270. Variables:
  271.                self = None
  272.             timeout = None
  273. ------------------------------------------------------------------------
  274. File: lib/python2.7/site-packages/tornado/gen.py (Line: 1055)
  275. Function: run
  276. 1048                         return
  277. 1049                     self.future = None
  278. 1050                     try:
  279. 1051                         orig_stack_contexts = stack_context._state.contexts
  280. 1052                         exc_info = None
  281. 1053    
  282. 1054                         try:
  283. 1055 ==>                         value = future.result()
  284. 1056                         except Exception:
  285. 1057                             self.had_exception = True
  286. 1058                             exc_info = sys.exc_info()
  287. 1059                         future = None
  288. 1060    
  289. 1061                         if exc_info is not None:
  290. Variables:
  291.            exc_info = None
  292.                self = <tornado.gen.Runner object at 0x7ff1a360bb50>
  293.              future = None
  294.                   e = StopIteration()
  295. orig_stack_contexts = ((), None)
  296. ------------------------------------------------------------------------
  297. File: core/service/rpc.py (Line: 63)
  298. Function: _call
  299.   56                 result = yield self._call(item, *args, **kwargs)
  300.   57                 raise tornado.gen.Return(result)
  301.   58    
  302.   59             def sync_wrapper(*args, **kwargs):
  303.   60                 @tornado.gen.coroutine
  304.   61                 def _call():
  305.   62                     try:
  306.   63 ==>                     r = yield self._call(item, *args, **kwargs)
  307.   64                         result.append(r)
  308.   65                     except tornado.gen.Return as e:
  309.   66                         result.append(e.value)
  310.   67                     except Exception:
  311.   68                         error.append(sys.exc_info())
  312.   69                     finally:
  313. Variables:
  314.                args = (u'10.12.0.8', u'communityName', '1.3.6.1.2.1.1.2.0')
  315.                self = <noc.core.service.rpc.RPCProxy object at 0x7ff19f702bd0>
  316.              kwargs = {}
  317.                item = 'snmp_v2c_get'
  318.              result = []
  319.               error =
  320. [(<type 'exceptions.TypeError'>,
  321.  TypeError('unsupported type for timedelta seconds component: datetime.timedelta',),
  322.  <traceback object at 0x7ff19f564320>)]
  323.                  ev = <threading._Event object at 0x7ff19f6ee250>
  324. ------------------------------------------------------------------------
  325. File: core/service/rpc.py (Line: 78)
  326. Function: sync_wrapper
  327.   71    
  328.   72                 ev = threading.Event()
  329.   73                 result = []
  330.   74                 error = []
  331.   75                 self._service.ioloop.add_callback(_call)
  332.   76                 ev.wait()
  333.   77                 if error:
  334.   78 ==>                 six.reraise(*error[0])
  335.   79                 else:
  336.   80                     return result[0]
  337.   81    
  338.   82             if item.startswith("_"):
  339.   83                 return self.__dict__[item]
  340.   84             elif self._sync:
  341. Variables:
  342.              kwargs = {}
  343.                self = <noc.core.service.rpc.RPCProxy object at 0x7ff19f702bd0>
  344.                args = (u'10.12.0.8', u'communityName', '1.3.6.1.2.1.1.2.0')
  345.                item = 'snmp_v2c_get'
  346.              result = []
  347.               error =
  348. [(<type 'exceptions.TypeError'>,
  349.  TypeError('unsupported type for timedelta seconds component: datetime.timedelta',),
  350.  <traceback object at 0x7ff19f564320>)]
  351.                  ev = <threading._Event object at 0x7ff19f6ee250>
  352.               _call = <function _call at 0x7ff19f2930c8>
  353. ------------------------------------------------------------------------
  354. File: services/discovery/jobs/box/profile.py (Line: 178)
  355. Function: check_snmp_v2c_get
  356.  171                 return open_sync_rpc(
  357.  172                     "activator",
  358.  173                     pool=self.object.pool.name,
  359.  174                     calling_service="discovery"
  360.  175                 ).__getattr__(self.snmp_version_def)(
  361.  176                     self.object.address,
  362.  177                     snmp_ro,
  363.  178 ==>                 param
  364.  179                 )
  365.  180             except RPCError as e:
  366.  181                 self.logger.error("RPC Error: %s", e)
  367.  182                 return None
  368.  183    
  369.  184         def check_http_get(self, param):
  370. Variables:
  371.                self =
  372. <noc.services.discovery.jobs.box.profile.ProfileCheck object at 0x7ff1a256fc10>
  373.             snmp_ro = u'communityName'
  374.               param = '1.3.6.1.2.1.1.2.0'
  375.                caps =
  376. {u'Cisco | IOS | Syntax | IP SLA': 0,
  377. u'DB | Interfaces': 28,
  378. u'Network | CDP': True,
  379. u'Network | IPv6': True,
  380. u'Network | LACP': True,
  381. u'Network | LLDP': True,
  382. u'Network | STP': True,
  383. u'SNMP': True,
  384. u'SNMP | Bulk': True,
  385. u'SNMP | IF-MIB': True,
  386. u'SNMP | IF-MIB | HC': True,
  387. u'SNMP | v1': True,
  388. u'SNMP | v2c': True,
  389. u'SNMP | v3': False}
  390. ------------------------------------------------------------------------
  391. File: services/discovery/jobs/box/profile.py (Line: 138)
  392. Function: do_check
  393.  131                 self.logger.debug("Using cached value")
  394.  132                 return self.result_cache[method, param]
  395.  133             h = getattr(self, "check_%s" % method, None)
  396.  134             if not h:
  397.  135                 self.logger.error("Invalid check method '%s'. Ignoring",
  398.  136                                   method)
  399.  137                 return None
  400.  138 ==>         result = h(param)
  401.  139             self.result_cache[method, param] = result
  402.  140             return result
  403.  141    
  404.  142         def check_snmp_v2c_get(self, param):
  405.  143             """
  406.   144             Perform SNMP v2c GET. Param is OID or symbolic name
  407. Variables:
  408.                    h =
  409. <bound method ProfileCheck.check_snmp_v2c_get of <noc.services.discovery.jobs.box.profile.ProfileCheck object at 0x7ff1a256fc10>>
  410.                 self =
  411. <noc.services.discovery.jobs.box.profile.ProfileCheck object at 0x7ff1a256fc10>
  412.               method = u'snmp_v2c_get'
  413.                param = u'SNMPv2-MIB::sysObjectID.0'
  414. ------------------------------------------------------------------------
  415. File: services/discovery/jobs/box/profile.py (Line: 61)
  416. Function: get_profile
  417.    54             snmp_result = ""
  418.    55             http_result = ""
  419.    56             message = "Cannot detect profile"
  420.    57             fatal = False
  421.    58             for ruleset in self.get_rules():
  422.    59                 for (method, param), actions in ruleset:
  423.    60                     try:
  424.    61 ==>                     result = self.do_check(method, param)
  425.    62                         if not result:
  426.    63                             continue
  427.    64                         if "snmp" in method:
  428.    65                             snmp_result = result
  429.    66                         if "http" in method:
  430.    67                             http_result = result
  431. Variables:
  432.                 self =
  433. <noc.services.discovery.jobs.box.profile.ProfileCheck object at 0x7ff1a256fc10>
  434.                param = u'SNMPv2-MIB::sysObjectID.0'
  435.          http_result = ''
  436.              ruleset =
  437. [((u'snmp_v2c_get', u'SNMPv2-MIB::sysObjectID.0'),
  438.   [(u'eq',
  439.     u'1.3.6.1.4.1.890.1.5.11.13',
  440.     u'match',
  441.     u'Zyxel.MSAN',
  442.     u'Zyxel | MSAN | IES1248-51 sysObjectID'),
  443.    (u'eq',
  444.     u'1.3.6.1.4.1.2011.10.1.232',
  445.     u'match',
  446.     u'Huawei.VRP',
  447.     u'Huawei | VRP | S5628F-HI sysObjectID'),
  448.    (u'eq',
  449.     u'1.3.6.1.4.1.890.1.5.8.30',
  450.     u'match',
  451.     u'Zyxel.ZyNOS',
  452.     u'Zyxel | ZyNOS | ES-2226 sysObjectID'),
  453.    (u'contains',
  454.     u'1.3.6.1.4.1.171.10.76.12',
  455.     u'match',
  456.     u'DLink.DxS_Smart',
  457.     u'DLink | DxS_Smart | DGS-1210-10P sysObjectID'),
  458.    (u'contains',
  459.     u'1.3.6.1.4.1.171.10.76.15',
  460.     u'match',
  461.     u'DLink.DxS_Smart',
  462.     u'DLink | DxS_Smart | DGS-1210-28 sysObjectID'),
  463.    (u'eq',
  464.     u'1.3.6.1.4.1.25506.1.33',
  465.     u'match',
  466.     u'H3C.VRP',
  467.     u'H3C | VRP | S3600-52P-SI sysObjectID'),
  468.    (u'eq',
  469.     u'1.3.6.1.4.1.6486.800.1.1.2.1.7.1.10',
  470.     u'match',
  471.     u'Alcatel.AOS',
  472.     u'Alcatel | AOS | OS6850-U24X'),
  473.    (u'eq',
  474.     u'1.3.6.1.4.1.2011.2.123',
  475.     u'match',
  476.     u'Huawei.MA5600T',
  477.     u'Huawei | MA | MA5603T sysObjectID'),
  478.    (u'eq',
  479.     u'1.3.6.1.4.1.1795.1.14.9.14.5.3',
  480.     u'match',
  481.     u'Zhone.Bitstorm',
  482.     u'Zhone | Bitstorm | 8820-A2-xxx sysObjectID'),
  483.    (u'eq',
  484.     u'1.3.6.1.4.1.43.1.8.42',
  485.     u'match',
  486.     u'3Com.SuperStack3',
  487.     u'3Com | SuperStack3 | 3250 sysObjectID'),
  488.    (u'eq',
  489.     u'1.3.6.1.4.1.3955.6.9.224.1',
  490.     u'match',
  491.     u'Linksys.SPS2xx',
  492.     u'Lynksis | SPS2xx | SPS224G4 sysObjectID'),
  493.    (u'contains',
  494.     u'1.3.6.1.4.1.171.10.75.13',
  495.     u'match',
  496.     u'DLink.DxS_Smart',
  497.     u'DLink | DxS_Smart | DES-1210-08P sysObjectID'),
  498.    (u'eq',
  499.     u'1.3.6.1.4.1.2011.10.1.43',
  500.     u'match',
  501.     u'Huawei.VRP',
  502.     u'Huawei | VRP | S5624P sysObjectID'),
  503.    (u'eq',
  504.     u'1.3.6.1.4.1.34300.1.6',
  505.     u'match',
  506.     u'Eltex.DSLAM',
  507.     u'Eltex | DSLAM | MXA24 sysObjectID'),
  508.    (u'eq',
  509.     u'1.3.6.1.4.1.259.10.1.22.101',
  510.     u'match',
  511.     u'EdgeCore.ES',
  512.     u'EdgeCore | ES | ES3528MV2 sysObjectID'),
  513.    (u'contains',
  514.     u'1.3.6.1.4.1.2011.2.80.1',
  515.     u'match',
  516.     u'Huawei.VRP3',
  517.     u'Huawei | MA | MA5605 sysObjectID'),
  518.    (u'eq',
  519.     u'1.3.6.1.4.1.890.1.5.5.2',
  520.     u'match',
  521.     u'Zyxel.MSAN',
  522.     u'Zyxel | MSAN | IES-1000 sysObjectID'),
  523.    (u'contains',
  524.     u'1.3.6.1.4.1.171.10.76.14',
  525.     u'match',
  526.     u'DLink.DxS_Smart',
  527.     u'DLink | DxS_Smart | DGS-1210-20 sysObjectID'),
  528.    (u'eq',
  529.     u'1.3.6.1.4.1.835457.3.4',
  530.     u'match',
  531.     u'Alcatel.TIMOS',
  532.     u'Alcatel | TIMOS | 7750 SR-7'),
  533.    (u'eq',
  534.     u'1.3.6.1.4.1.43.1.8.41',
  535.     u'match',
  536.     u'3Com.SuperStack3',
  537.     u'3Com | SuperStack3 | 3226 sysObjectID'),
  538.    (u'eq',
  539.     u'1.3.6.1.4.1.2011.2.23.96',
  540.     u'match',
  541.     u'Huawei.VRP',
  542.     u'Huawei | VRP | S5328C-EI-24S sysObjectID'),
  543.    (u'eq',
  544.     u'1.3.6.1.4.1.31926',
  545.     u'match',
  546.     u'Siklu.EH',
  547.     u'Siklu | EH | EH-1200L.v700 sysObjectID'),
  548.    (u'eq',
  549.     u'1.3.6.1.4.1.2011.2.78',
  550.     u'match',
  551.     u'Huawei.MA5600T',
  552.     u'Huawei | HONET | UA5000 sysObjectID'),
  553.    (u'eq',
  554.     u'1.3.6.1.4.1.6486.800.1.1.2.1.7.1.48',
  555.     u'match',
  556.     u'Alcatel.AOS',
  557.     u'Alcatel | AOS | OS6850E-U24X'),
  558.    (u'eq',
  559.     u'1.3.6.1.4.1.2011.2.6.6.1',
  560.     u'match',
  561.     u'Huawei.MA5300',
  562.     u'Huawei | MA | MA5300 sysObjectID'),
  563.    (u'eq',
  564.     u'1.3.6.1.4.1.35265.1.28',
  565.     u'match',
  566.     u'Eltex.DSLAM',
  567.     u'Eltex | DSLAM | MXA32 sysObjectID'),
  568.    (u'eq',
  569.     u'1.3.6.1.4.1.3320.1.263.0',
  570.     u'match',
  571.     u'BDCOM.xPON',
  572.     u'BDCOM | xPON | P3608 sysObjectID'),
  573.    (u'eq',
  574.     u'1.3.6.1.4.1.6527.1.15.1',
  575.     u'match',
  576.     u'Alcatel.TIMOS',
  577.     u'Alcatel | TIMOS | 7950 XRS'),
  578.    (u'eq',
  579.     u'1.3.6.1.4.1.14988.1',
  580.     u'match',
  581.     u'MikroTik.RouterOS',
  582.     u'MikroTik | RouterOS | sysObjectID'),
  583.    (u'eq',
  584.     u'1.3.6.1.4.1.231.7.1.2.2.1.101.1.1',
  585.     u'match',
  586.     u'NSN.hiX56xx',
  587.     u'NAG | NSN | hiX5622G2002GE sysObjectID.0'),
  588.    (u'eq',
  589.     u'1.3.6.1.4.1.890.1.5.8.26',
  590.     u'match',
  591.     u'Zyxel.ZyNOS',
  592.     u'Zyxel | ZyNOS | ES-3124-4F sysObjectID'),
  593.    (u'contains',
  594.     u'1.3.6.1.4.1.171.10.75.5',
  595.     u'match',
  596.     u'DLink.DxS_Smart',
  597.     u'DLink | DxS_Smart | DES-1210-28 sysObjectID'),
  598.    (u'eq',
  599.     u'1.3.6.1.4.1.4874.1.1.1.6.1',
  600.     u'match',
  601.     u'Juniper.JUNOSe',
  602.     u'Juniper | JUNOSe | E320 sysObjectID'),
  603.    (u'eq',
  604.     u'1.3.6.1.4.1.193.81.1.1.3',
  605.     u'match',
  606.     u'Ericsson.SEOS',
  607.     u'Ericsson | MINI-LINK | CN510 sysObjectID'),
  608.    (u'eq',
  609.     u'1.3.6.1.4.1.259.10.1.27.102',
  610.     u'match',
  611.     u'EdgeCore.ES',
  612.     u'EdgeCore | ES | ECS3510-52T sysObjectID'),
  613.    (u'eq',
  614.     u'1.3.6.1.4.1.40418.7.2',
  615.     u'match',
  616.     u'NAG.SNR',
  617.     u'NAG | SNR | SNR-S2940 sysObjectID.0'),
  618.    (u'eq',
  619.     u'1.3.6.1.4.1.25506.1.34',
  620.     u'match',
  621.     u'H3C.VRP',
  622.     u'H3C | VRP | S3600-28TP-SI sysObjectID'),
  623.    (u'contains',
  624.     u'1.3.6.1.4.1.171.10.75.19.1',
  625.     u'match',
  626.     u'DLink.DxS_Smart',
  627.     u'DLink | DxS_Smart | DES-1210-28P V4 sysObjectID'),
  628.    (u'eq',
  629.     u'1.3.6.1.4.1.2011.2.6.5.21',
  630.     u'match',
  631.     u'Huawei.VRP3',
  632.     u'Huawei | MA | MA5105 sysObjectID'),
  633.    (u'eq',
  634.     u'1.3.6.1.4.1.40248.1',
  635.     u'match',
  636.     u'Vitesse.VSC',
  637.     u'Vitesse | VSC | VSC7460 sysObjectID'),
  638.    (u'eq',
  639.     u'1.3.6.1.4.1.890.1.5.11.9',
  640.     u'match',
  641.     u'Zyxel.MSAN',
  642.     u'Zyxel | ZyNOS | IES1248-71 sysObjectID'),
  643.    (u'eq',
  644.     u'1.3.6.1.4.1.2011.10.1.12',
  645.     u'match',
  646.     u'Huawei.VRP',
  647.     u'Huawei | VRP | S3928TP-SI sysObjectID'),
  648.    (u'eq',
  649.     u'1.3.6.1.4.1.4249.1.114.1',
  650.     u'match',
  651.     u'Nateks.FlexGain',
  652.     u'Nateks | FlexGain | FG-ACE120 sysObjectID'),
  653.    (u'contains',
  654.     u'1.3.6.1.4.1.171.10.75.6',
  655.     u'match',
  656.     u'DLink.DxS_Smart',
  657.     u'DLink | DxS_Smart | DES-1210-28P sysObjectID'),
  658.    (u'contains',
  659.     u'1.3.6.1.4.1.171.10.75.7',
  660.     u'match',
  661.     u'DLink.DxS_Smart',
  662.     u'DLink | DxS_Smart | DES-1210-52 sysObjectID'),
  663.    (u'eq',
  664.     u'1.3.6.1.4.1.890.1.5.13.8',
  665.     u'match',
  666.     u'Zyxel.MSAN',
  667.     u'Zyxel | ZyNOS | IES-6000 sysObjectID'),
  668.    (u'eq',
  669.     u'1.3.6.1.4.1.27514.1.1.1.48',
  670.     u'match',
  671.     u'Qtech.QSW2800',
  672.     u'Qtech | QSW | QSW-2800-10T-AC sysObjectID'),
  673.    (u'eq',
  674.     u'1.3.6.1.4.1.38838.1.10',
  675.     u'match',
  676.     u'Angtel.Topaz',
  677.     u'Angtel | Topaz | Topaz-2O-16E'),
  678.    (u'eq',
  679.     u'.1.3.6.1.4.1.30982.1.1',
  680.     u'match',
  681.     u'TFortis.PSW',
  682.     u'TFortis | PSW | PSW-2G6F+'),
  683.    (u'eq',
  684.     u'1.3.6.1.4.1.27514.1.1.1.203',
  685.     u'match',
  686.     u'Qtech.QSW',
  687.     u'Qtech | QSW | QSW-3400-28T-AC sysObjectID 2'),
  688.    (u'eq',
  689.     u'1.3.6.1.4.1.890.1.5.8.16',
  690.     u'match',
  691.     u'Zyxel.ZyNOS',
  692.     u'Zyxel | ZyNOS | ES-2024A sysObjectID'),
  693.    (u'eq',
  694.     u'1.3.6.1.4.1.35265.1.22',
  695.     u'match',
  696.     u'Eltex.LTP',
  697.     u'Eltex | LTP | LTP sysObjectID'),
  698.    (u'contains',
  699.     u'1.3.6.1.4.1.171.10.76.10',
  700.     u'match',
  701.     u'DLink.DxS_Smart',
  702.     u'DLink | DxS_Smart | DGS-1210-24 sysObjectID'),
  703.    (u'eq',
  704.     u'1.3.6.1.4.1.3320.1.228.0',
  705.     u'match',
  706.     u'BDCOM.xPON',
  707.     u'BDCOM | xPON | P3310B sysObjectID'),
  708.    (u'contains',
  709.     u'1.3.6.1.4.1.171.10.76.16',
  710.     u'match',
  711.     u'DLink.DxS_Smart',
  712.     u'DLink | DxS_Smart | DGS-1210-28P sysObjectID'),
  713.    (u'eq',
  714.     u'1.3.6.1.4.1.1795.1.14.17.1.3',
  715.     u'match',
  716.     u'Zhone.Bitstorm',
  717.     u'Zhone | Bitstorm | 4229-A1-520 sysObjectID'),
  718.    (u'eq',
  719.     u'1.3.6.1.4.1.637.61.1',
  720.     u'match',
  721.     u'Alcatel.7302',
  722.     u'Alcatel | 7302 | 7302 sysObjectID.0'),
  723.    (u'eq',
  724.     u'1.3.6.1.4.1.27514.1.1.1.49',
  725.     u'match',
  726.     u'Qtech.QSW2800',
  727.     u'Qtech | QSW | QSW-2800-28T sysObjectID'),
  728.    (u'eq',
  729.     u'1.3.6.1.4.1.27514.1.1.1.221',
  730.     u'match',
  731.     u'Qtech.QSW',
  732.     u'Qtech | QSW | QSW-3400-28T-AC sysObjectID'),
  733.    (u'eq',
  734.     u'1.3.6.1.4.1.21696',
  735.     u'match',
  736.     u'Generic.Host',
  737.     u'KeyMile | MileGate | 2510 sysObjectID'),
  738.    (u'contains',
  739.     u'1.3.6.1.4.1.171.10.94.5',
  740.     u'match',
  741.     u'DLink.DGS3100',
  742.     u'DLink | DGS3100 | DGS-3100-24TG sysObjectID'),
  743.    (u'eq',
  744.     u'1.3.6.1.4.1.3320.1.294.0',
  745.     u'match',
  746.     u'BDCOM.xPON',
  747.     u'BDCOM | xPON | P3310C sysObjectID'),
  748.    (u'eq',
  749.     u'1.3.6.1.4.1.3955.7.2.2000.1',
  750.     u'match',
  751.     u'Alstec.ALS',
  752.     u'Alstec | ALS | ALS-62000'),
  753.    (u'contains',
  754.     u'1.3.6.1.4.1.171.10.76.11',
  755.     u'match',
  756.     u'DLink.DxS_Smart',
  757.     u'DLink | DxS_Smart | DGS-1210-48 sysObjectID'),
  758.    (u'eq',
  759.     u'.1.3.6.1.4.1.1332.1.1.1',
  760.     u'match',
  761.     u'Iskratel.VOIP',
  762.     u'Iskratel | VOIP | ISKRATEL VOIP-1 sysObjectID'),
  763.    (u'contains',
  764.     u'1.3.6.1.4.1.171.10.76.9',
  765.     u'match',
  766.     u'DLink.DxS_Smart',
  767.     u'DLink | DxS_Smart | DGS-1210-16 sysObjectID'),
  768.    (u'eq',
  769.     u'1.3.6.1.4.1.4874.1.1.1.6.2',
  770.     u'match',
  771.     u'Juniper.JUNOSe',
  772.     u'Juniper | JUNOSe | E120 sysObjectID'),
  773.    (u'eq',
  774.     u'1.3.6.1.4.1.25506.1.37',
  775.     u'match',
  776.     u'H3C.VRP',
  777.     u'H3C | VRP | S3600-28P-EI sysObjectID'),
  778.    (u'eq',
  779.     u'1.3.6.1.4.1.8886.6.140',
  780.     u'match',
  781.     u'Raisecom.ROS',
  782.     u'Raisecom | ROS | ISCOM2128EA-MA-AC sysObjectID'),
  783.    (u'eq',
  784.     u'1.3.6.1.4.1.890.1.5.8.12',
  785.     u'match',
  786.     u'Zyxel.ZyNOS',
  787.     u'Zyxel | ZyNOS | ES-3124 sysObjectID'),
  788.    (u'eq',
  789.     u'1.3.6.1.4.1.890.1.5.11.11',
  790.     u'match',
  791.     u'Zyxel.MSAN',
  792.     u'Zyxel | ZyNOS | IES-612 sysObjectID'),
  793.    (u'eq',
  794.     u'1.3.6.1.4.1.27514.1.1.2.59',
  795.     u'match',
  796.     u'Qtech.QSW2800',
  797.     u'Qtech | QSW | QSW-8200-28F-AC-DC sysObjectID'),
  798.    (u'eq',
  799.     u'1.3.6.1.4.1.2011.2.248',
  800.     u'match',
  801.     u'Huawei.MA5600T',
  802.     u'Huawei | MA | MA5608T sysObjectID'),
  803.    (u'eq',
  804.     u'1.3.6.1.4.1.890.1.5.13.7',
  805.     u'match',
  806.     u'Zyxel.MSAN',
  807.     u'Zyxel | ZyNOS | IES-5005 sysObjectID'),
  808.    (u'eq',
  809.     u'1.3.6.1.4.1.27514.1.3.26.7',
  810.     u'match',
  811.     u'Qtech.QSW',
  812.     u'Qtech | QSW | QSW-2910-28F sysObjectID'),
  813.    (u'contains',
  814.     u'.1.3.6.1.4.1.1332.1.24.3',
  815.     u'match',
  816.     u'Iskratel.ESCOM',
  817.     u'Iskratel | ESCOM | SI3000 sysObjectID'),
  818.    (u'eq',
  819.     u'1.3.6.1.4.1.30803',
  820.     u'match',
  821.     u'Vyatta.Vyatta',
  822.     u'Vyatta | Vyatta | sysObjectID'),
  823.    (u'eq',
  824.     u'1.3.6.1.4.1.2011.2.23.92',
  825.     u'match',
  826.     u'Huawei.VRP',
  827.     u'Huawei | VRP | S2326TP-EI sysObjectID'),
  828.    (u'eq',
  829.     u'1.3.6.1.4.1.27514.1.1.1.228',
  830.     u'match',
  831.     u'Qtech.QSW2800',
  832.     u'Qtech | QSW | QSW-3450-28T-AC sysObjectID'),
  833.    (u'eq',
  834.     u'1.3.6.1.4.1.35265.1.21.202.1',
  835.     u'match',
  836.     u'Eltex.LTE',
  837.     u'Eltex | LTE | LTE sysObjectID'),
  838.    (u'eq',
  839.     u'1.3.6.1.4.1.890.1.5.11.6',
  840.     u'match',
  841.     u'Zyxel.MSAN',
  842.     u'Zyxel | ZyNOS | IES-1000 AAM1008-61 sysObjectID'),
  843.    (u'eq',
  844.     u'1.3.6.1.4.1.2011.10.1.200',
  845.     u'match',
  846.     u'Huawei.VRP',
  847.     u'Huawei | VRP | S2403TP-EA sysObjectID'),
  848.    (u'eq',
  849.     u'1.3.6.1.4.1.27514.1.1.1.281',
  850.     u'match',
  851.     u'Qtech.QSW',
  852.     u'Qtech | QSW | QSW-3470-28T-AC sysObjectID'),
  853.    (u'eq',
  854.     u'1.3.6.1.4.1.259.6.10.94',
  855.     u'match',
  856.     u'EdgeCore.ES',
  857.     u'EdgeCore | ES | ES3528M sysObjectID'),
  858.    (u'eq',
  859.     u'1.3.6.1.4.1.835457.6.3',
  860.     u'match',
  861.     u'Alcatel.TIMOS',
  862.     u'Alcatel | TIMOS | 7450 ESS-7'),
  863.    (u'eq',
  864.     u'1.3.6.1.4.1.4413',
  865.     u'match',
  866.     u'Alstec.24xx',
  867.     u'Alstec | ALS24300 sysObjectID'),
  868.    (u'eq',
  869.     u'1.3.6.1.4.1.2011.2.169',
  870.     u'match',
  871.     u'Huawei.MA5600T',
  872.     u'Huawei | MA | MA5616 sysObjectID'),
  873.    (u'contains',
  874.     u'1.3.6.1.4.1.171.10.76.17',
  875.     u'match',
  876.     u'DLink.DxS_Smart',
  877.     u'DLink | DxS_Smart | DGS-1210-52 sysObjectID'),
  878.    (u'eq',
  879.     u'1.3.6.1.4.1.27514.1.1.1.51',
  880.     u'match',
  881.     u'Qtech.QSW2800',
  882.     u'Qtech | QSW | QSW-2800-10T-DC sysObjectID'),
  883.    (u'eq',
  884.     u'1.3.6.1.4.1.3955.6.1.2016.1',
  885.     u'match',
  886.     u'Linksys.SRW',
  887.     u'Linksys | SRW | SRW2016 sysObjectID'),
  888.    (u'eq',
  889.     u'1.3.6.1.4.1.11.2.3.7.11.63',
  890.     u'match',
  891.     u'HP.ProCurve',
  892.     u'HP | ProCurve | 2810-24G sysObjectID')]),
  893.  ((u'snmp_v2c_get', u'SNMPv2-MIB::sysDescr.0'),
  894.   [(u'contains',
  895.     u'ALS24100LVT',
  896.     u'match',
  897.     u'Alstec.24xx',
  898.     u'Alstec | ALS24100 sysDescr.0')])]
  899.          snmp_result = ''
  900.              message = 'Cannot detect profile'
  901.                fatal = False
  902.               method = u'snmp_v2c_get'
  903.              actions =
  904. [(u'eq',
  905.   u'1.3.6.1.4.1.890.1.5.11.13',
  906.   u'match',
  907.   u'Zyxel.MSAN',
  908.   u'Zyxel | MSAN | IES1248-51 sysObjectID'),
  909.  (u'eq',
  910.   u'1.3.6.1.4.1.2011.10.1.232',
  911.   u'match',
  912.   u'Huawei.VRP',
  913.   u'Huawei | VRP | S5628F-HI sysObjectID'),
  914.  (u'eq',
  915.   u'1.3.6.1.4.1.890.1.5.8.30',
  916.   u'match',
  917.   u'Zyxel.ZyNOS',
  918.   u'Zyxel | ZyNOS | ES-2226 sysObjectID'),
  919.  (u'contains',
  920.   u'1.3.6.1.4.1.171.10.76.12',
  921.   u'match',
  922.   u'DLink.DxS_Smart',
  923.   u'DLink | DxS_Smart | DGS-1210-10P sysObjectID'),
  924.  (u'contains',
  925.   u'1.3.6.1.4.1.171.10.76.15',
  926.   u'match',
  927.   u'DLink.DxS_Smart',
  928.   u'DLink | DxS_Smart | DGS-1210-28 sysObjectID'),
  929.  (u'eq',
  930.   u'1.3.6.1.4.1.25506.1.33',
  931.   u'match',
  932.   u'H3C.VRP',
  933.   u'H3C | VRP | S3600-52P-SI sysObjectID'),
  934.  (u'eq',
  935.   u'1.3.6.1.4.1.6486.800.1.1.2.1.7.1.10',
  936.   u'match',
  937.   u'Alcatel.AOS',
  938.   u'Alcatel | AOS | OS6850-U24X'),
  939.  (u'eq',
  940.   u'1.3.6.1.4.1.2011.2.123',
  941.   u'match',
  942.   u'Huawei.MA5600T',
  943.   u'Huawei | MA | MA5603T sysObjectID'),
  944.  (u'eq',
  945.   u'1.3.6.1.4.1.1795.1.14.9.14.5.3',
  946.   u'match',
  947.   u'Zhone.Bitstorm',
  948.   u'Zhone | Bitstorm | 8820-A2-xxx sysObjectID'),
  949.  (u'eq',
  950.   u'1.3.6.1.4.1.43.1.8.42',
  951.   u'match',
  952.   u'3Com.SuperStack3',
  953.   u'3Com | SuperStack3 | 3250 sysObjectID'),
  954.  (u'eq',
  955.   u'1.3.6.1.4.1.3955.6.9.224.1',
  956.   u'match',
  957.   u'Linksys.SPS2xx',
  958.   u'Lynksis | SPS2xx | SPS224G4 sysObjectID'),
  959.  (u'contains',
  960.   u'1.3.6.1.4.1.171.10.75.13',
  961.   u'match',
  962.   u'DLink.DxS_Smart',
  963.   u'DLink | DxS_Smart | DES-1210-08P sysObjectID'),
  964.  (u'eq',
  965.   u'1.3.6.1.4.1.2011.10.1.43',
  966.   u'match',
  967.   u'Huawei.VRP',
  968.   u'Huawei | VRP | S5624P sysObjectID'),
  969.  (u'eq',
  970.   u'1.3.6.1.4.1.34300.1.6',
  971.   u'match',
  972.   u'Eltex.DSLAM',
  973.   u'Eltex | DSLAM | MXA24 sysObjectID'),
  974.  (u'eq',
  975.   u'1.3.6.1.4.1.259.10.1.22.101',
  976.   u'match',
  977.   u'EdgeCore.ES',
  978.   u'EdgeCore | ES | ES3528MV2 sysObjectID'),
  979.  (u'contains',
  980.   u'1.3.6.1.4.1.2011.2.80.1',
  981.   u'match',
  982.   u'Huawei.VRP3',
  983.   u'Huawei | MA | MA5605 sysObjectID'),
  984.  (u'eq',
  985.   u'1.3.6.1.4.1.890.1.5.5.2',
  986.   u'match',
  987.   u'Zyxel.MSAN',
  988.   u'Zyxel | MSAN | IES-1000 sysObjectID'),
  989.  (u'contains',
  990.   u'1.3.6.1.4.1.171.10.76.14',
  991.   u'match',
  992.   u'DLink.DxS_Smart',
  993.   u'DLink | DxS_Smart | DGS-1210-20 sysObjectID'),
  994.  (u'eq',
  995.   u'1.3.6.1.4.1.835457.3.4',
  996.   u'match',
  997.   u'Alcatel.TIMOS',
  998.   u'Alcatel | TIMOS | 7750 SR-7'),
  999.  (u'eq',
  1000.   u'1.3.6.1.4.1.43.1.8.41',
  1001.   u'match',
  1002.   u'3Com.SuperStack3',
  1003.   u'3Com | SuperStack3 | 3226 sysObjectID'),
  1004.  (u'eq',
  1005.   u'1.3.6.1.4.1.2011.2.23.96',
  1006.   u'match',
  1007.   u'Huawei.VRP',
  1008.   u'Huawei | VRP | S5328C-EI-24S sysObjectID'),
  1009.  (u'eq',
  1010.   u'1.3.6.1.4.1.31926',
  1011.   u'match',
  1012.   u'Siklu.EH',
  1013.   u'Siklu | EH | EH-1200L.v700 sysObjectID'),
  1014.  (u'eq',
  1015.   u'1.3.6.1.4.1.2011.2.78',
  1016.   u'match',
  1017.   u'Huawei.MA5600T',
  1018.   u'Huawei | HONET | UA5000 sysObjectID'),
  1019.  (u'eq',
  1020.   u'1.3.6.1.4.1.6486.800.1.1.2.1.7.1.48',
  1021.   u'match',
  1022.   u'Alcatel.AOS',
  1023.   u'Alcatel | AOS | OS6850E-U24X'),
  1024.  (u'eq',
  1025.   u'1.3.6.1.4.1.2011.2.6.6.1',
  1026.   u'match',
  1027.   u'Huawei.MA5300',
  1028.   u'Huawei | MA | MA5300 sysObjectID'),
  1029.  (u'eq',
  1030.   u'1.3.6.1.4.1.35265.1.28',
  1031.   u'match',
  1032.   u'Eltex.DSLAM',
  1033.   u'Eltex | DSLAM | MXA32 sysObjectID'),
  1034.  (u'eq',
  1035.   u'1.3.6.1.4.1.3320.1.263.0',
  1036.   u'match',
  1037.   u'BDCOM.xPON',
  1038.   u'BDCOM | xPON | P3608 sysObjectID'),
  1039.  (u'eq',
  1040.   u'1.3.6.1.4.1.6527.1.15.1',
  1041.   u'match',
  1042.   u'Alcatel.TIMOS',
  1043.   u'Alcatel | TIMOS | 7950 XRS'),
  1044.  (u'eq',
  1045.   u'1.3.6.1.4.1.14988.1',
  1046.   u'match',
  1047.   u'MikroTik.RouterOS',
  1048.   u'MikroTik | RouterOS | sysObjectID'),
  1049.  (u'eq',
  1050.   u'1.3.6.1.4.1.231.7.1.2.2.1.101.1.1',
  1051.   u'match',
  1052.   u'NSN.hiX56xx',
  1053.   u'NAG | NSN | hiX5622G2002GE sysObjectID.0'),
  1054.  (u'eq',
  1055.   u'1.3.6.1.4.1.890.1.5.8.26',
  1056.   u'match',
  1057.   u'Zyxel.ZyNOS',
  1058.   u'Zyxel | ZyNOS | ES-3124-4F sysObjectID'),
  1059.  (u'contains',
  1060.   u'1.3.6.1.4.1.171.10.75.5',
  1061.   u'match',
  1062.   u'DLink.DxS_Smart',
  1063.   u'DLink | DxS_Smart | DES-1210-28 sysObjectID'),
  1064.  (u'eq',
  1065.   u'1.3.6.1.4.1.4874.1.1.1.6.1',
  1066.   u'match',
  1067.   u'Juniper.JUNOSe',
  1068.   u'Juniper | JUNOSe | E320 sysObjectID'),
  1069.  (u'eq',
  1070.   u'1.3.6.1.4.1.193.81.1.1.3',
  1071.   u'match',
  1072.   u'Ericsson.SEOS',
  1073.   u'Ericsson | MINI-LINK | CN510 sysObjectID'),
  1074.  (u'eq',
  1075.   u'1.3.6.1.4.1.259.10.1.27.102',
  1076.   u'match',
  1077.   u'EdgeCore.ES',
  1078.   u'EdgeCore | ES | ECS3510-52T sysObjectID'),
  1079.  (u'eq',
  1080.   u'1.3.6.1.4.1.40418.7.2',
  1081.   u'match',
  1082.   u'NAG.SNR',
  1083.   u'NAG | SNR | SNR-S2940 sysObjectID.0'),
  1084.  (u'eq',
  1085.   u'1.3.6.1.4.1.25506.1.34',
  1086.   u'match',
  1087.   u'H3C.VRP',
  1088.   u'H3C | VRP | S3600-28TP-SI sysObjectID'),
  1089.  (u'contains',
  1090.   u'1.3.6.1.4.1.171.10.75.19.1',
  1091.   u'match',
  1092.   u'DLink.DxS_Smart',
  1093.   u'DLink | DxS_Smart | DES-1210-28P V4 sysObjectID'),
  1094.  (u'eq',
  1095.   u'1.3.6.1.4.1.2011.2.6.5.21',
  1096.   u'match',
  1097.   u'Huawei.VRP3',
  1098.   u'Huawei | MA | MA5105 sysObjectID'),
  1099.  (u'eq',
  1100.   u'1.3.6.1.4.1.40248.1',
  1101.   u'match',
  1102.   u'Vitesse.VSC',
  1103.   u'Vitesse | VSC | VSC7460 sysObjectID'),
  1104.  (u'eq',
  1105.   u'1.3.6.1.4.1.890.1.5.11.9',
  1106.   u'match',
  1107.   u'Zyxel.MSAN',
  1108.   u'Zyxel | ZyNOS | IES1248-71 sysObjectID'),
  1109.  (u'eq',
  1110.   u'1.3.6.1.4.1.2011.10.1.12',
  1111.   u'match',
  1112.   u'Huawei.VRP',
  1113.   u'Huawei | VRP | S3928TP-SI sysObjectID'),
  1114.  (u'eq',
  1115.   u'1.3.6.1.4.1.4249.1.114.1',
  1116.   u'match',
  1117.   u'Nateks.FlexGain',
  1118.   u'Nateks | FlexGain | FG-ACE120 sysObjectID'),
  1119.  (u'contains',
  1120.   u'1.3.6.1.4.1.171.10.75.6',
  1121.   u'match',
  1122.   u'DLink.DxS_Smart',
  1123.   u'DLink | DxS_Smart | DES-1210-28P sysObjectID'),
  1124.  (u'contains',
  1125.   u'1.3.6.1.4.1.171.10.75.7',
  1126.   u'match',
  1127.   u'DLink.DxS_Smart',
  1128.   u'DLink | DxS_Smart | DES-1210-52 sysObjectID'),
  1129.  (u'eq',
  1130.   u'1.3.6.1.4.1.890.1.5.13.8',
  1131.   u'match',
  1132.   u'Zyxel.MSAN',
  1133.   u'Zyxel | ZyNOS | IES-6000 sysObjectID'),
  1134.  (u'eq',
  1135.   u'1.3.6.1.4.1.27514.1.1.1.48',
  1136.   u'match',
  1137.   u'Qtech.QSW2800',
  1138.   u'Qtech | QSW | QSW-2800-10T-AC sysObjectID'),
  1139.  (u'eq',
  1140.   u'1.3.6.1.4.1.38838.1.10',
  1141.   u'match',
  1142.   u'Angtel.Topaz',
  1143.   u'Angtel | Topaz | Topaz-2O-16E'),
  1144.  (u'eq',
  1145.   u'.1.3.6.1.4.1.30982.1.1',
  1146.   u'match',
  1147.   u'TFortis.PSW',
  1148.   u'TFortis | PSW | PSW-2G6F+'),
  1149.  (u'eq',
  1150.   u'1.3.6.1.4.1.27514.1.1.1.203',
  1151.   u'match',
  1152.   u'Qtech.QSW',
  1153.   u'Qtech | QSW | QSW-3400-28T-AC sysObjectID 2'),
  1154.  (u'eq',
  1155.   u'1.3.6.1.4.1.890.1.5.8.16',
  1156.   u'match',
  1157.   u'Zyxel.ZyNOS',
  1158.   u'Zyxel | ZyNOS | ES-2024A sysObjectID'),
  1159.  (u'eq',
  1160.   u'1.3.6.1.4.1.35265.1.22',
  1161.   u'match',
  1162.   u'Eltex.LTP',
  1163.   u'Eltex | LTP | LTP sysObjectID'),
  1164.  (u'contains',
  1165.   u'1.3.6.1.4.1.171.10.76.10',
  1166.   u'match',
  1167.   u'DLink.DxS_Smart',
  1168.   u'DLink | DxS_Smart | DGS-1210-24 sysObjectID'),
  1169.  (u'eq',
  1170.   u'1.3.6.1.4.1.3320.1.228.0',
  1171.   u'match',
  1172.   u'BDCOM.xPON',
  1173.   u'BDCOM | xPON | P3310B sysObjectID'),
  1174.  (u'contains',
  1175.   u'1.3.6.1.4.1.171.10.76.16',
  1176.   u'match',
  1177.   u'DLink.DxS_Smart',
  1178.   u'DLink | DxS_Smart | DGS-1210-28P sysObjectID'),
  1179.  (u'eq',
  1180.   u'1.3.6.1.4.1.1795.1.14.17.1.3',
  1181.   u'match',
  1182.   u'Zhone.Bitstorm',
  1183.   u'Zhone | Bitstorm | 4229-A1-520 sysObjectID'),
  1184.  (u'eq',
  1185.   u'1.3.6.1.4.1.637.61.1',
  1186.   u'match',
  1187.   u'Alcatel.7302',
  1188.   u'Alcatel | 7302 | 7302 sysObjectID.0'),
  1189.  (u'eq',
  1190.   u'1.3.6.1.4.1.27514.1.1.1.49',
  1191.   u'match',
  1192.   u'Qtech.QSW2800',
  1193.   u'Qtech | QSW | QSW-2800-28T sysObjectID'),
  1194.  (u'eq',
  1195.   u'1.3.6.1.4.1.27514.1.1.1.221',
  1196.   u'match',
  1197.   u'Qtech.QSW',
  1198.   u'Qtech | QSW | QSW-3400-28T-AC sysObjectID'),
  1199.  (u'eq',
  1200.   u'1.3.6.1.4.1.21696',
  1201.   u'match',
  1202.   u'Generic.Host',
  1203.   u'KeyMile | MileGate | 2510 sysObjectID'),
  1204.  (u'contains',
  1205.   u'1.3.6.1.4.1.171.10.94.5',
  1206.   u'match',
  1207.   u'DLink.DGS3100',
  1208.   u'DLink | DGS3100 | DGS-3100-24TG sysObjectID'),
  1209.  (u'eq',
  1210.   u'1.3.6.1.4.1.3320.1.294.0',
  1211.   u'match',
  1212.   u'BDCOM.xPON',
  1213.   u'BDCOM | xPON | P3310C sysObjectID'),
  1214.  (u'eq',
  1215.   u'1.3.6.1.4.1.3955.7.2.2000.1',
  1216.   u'match',
  1217.   u'Alstec.ALS',
  1218.   u'Alstec | ALS | ALS-62000'),
  1219.  (u'contains',
  1220.   u'1.3.6.1.4.1.171.10.76.11',
  1221.   u'match',
  1222.   u'DLink.DxS_Smart',
  1223.   u'DLink | DxS_Smart | DGS-1210-48 sysObjectID'),
  1224.  (u'eq',
  1225.   u'.1.3.6.1.4.1.1332.1.1.1',
  1226.   u'match',
  1227.   u'Iskratel.VOIP',
  1228.   u'Iskratel | VOIP | ISKRATEL VOIP-1 sysObjectID'),
  1229.  (u'contains',
  1230.   u'1.3.6.1.4.1.171.10.76.9',
  1231.   u'match',
  1232.   u'DLink.DxS_Smart',
  1233.   u'DLink | DxS_Smart | DGS-1210-16 sysObjectID'),
  1234.  (u'eq',
  1235.   u'1.3.6.1.4.1.4874.1.1.1.6.2',
  1236.   u'match',
  1237.   u'Juniper.JUNOSe',
  1238.   u'Juniper | JUNOSe | E120 sysObjectID'),
  1239.  (u'eq',
  1240.   u'1.3.6.1.4.1.25506.1.37',
  1241.   u'match',
  1242.   u'H3C.VRP',
  1243.   u'H3C | VRP | S3600-28P-EI sysObjectID'),
  1244.  (u'eq',
  1245.   u'1.3.6.1.4.1.8886.6.140',
  1246.   u'match',
  1247.   u'Raisecom.ROS',
  1248.   u'Raisecom | ROS | ISCOM2128EA-MA-AC sysObjectID'),
  1249.  (u'eq',
  1250.   u'1.3.6.1.4.1.890.1.5.8.12',
  1251.   u'match',
  1252.   u'Zyxel.ZyNOS',
  1253.   u'Zyxel | ZyNOS | ES-3124 sysObjectID'),
  1254.  (u'eq',
  1255.   u'1.3.6.1.4.1.890.1.5.11.11',
  1256.   u'match',
  1257.   u'Zyxel.MSAN',
  1258.   u'Zyxel | ZyNOS | IES-612 sysObjectID'),
  1259.  (u'eq',
  1260.   u'1.3.6.1.4.1.27514.1.1.2.59',
  1261.   u'match',
  1262.   u'Qtech.QSW2800',
  1263.   u'Qtech | QSW | QSW-8200-28F-AC-DC sysObjectID'),
  1264.  (u'eq',
  1265.   u'1.3.6.1.4.1.2011.2.248',
  1266.   u'match',
  1267.   u'Huawei.MA5600T',
  1268.   u'Huawei | MA | MA5608T sysObjectID'),
  1269.  (u'eq',
  1270.   u'1.3.6.1.4.1.890.1.5.13.7',
  1271.   u'match',
  1272.   u'Zyxel.MSAN',
  1273.   u'Zyxel | ZyNOS | IES-5005 sysObjectID'),
  1274.  (u'eq',
  1275.   u'1.3.6.1.4.1.27514.1.3.26.7',
  1276.   u'match',
  1277.   u'Qtech.QSW',
  1278.   u'Qtech | QSW | QSW-2910-28F sysObjectID'),
  1279.  (u'contains',
  1280.   u'.1.3.6.1.4.1.1332.1.24.3',
  1281.   u'match',
  1282.   u'Iskratel.ESCOM',
  1283.   u'Iskratel | ESCOM | SI3000 sysObjectID'),
  1284.  (u'eq',
  1285.   u'1.3.6.1.4.1.30803',
  1286.   u'match',
  1287.   u'Vyatta.Vyatta',
  1288.   u'Vyatta | Vyatta | sysObjectID'),
  1289.  (u'eq',
  1290.   u'1.3.6.1.4.1.2011.2.23.92',
  1291.   u'match',
  1292.   u'Huawei.VRP',
  1293.   u'Huawei | VRP | S2326TP-EI sysObjectID'),
  1294.  (u'eq',
  1295.   u'1.3.6.1.4.1.27514.1.1.1.228',
  1296.   u'match',
  1297.   u'Qtech.QSW2800',
  1298.   u'Qtech | QSW | QSW-3450-28T-AC sysObjectID'),
  1299.  (u'eq',
  1300.   u'1.3.6.1.4.1.35265.1.21.202.1',
  1301.   u'match',
  1302.   u'Eltex.LTE',
  1303.   u'Eltex | LTE | LTE sysObjectID'),
  1304.  (u'eq',
  1305.   u'1.3.6.1.4.1.890.1.5.11.6',
  1306.   u'match',
  1307.   u'Zyxel.MSAN',
  1308.   u'Zyxel | ZyNOS | IES-1000 AAM1008-61 sysObjectID'),
  1309.  (u'eq',
  1310.   u'1.3.6.1.4.1.2011.10.1.200',
  1311.   u'match',
  1312.   u'Huawei.VRP',
  1313.   u'Huawei | VRP | S2403TP-EA sysObjectID'),
  1314.  (u'eq',
  1315.   u'1.3.6.1.4.1.27514.1.1.1.281',
  1316.   u'match',
  1317.   u'Qtech.QSW',
  1318.   u'Qtech | QSW | QSW-3470-28T-AC sysObjectID'),
  1319.  (u'eq',
  1320.   u'1.3.6.1.4.1.259.6.10.94',
  1321.   u'match',
  1322.   u'EdgeCore.ES',
  1323.   u'EdgeCore | ES | ES3528M sysObjectID'),
  1324.  (u'eq',
  1325.   u'1.3.6.1.4.1.835457.6.3',
  1326.   u'match',
  1327.   u'Alcatel.TIMOS',
  1328.   u'Alcatel | TIMOS | 7450 ESS-7'),
  1329.  (u'eq',
  1330.   u'1.3.6.1.4.1.4413',
  1331.   u'match',
  1332.   u'Alstec.24xx',
  1333.   u'Alstec | ALS24300 sysObjectID'),
  1334.  (u'eq',
  1335.   u'1.3.6.1.4.1.2011.2.169',
  1336.   u'match',
  1337.   u'Huawei.MA5600T',
  1338.   u'Huawei | MA | MA5616 sysObjectID'),
  1339.  (u'contains',
  1340.   u'1.3.6.1.4.1.171.10.76.17',
  1341.   u'match',
  1342.   u'DLink.DxS_Smart',
  1343.   u'DLink | DxS_Smart | DGS-1210-52 sysObjectID'),
  1344.  (u'eq',
  1345.   u'1.3.6.1.4.1.27514.1.1.1.51',
  1346.   u'match',
  1347.   u'Qtech.QSW2800',
  1348.   u'Qtech | QSW | QSW-2800-10T-DC sysObjectID'),
  1349.  (u'eq',
  1350.   u'1.3.6.1.4.1.3955.6.1.2016.1',
  1351.   u'match',
  1352.   u'Linksys.SRW',
  1353.   u'Linksys | SRW | SRW2016 sysObjectID'),
  1354.  (u'eq',
  1355.   u'1.3.6.1.4.1.11.2.3.7.11.63',
  1356.   u'match',
  1357.   u'HP.ProCurve',
  1358.   u'HP | ProCurve | 2810-24G sysObjectID')]
  1359. ------------------------------------------------------------------------
  1360. File: services/discovery/jobs/box/profile.py (Line: 36)
  1361. Function: handler
  1362.    29         name = "profile"
  1363.    30    
  1364.    31         _rules_cache = cachetools.TTLCache(10, ttl=60)
  1365.    32         snmp_version_def = None
  1366.    33    
  1367.    34         def handler(self):
  1368.    35             self.logger.info("Checking profile accordance")
  1369.    36 ==>         profile = self.get_profile()
  1370.    37             if not profile:
  1371.    38                 return  # Cannot detect
  1372.    39             if profile == self.object.profile_name:
  1373.    40                 self.logger.info("Profile is correct: %s", profile)
  1374.    41             else:
  1375.    42                 self.logger.info(
  1376. Variables:
  1377.                 self =
  1378. <noc.services.discovery.jobs.box.profile.ProfileCheck object at 0x7ff1a256fc10>
  1379. ------------------------------------------------------------------------
  1380. File: services/discovery/jobs/base.py (Line: 382)
  1381. Function: run
  1382.   375                                      self.required_script)
  1383.   376                     return
  1384.   377                 # Check required capabilities
  1385.   378                 if not self.has_required_capabilities():
  1386.   379                     return
  1387.   380                 # Run check
  1388.   381                 try:
  1389.   382 ==>                 self.handler()
  1390.   383                 except RPCRemoteError as e:
  1391.   384                     self.logger.error(
  1392.   385                         "RPC Remote error (%s): %s",
  1393.   386                         e.remote_code, e)
  1394.   387                     self.set_problem(
  1395.   388                         alarm_class=self.error_map.get(e.remote_code),
  1396. Variables:
  1397.                 self =
  1398. <noc.services.discovery.jobs.box.profile.ProfileCheck object at 0x7ff1a256fc10>
  1399.                    e =
  1400. TypeError('unsupported type for timedelta seconds component: datetime.timedelta',)
  1401. ------------------------------------------------------------------------
  1402. END OF TRACEBACK
  1403. 2017-07-04 10:34:45.191432 [discovery|box|DeviceName|version]  Checking version
  1404. 2017-07-04 10:34:45.199680 [discovery|box|DeviceName|version]  Set path: None
  1405. 2017-07-04 10:34:45.222728 [discovery|box|DeviceName|version]  UNHANDLED EXCEPTION (2017-07-04 10:34:45.200823)
  1406. BRANCH: feature/microservices TIP: 0db95855ccf8
  1407. PROCESS: ./services/discovery/service.py
  1408. ERROR FINGERPRINT: 63d23b53-e459-5cf6-a8b0-b3cf3621d591
  1409. WORKING DIRECTORY: /opt/noc
  1410. EXCEPTION: <type 'exceptions.TypeError'> unsupported type for timedelta seconds component: datetime.timedelta
  1411. START OF TRACEBACK
  1412. ------------------------------------------------------------------------
  1413. File: core/dcs/base.py (Line: 225)
  1414. Function: resolve
  1415.   218         @tornado.gen.coroutine
  1416.   219         def resolve(self, hint=None, wait=True, timeout=None, full_result=False):
  1417.   220             metrics["dcs.resolver.requests"] += 1
  1418.   221             if wait:
  1419.   222                 # Wait until service catalog populated
  1420.   223                 try:
  1421.   224                     yield self.ready_event.wait(
  1422.   225 ==>                     timeout=datetime.timedelta(seconds=timeout or self.dcs.DEFAULT_SERVICE_RESOLUTION_TIMEOUT)
  1423.   226                     )
  1424.   227                 except tornado.gen.TimeoutError:
  1425.   228                     metrics["dcs.resolver.errors"] += 1
  1426.   229                     raise ResolutionError()
  1427.   230             if not wait and not self.ready_event.is_set():
  1428.   231                 raise ResolutionError()
  1429. Variables:
  1430.                 self = <noc.core.dcs.consuldcs.ConsulResolver object at 0x7ff1a4537e90>
  1431.                 hint = None
  1432.              timeout = None
  1433.          full_result = False
  1434.                 wait = True
  1435. ------------------------------------------------------------------------
  1436. File: lib/python2.7/site-packages/tornado/gen.py (Line: 307)
  1437. Function: wrapper
  1438.   300                     # Inline the first iteration of Runner.run.  This lets us
  1439.   301                     # avoid the cost of creating a Runner when the coroutine
  1440.   302                     # never actually yields, which in turn allows us to
  1441.   303                     # use "optional" coroutines in critical path code without
  1442.   304                     # performance penalty for the synchronous case.
  1443.   305                     try:
  1444.   306                         orig_stack_contexts = stack_context._state.contexts
  1445.   307 ==>                     yielded = next(result)
  1446.   308                         if stack_context._state.contexts is not orig_stack_contexts:
  1447.   309                             yielded = TracebackFuture()
  1448.   310                             yielded.set_exception(
  1449.   311                                 stack_context.StackContextInconsistentError(
  1450.   312                                     'stack_context inconsistency (probably caused '
  1451.   313                                     'by yield within a "with StackContext" block)'))
  1452. Variables:
  1453.                 func = <function resolve at 0x7ff1b91302a8>
  1454.                 args = (<noc.core.dcs.consuldcs.ConsulResolver object at 0x7ff1a4537e90>,)
  1455.              yielded = None
  1456.     replace_callback = True
  1457.               future = None
  1458.               result = <generator object resolve at 0x7ff1a8558780>
  1459.  orig_stack_contexts = ((), None)
  1460.               kwargs = {'wait': True, 'full_result': False, 'timeout': None, 'hint': None}
  1461. ------------------------------------------------------------------------
  1462. File: lib/python2.7/site-packages/tornado/concurrent.py (Line: 238)
  1463. Function: result
  1464.   231             before the `Future` is done, so the ``timeout`` is never used.
  1465.   232             """
  1466.  233             self._clear_tb_log()
  1467.  234             if self._result is not None:
  1468.  235                 return self._result
  1469.  236             if self._exc_info is not None:
  1470.  237                 try:
  1471.  238 ==>                 raise_exc_info(self._exc_info)
  1472.  239                 finally:
  1473.  240                     self = None
  1474.  241             self._check_done()
  1475.  242             return self._result
  1476.  243    
  1477.  244         def exception(self, timeout=None):
  1478. Variables:
  1479.                self = None
  1480.             timeout = None
  1481. ------------------------------------------------------------------------
  1482. File: lib/python2.7/site-packages/tornado/gen.py (Line: 1055)
  1483. Function: run
  1484. 1048                         return
  1485. 1049                     self.future = None
  1486. 1050                     try:
  1487. 1051                         orig_stack_contexts = stack_context._state.contexts
  1488. 1052                         exc_info = None
  1489. 1053    
  1490. 1054                         try:
  1491. 1055 ==>                         value = future.result()
  1492. 1056                         except Exception:
  1493. 1057                             self.had_exception = True
  1494. 1058                             exc_info = sys.exc_info()
  1495. 1059                         future = None
  1496. 1060    
  1497. 1061                         if exc_info is not None:
  1498. Variables:
  1499.                self = <tornado.gen.Runner object at 0x7ff1a35e40d0>
  1500.               value = <noc.core.dcs.consuldcs.ConsulResolver object at 0x7ff1a4537e90>
  1501.             yielded = None
  1502.              future = None
  1503. orig_stack_contexts = ((), None)
  1504.            exc_info = None
  1505. ------------------------------------------------------------------------
  1506. File: core/dcs/base.py (Line: 114)
  1507. Function: resolve
  1508.  107    
  1509.  108         @tornado.gen.coroutine
  1510.  109         def resolve(self, name, hint=None, wait=True, timeout=None,
  1511.  110                     full_result=False):
  1512.  111             resolver = yield self.get_resolver(name)
  1513.  112             r = yield resolver.resolve(
  1514.  113                 hint=hint, wait=wait, timeout=timeout,
  1515.  114 ==>             full_result=full_result
  1516.  115             )
  1517.  116             raise tornado.gen.Return(r)
  1518.  117    
  1519.  118         @tornado.gen.coroutine
  1520.  119         def expire_resolvers(self):
  1521.  120             with self.resolvers_lock:
  1522. Variables:
  1523.                name = 'sae'
  1524.                hint = None
  1525.                self = <noc.core.dcs.consuldcs.ConsulDCS object at 0x7ff1ae99a150>
  1526.            resolver = <noc.core.dcs.consuldcs.ConsulResolver object at 0x7ff1a4537e90>
  1527.         full_result = False
  1528.             timeout = None
  1529.                wait = True
  1530. ------------------------------------------------------------------------
  1531. File: lib/python2.7/site-packages/tornado/gen.py (Line: 1063)
  1532. Function: run
  1533. 1056                         except Exception:
  1534. 1057                             self.had_exception = True
  1535. 1058                             exc_info = sys.exc_info()
  1536. 1059                         future = None
  1537. 1060    
  1538. 1061                         if exc_info is not None:
  1539. 1062                             try:
  1540. 1063 ==>                             yielded = self.gen.throw(*exc_info)
  1541. 1064                             finally:
  1542. 1065                                 # Break up a reference to itself
  1543. 1066                                 # for faster GC on CPython.
  1544. 1067                                 exc_info = None
  1545. 1068                         else:
  1546. 1069                             yielded = self.gen.send(value)
  1547. Variables:
  1548.                self = <tornado.gen.Runner object at 0x7ff1a35e40d0>
  1549.               value = <noc.core.dcs.consuldcs.ConsulResolver object at 0x7ff1a4537e90>
  1550.             yielded = None
  1551.              future = None
  1552. orig_stack_contexts = ((), None)
  1553.            exc_info = None
  1554. ------------------------------------------------------------------------
  1555. File: lib/python2.7/site-packages/tornado/concurrent.py (Line: 238)
  1556. Function: result
  1557.  231             before the `Future` is done, so the ``timeout`` is never used.
  1558.  232             """
  1559.   233             self._clear_tb_log()
  1560.   234             if self._result is not None:
  1561.   235                 return self._result
  1562.   236             if self._exc_info is not None:
  1563.   237                 try:
  1564.   238 ==>                 raise_exc_info(self._exc_info)
  1565.   239                 finally:
  1566.   240                     self = None
  1567.   241             self._check_done()
  1568.   242             return self._result
  1569.   243    
  1570.   244         def exception(self, timeout=None):
  1571. Variables:
  1572.                 self = None
  1573.              timeout = None
  1574. ------------------------------------------------------------------------
  1575. File: lib/python2.7/site-packages/tornado/gen.py (Line: 1055)
  1576. Function: run
  1577.  1048                         return
  1578.  1049                     self.future = None
  1579.  1050                     try:
  1580.  1051                         orig_stack_contexts = stack_context._state.contexts
  1581.  1052                         exc_info = None
  1582.  1053    
  1583.  1054                         try:
  1584.  1055 ==>                         value = future.result()
  1585.  1056                         except Exception:
  1586.  1057                             self.had_exception = True
  1587.  1058                             exc_info = sys.exc_info()
  1588.  1059                         future = None
  1589.  1060    
  1590.  1061                         if exc_info is not None:
  1591. Variables:
  1592.             exc_info = None
  1593.                 self = <tornado.gen.Runner object at 0x7ff1a35e4f90>
  1594.               future = None
  1595.  orig_stack_contexts = ((), None)
  1596. ------------------------------------------------------------------------
  1597. File: core/service/rpc.py (Line: 148)
  1598. Function: _call
  1599.   141             # Get services
  1600.   142             response = None
  1601.   143             for t in self._service.iter_rpc_retry_timeout():
  1602.   144                 # Resolve service against service catalog
  1603.   145                 if self._hints:
  1604.   146                     svc = random.choice(self._hints)
  1605.   147                 else:
  1606.   148 ==>                 svc = yield self._service.dcs.resolve(self._service_name)
  1607.   149                 response = yield make_call(
  1608.   150                     "http://%s/api/%s/" % (svc, self._api),
  1609.   151                     body
  1610.   152                 )
  1611.   153                 if response:
  1612.   154                     break
  1613. Variables:
  1614.                 body = '{"params":[13,"get_version",{},null],"method":"script","id":0}'
  1615.                 self = <noc.core.service.rpc.RPCProxy object at 0x7ff1a360b710>
  1616.                 args = (13, 'get_version', {}, None)
  1617.                   t0 = 1499153685.198205
  1618.             response = None
  1619.                  tid = 0
  1620.                    t = 0.1
  1621.               kwargs = {}
  1622.                  msg = {'params': [13, 'get_version', {}, None], 'method': 'script', 'id': 0}
  1623.               method = 'script'
  1624.            make_call = <function make_call at 0x7ff19f29ac08>
  1625.            is_notify = False
  1626. ------------------------------------------------------------------------
  1627. File: lib/python2.7/site-packages/tornado/gen.py (Line: 1063)
  1628. Function: run
  1629.  1056                         except Exception:
  1630.  1057                             self.had_exception = True
  1631.  1058                             exc_info = sys.exc_info()
  1632.  1059                         future = None
  1633.  1060    
  1634.  1061                         if exc_info is not None:
  1635.  1062                             try:
  1636.  1063 ==>                             yielded = self.gen.throw(*exc_info)
  1637.  1064                             finally:
  1638.  1065                                 # Break up a reference to itself
  1639.  1066                                 # for faster GC on CPython.
  1640.  1067                                 exc_info = None
  1641.  1068                         else:
  1642.  1069                             yielded = self.gen.send(value)
  1643. Variables:
  1644.             exc_info = None
  1645.                 self = <tornado.gen.Runner object at 0x7ff1a35e4f90>
  1646.               future = None
  1647.  orig_stack_contexts = ((), None)
  1648. ------------------------------------------------------------------------
  1649. File: lib/python2.7/site-packages/tornado/concurrent.py (Line: 238)
  1650. Function: result
  1651.   231             before the `Future` is done, so the ``timeout`` is never used.
  1652.   232             """
  1653.  233             self._clear_tb_log()
  1654.  234             if self._result is not None:
  1655.  235                 return self._result
  1656.  236             if self._exc_info is not None:
  1657.  237                 try:
  1658.  238 ==>                 raise_exc_info(self._exc_info)
  1659.  239                 finally:
  1660.  240                     self = None
  1661.  241             self._check_done()
  1662.  242             return self._result
  1663.  243    
  1664.  244         def exception(self, timeout=None):
  1665. Variables:
  1666.                self = None
  1667.             timeout = None
  1668. ------------------------------------------------------------------------
  1669. File: lib/python2.7/site-packages/tornado/gen.py (Line: 1055)
  1670. Function: run
  1671. 1048                         return
  1672. 1049                     self.future = None
  1673. 1050                     try:
  1674. 1051                         orig_stack_contexts = stack_context._state.contexts
  1675. 1052                         exc_info = None
  1676. 1053    
  1677. 1054                         try:
  1678. 1055 ==>                         value = future.result()
  1679. 1056                         except Exception:
  1680. 1057                             self.had_exception = True
  1681. 1058                             exc_info = sys.exc_info()
  1682. 1059                         future = None
  1683. 1060    
  1684. 1061                         if exc_info is not None:
  1685. Variables:
  1686.            exc_info = None
  1687.                self = <tornado.gen.Runner object at 0x7ff1a35e4810>
  1688.              future = None
  1689.                   e = StopIteration()
  1690. orig_stack_contexts = ((), None)
  1691. ------------------------------------------------------------------------
  1692. File: core/service/rpc.py (Line: 63)
  1693. Function: _call
  1694.   56                 result = yield self._call(item, *args, **kwargs)
  1695.   57                 raise tornado.gen.Return(result)
  1696.   58    
  1697.   59             def sync_wrapper(*args, **kwargs):
  1698.   60                 @tornado.gen.coroutine
  1699.   61                 def _call():
  1700.   62                     try:
  1701.   63 ==>                     r = yield self._call(item, *args, **kwargs)
  1702.   64                         result.append(r)
  1703.   65                     except tornado.gen.Return as e:
  1704.   66                         result.append(e.value)
  1705.   67                     except Exception:
  1706.   68                         error.append(sys.exc_info())
  1707.   69                     finally:
  1708. Variables:
  1709.                args = (13, 'get_version', {}, None)
  1710.                self = <noc.core.service.rpc.RPCProxy object at 0x7ff1a360b710>
  1711.              kwargs = {}
  1712.                item = 'script'
  1713.              result = []
  1714.               error =
  1715. [(<type 'exceptions.TypeError'>,
  1716.  TypeError('unsupported type for timedelta seconds component: datetime.timedelta',),
  1717.  <traceback object at 0x7ff19ec48368>)]
  1718.                  ev = <threading._Event object at 0x7ff1a35e4450>
  1719. ------------------------------------------------------------------------
  1720. File: core/service/rpc.py (Line: 78)
  1721. Function: sync_wrapper
  1722.   71    
  1723.   72                 ev = threading.Event()
  1724.   73                 result = []
  1725.   74                 error = []
  1726.   75                 self._service.ioloop.add_callback(_call)
  1727.   76                 ev.wait()
  1728.   77                 if error:
  1729.   78 ==>                 six.reraise(*error[0])
  1730.   79                 else:
  1731.   80                     return result[0]
  1732.   81    
  1733.   82             if item.startswith("_"):
  1734.   83                 return self.__dict__[item]
  1735.   84             elif self._sync:
  1736. Variables:
  1737.              kwargs = {}
  1738.                self = <noc.core.service.rpc.RPCProxy object at 0x7ff1a360b710>
  1739.                args = (13, 'get_version', {}, None)
  1740.                item = 'script'
  1741.              result = []
  1742.               error =
  1743. [(<type 'exceptions.TypeError'>,
  1744.  TypeError('unsupported type for timedelta seconds component: datetime.timedelta',),
  1745.  <traceback object at 0x7ff19ec48368>)]
  1746.                  ev = <threading._Event object at 0x7ff1a35e4450>
  1747.               _call = <function _call at 0x7ff19f54f668>
  1748. ------------------------------------------------------------------------
  1749. File: sa/mtmanager.py (Line: 30)
  1750. Function: run
  1751.   23             """
  1752.    24             Run SA script and wait for result
  1753.    25             """
  1754.   26             if "." in script:
  1755.   27                 # Leave only script name
  1756.   28                 script = script.split(".")[-1]
  1757.   29             return open_sync_rpc("sae", calling_service="MTManager").script(
  1758.   30 ==>             object.id, script, params, timeout
  1759.   31             )
  1760.   32    
  1761.   33    
  1762.   34     # Run single instance
  1763.   35     MTManager = MTManagerImplementation()
  1764. Variables:
  1765.                self = <noc.sa.mtmanager.MTManagerImplementation object at 0x7ff1aa721f10>
  1766.              object = <ManagedObject: DeviceName>
  1767.              params = {}
  1768.             timeout = None
  1769.              script = 'get_version'
  1770. ------------------------------------------------------------------------
  1771. File: sa/models/managedobject.py (Line: 1172)
  1772. Function: __call__
  1773. 1165     class ScriptsProxy(object):
  1774. 1166         class CallWrapper(object):
  1775. 1167             def __init__(self, obj, name):
  1776. 1168                 self.name = name
  1777. 1169                 self.object = obj
  1778. 1170    
  1779. 1171             def __call__(self, **kwargs):
  1780. 1172 ==>             return MTManager.run(self.object, self.name, kwargs)
  1781. 1173    
  1782. 1174         def __init__(self, obj):
  1783. 1175             self._object = obj
  1784. 1176             self._cache = {}
  1785. 1177    
  1786. 1178         def __getattr__(self, name):
  1787. Variables:
  1788.                self = <noc.sa.models.managedobject.CallWrapper object at 0x7ff1a360ba10>
  1789.              kwargs = {}
  1790. ------------------------------------------------------------------------
  1791. File: services/discovery/jobs/box/version.py (Line: 23)
  1792. Function: handler
  1793.   16         """
  1794.    17         name = "version"
  1795.    18         required_script = "get_version"
  1796.    19    
  1797.    20         def handler(self):
  1798.    21             self.logger.info("Checking version")
  1799.    22             old_platform = self.object.platform
  1800.    23 ==>         result = self.object.scripts.get_version()
  1801.    24             r = {}
  1802.    25             for k in result:
  1803.    26                 v = result[k]
  1804.    27                 if k == "attributes":
  1805.    28                     for kk in v:
  1806.    29                         r[kk] = v[kk]
  1807. Variables:
  1808.                 self =
  1809. <noc.services.discovery.jobs.box.version.VersionCheck object at 0x7ff19f29d910>
  1810.         old_platform = u'Cisco C2960'
  1811. ------------------------------------------------------------------------
  1812. File: services/discovery/jobs/base.py (Line: 382)
  1813. Function: run
  1814.   375                                      self.required_script)
  1815.   376                     return
  1816.   377                 # Check required capabilities
  1817.   378                 if not self.has_required_capabilities():
  1818.   379                     return
  1819.   380                 # Run check
  1820.   381                 try:
  1821.   382 ==>                 self.handler()
  1822.   383                 except RPCRemoteError as e:
  1823.   384                     self.logger.error(
  1824.   385                         "RPC Remote error (%s): %s",
  1825.   386                         e.remote_code, e)
  1826.   387                     self.set_problem(
  1827.   388                         alarm_class=self.error_map.get(e.remote_code),
  1828. Variables:
  1829.                 self =
  1830. <noc.services.discovery.jobs.box.version.VersionCheck object at 0x7ff19f29d910>
  1831.                    e =
  1832. TypeError('unsupported type for timedelta seconds component: datetime.timedelta',)
  1833. ------------------------------------------------------------------------
  1834. END OF TRACEBACK
  1835. 2017-07-04 10:34:45.224183 [discovery|box|DeviceName|caps]  Checking capabilities
  1836. 2017-07-04 10:34:45.226001 [discovery|box|DeviceName|caps]  Set path: None
  1837. 2017-07-04 10:34:45.248176 [discovery|box|DeviceName|caps]  UNHANDLED EXCEPTION (2017-07-04 10:34:45.227091)
  1838. BRANCH: feature/microservices TIP: 0db95855ccf8
  1839. PROCESS: ./services/discovery/service.py
  1840. ERROR FINGERPRINT: 63d23b53-e459-5cf6-a8b0-b3cf3621d591
  1841. WORKING DIRECTORY: /opt/noc
  1842. EXCEPTION: <type 'exceptions.TypeError'> unsupported type for timedelta seconds component: datetime.timedelta
  1843. START OF TRACEBACK
  1844. ------------------------------------------------------------------------
  1845. File: core/dcs/base.py (Line: 225)
  1846. Function: resolve
  1847.   218         @tornado.gen.coroutine
  1848.   219         def resolve(self, hint=None, wait=True, timeout=None, full_result=False):
  1849.   220             metrics["dcs.resolver.requests"] += 1
  1850.   221             if wait:
  1851.   222                 # Wait until service catalog populated
  1852.   223                 try:
  1853.   224                     yield self.ready_event.wait(
  1854.   225 ==>                     timeout=datetime.timedelta(seconds=timeout or self.dcs.DEFAULT_SERVICE_RESOLUTION_TIMEOUT)
  1855.   226                     )
  1856.   227                 except tornado.gen.TimeoutError:
  1857.   228                     metrics["dcs.resolver.errors"] += 1
  1858.   229                     raise ResolutionError()
  1859.   230             if not wait and not self.ready_event.is_set():
  1860.   231                 raise ResolutionError()
  1861. Variables:
  1862.                 self = <noc.core.dcs.consuldcs.ConsulResolver object at 0x7ff1a4537e90>
  1863.                 hint = None
  1864.              timeout = None
  1865.          full_result = False
  1866.                 wait = True
  1867. ------------------------------------------------------------------------
  1868. File: lib/python2.7/site-packages/tornado/gen.py (Line: 307)
  1869. Function: wrapper
  1870.   300                     # Inline the first iteration of Runner.run.  This lets us
  1871.   301                     # avoid the cost of creating a Runner when the coroutine
  1872.   302                     # never actually yields, which in turn allows us to
  1873.   303                     # use "optional" coroutines in critical path code without
  1874.   304                     # performance penalty for the synchronous case.
  1875.   305                     try:
  1876.   306                         orig_stack_contexts = stack_context._state.contexts
  1877.   307 ==>                     yielded = next(result)
  1878.   308                         if stack_context._state.contexts is not orig_stack_contexts:
  1879.   309                             yielded = TracebackFuture()
  1880.   310                             yielded.set_exception(
  1881.   311                                 stack_context.StackContextInconsistentError(
  1882.   312                                     'stack_context inconsistency (probably caused '
  1883.   313                                     'by yield within a "with StackContext" block)'))
  1884. Variables:
  1885.                 func = <function resolve at 0x7ff1b91302a8>
  1886.                 args = (<noc.core.dcs.consuldcs.ConsulResolver object at 0x7ff1a4537e90>,)
  1887.              yielded = None
  1888.     replace_callback = True
  1889.               future = None
  1890.               result = <generator object resolve at 0x7ff1a8558140>
  1891.  orig_stack_contexts = ((), None)
  1892.               kwargs = {'wait': True, 'full_result': False, 'timeout': None, 'hint': None}
  1893. ------------------------------------------------------------------------
  1894. File: lib/python2.7/site-packages/tornado/concurrent.py (Line: 238)
  1895. Function: result
  1896.   231             before the `Future` is done, so the ``timeout`` is never used.
  1897.   232             """
  1898.  233             self._clear_tb_log()
  1899.  234             if self._result is not None:
  1900.  235                 return self._result
  1901.  236             if self._exc_info is not None:
  1902.  237                 try:
  1903.  238 ==>                 raise_exc_info(self._exc_info)
  1904.  239                 finally:
  1905.  240                     self = None
  1906.  241             self._check_done()
  1907.  242             return self._result
  1908.  243    
  1909.  244         def exception(self, timeout=None):
  1910. Variables:
  1911.                self = None
  1912.             timeout = None
  1913. ------------------------------------------------------------------------
  1914. File: lib/python2.7/site-packages/tornado/gen.py (Line: 1055)
  1915. Function: run
  1916. 1048                         return
  1917. 1049                     self.future = None
  1918. 1050                     try:
  1919. 1051                         orig_stack_contexts = stack_context._state.contexts
  1920. 1052                         exc_info = None
  1921. 1053    
  1922. 1054                         try:
  1923. 1055 ==>                         value = future.result()
  1924. 1056                         except Exception:
  1925. 1057                             self.had_exception = True
  1926. 1058                             exc_info = sys.exc_info()
  1927. 1059                         future = None
  1928. 1060    
  1929. 1061                         if exc_info is not None:
  1930. Variables:
  1931.                self = <tornado.gen.Runner object at 0x7ff1a35e4ad0>
  1932.               value = <noc.core.dcs.consuldcs.ConsulResolver object at 0x7ff1a4537e90>
  1933.             yielded = None
  1934.              future = None
  1935. orig_stack_contexts = ((), None)
  1936.            exc_info = None
  1937. ------------------------------------------------------------------------
  1938. File: core/dcs/base.py (Line: 114)
  1939. Function: resolve
  1940.  107    
  1941.  108         @tornado.gen.coroutine
  1942.  109         def resolve(self, name, hint=None, wait=True, timeout=None,
  1943.  110                     full_result=False):
  1944.  111             resolver = yield self.get_resolver(name)
  1945.  112             r = yield resolver.resolve(
  1946.  113                 hint=hint, wait=wait, timeout=timeout,
  1947.  114 ==>             full_result=full_result
  1948.  115             )
  1949.  116             raise tornado.gen.Return(r)
  1950.  117    
  1951.  118         @tornado.gen.coroutine
  1952.  119         def expire_resolvers(self):
  1953.  120             with self.resolvers_lock:
  1954. Variables:
  1955.                name = 'sae'
  1956.                hint = None
  1957.                self = <noc.core.dcs.consuldcs.ConsulDCS object at 0x7ff1ae99a150>
  1958.            resolver = <noc.core.dcs.consuldcs.ConsulResolver object at 0x7ff1a4537e90>
  1959.         full_result = False
  1960.             timeout = None
  1961.                wait = True
  1962. ------------------------------------------------------------------------
  1963. File: lib/python2.7/site-packages/tornado/gen.py (Line: 1063)
  1964. Function: run
  1965. 1056                         except Exception:
  1966. 1057                             self.had_exception = True
  1967. 1058                             exc_info = sys.exc_info()
  1968. 1059                         future = None
  1969. 1060    
  1970. 1061                         if exc_info is not None:
  1971. 1062                             try:
  1972. 1063 ==>                             yielded = self.gen.throw(*exc_info)
  1973. 1064                             finally:
  1974. 1065                                 # Break up a reference to itself
  1975. 1066                                 # for faster GC on CPython.
  1976. 1067                                 exc_info = None
  1977. 1068                         else:
  1978. 1069                             yielded = self.gen.send(value)
  1979. Variables:
  1980.                self = <tornado.gen.Runner object at 0x7ff1a35e4ad0>
  1981.               value = <noc.core.dcs.consuldcs.ConsulResolver object at 0x7ff1a4537e90>
  1982.             yielded = None
  1983.              future = None
  1984. orig_stack_contexts = ((), None)
  1985.            exc_info = None
  1986. ------------------------------------------------------------------------
  1987. File: lib/python2.7/site-packages/tornado/concurrent.py (Line: 238)
  1988. Function: result
  1989.  231             before the `Future` is done, so the ``timeout`` is never used.
  1990.  232             """
  1991.   233             self._clear_tb_log()
  1992.   234             if self._result is not None:
  1993.   235                 return self._result
  1994.   236             if self._exc_info is not None:
  1995.   237                 try:
  1996.   238 ==>                 raise_exc_info(self._exc_info)
  1997.   239                 finally:
  1998.   240                     self = None
  1999.   241             self._check_done()
  2000.   242             return self._result
  2001.   243    
  2002.   244         def exception(self, timeout=None):
  2003. Variables:
  2004.                 self = None
  2005.              timeout = None
  2006. ------------------------------------------------------------------------
  2007. File: lib/python2.7/site-packages/tornado/gen.py (Line: 1055)
  2008. Function: run
  2009.  1048                         return
  2010.  1049                     self.future = None
  2011.  1050                     try:
  2012.  1051                         orig_stack_contexts = stack_context._state.contexts
  2013.  1052                         exc_info = None
  2014.  1053    
  2015.  1054                         try:
  2016.  1055 ==>                         value = future.result()
  2017.  1056                         except Exception:
  2018.  1057                             self.had_exception = True
  2019.  1058                             exc_info = sys.exc_info()
  2020.  1059                         future = None
  2021.  1060    
  2022.  1061                         if exc_info is not None:
  2023. Variables:
  2024.             exc_info = None
  2025.                 self = <tornado.gen.Runner object at 0x7ff1a35e4190>
  2026.               future = None
  2027.  orig_stack_contexts = ((), None)
  2028. ------------------------------------------------------------------------
  2029. File: core/service/rpc.py (Line: 148)
  2030. Function: _call
  2031.   141             # Get services
  2032.   142             response = None
  2033.   143             for t in self._service.iter_rpc_retry_timeout():
  2034.   144                 # Resolve service against service catalog
  2035.   145                 if self._hints:
  2036.   146                     svc = random.choice(self._hints)
  2037.   147                 else:
  2038.   148 ==>                 svc = yield self._service.dcs.resolve(self._service_name)
  2039.   149                 response = yield make_call(
  2040.   150                     "http://%s/api/%s/" % (svc, self._api),
  2041.   151                     body
  2042.   152                 )
  2043.   153                 if response:
  2044.   154                     break
  2045. Variables:
  2046.                 body = '{"params":[13,"get_capabilities",{},null],"method":"script","id":0}'
  2047.                 self = <noc.core.service.rpc.RPCProxy object at 0x7ff1a3665910>
  2048.                 args = (13, 'get_capabilities', {}, None)
  2049.                   t0 = 1499153685.224653
  2050.             response = None
  2051.                  tid = 0
  2052.                    t = 0.1
  2053.               kwargs = {}
  2054.                  msg =
  2055. {'id': 0, 'method': 'script', 'params': [13, 'get_capabilities', {}, None]}
  2056.               method = 'script'
  2057.            make_call = <function make_call at 0x7ff1a2571050>
  2058.            is_notify = False
  2059. ------------------------------------------------------------------------
  2060. File: lib/python2.7/site-packages/tornado/gen.py (Line: 1063)
  2061. Function: run
  2062.  1056                         except Exception:
  2063.  1057                             self.had_exception = True
  2064.  1058                             exc_info = sys.exc_info()
  2065.  1059                         future = None
  2066.  1060    
  2067.  1061                         if exc_info is not None:
  2068.  1062                             try:
  2069.  1063 ==>                             yielded = self.gen.throw(*exc_info)
  2070.  1064                             finally:
  2071.  1065                                 # Break up a reference to itself
  2072.  1066                                 # for faster GC on CPython.
  2073.  1067                                 exc_info = None
  2074.  1068                         else:
  2075.  1069                             yielded = self.gen.send(value)
  2076. Variables:
  2077.             exc_info = None
  2078.                 self = <tornado.gen.Runner object at 0x7ff1a35e4190>
  2079.               future = None
  2080.  orig_stack_contexts = ((), None)
  2081. ------------------------------------------------------------------------
  2082. File: lib/python2.7/site-packages/tornado/concurrent.py (Line: 238)
  2083. Function: result
  2084.   231             before the `Future` is done, so the ``timeout`` is never used.
  2085.   232             """
  2086.  233             self._clear_tb_log()
  2087.  234             if self._result is not None:
  2088.  235                 return self._result
  2089.  236             if self._exc_info is not None:
  2090.  237                 try:
  2091.  238 ==>                 raise_exc_info(self._exc_info)
  2092.  239                 finally:
  2093.  240                     self = None
  2094.  241             self._check_done()
  2095.  242             return self._result
  2096.  243    
  2097.  244         def exception(self, timeout=None):
  2098. Variables:
  2099.                self = None
  2100.             timeout = None
  2101. ------------------------------------------------------------------------
  2102. File: lib/python2.7/site-packages/tornado/gen.py (Line: 1055)
  2103. Function: run
  2104. 1048                         return
  2105. 1049                     self.future = None
  2106. 1050                     try:
  2107. 1051                         orig_stack_contexts = stack_context._state.contexts
  2108. 1052                         exc_info = None
  2109. 1053    
  2110. 1054                         try:
  2111. 1055 ==>                         value = future.result()
  2112. 1056                         except Exception:
  2113. 1057                             self.had_exception = True
  2114. 1058                             exc_info = sys.exc_info()
  2115. 1059                         future = None
  2116. 1060    
  2117. 1061                         if exc_info is not None:
  2118. Variables:
  2119.            exc_info = None
  2120.                self = <tornado.gen.Runner object at 0x7ff1a35e4990>
  2121.              future = None
  2122.                   e = StopIteration()
  2123. orig_stack_contexts = ((), None)
  2124. ------------------------------------------------------------------------
  2125. File: core/service/rpc.py (Line: 63)
  2126. Function: _call
  2127.   56                 result = yield self._call(item, *args, **kwargs)
  2128.   57                 raise tornado.gen.Return(result)
  2129.   58    
  2130.   59             def sync_wrapper(*args, **kwargs):
  2131.   60                 @tornado.gen.coroutine
  2132.   61                 def _call():
  2133.   62                     try:
  2134.   63 ==>                     r = yield self._call(item, *args, **kwargs)
  2135.   64                         result.append(r)
  2136.   65                     except tornado.gen.Return as e:
  2137.   66                         result.append(e.value)
  2138.   67                     except Exception:
  2139.   68                         error.append(sys.exc_info())
  2140.   69                     finally:
  2141. Variables:
  2142.                args = (13, 'get_capabilities', {}, None)
  2143.                self = <noc.core.service.rpc.RPCProxy object at 0x7ff1a3665910>
  2144.              kwargs = {}
  2145.                item = 'script'
  2146.              result = []
  2147.               error =
  2148. [(<type 'exceptions.TypeError'>,
  2149.  TypeError('unsupported type for timedelta seconds component: datetime.timedelta',),
  2150.  <traceback object at 0x7ff19f5acb90>)]
  2151.                  ev = <threading._Event object at 0x7ff1a35e4c50>
  2152. ------------------------------------------------------------------------
  2153. File: core/service/rpc.py (Line: 78)
  2154. Function: sync_wrapper
  2155.   71    
  2156.   72                 ev = threading.Event()
  2157.   73                 result = []
  2158.   74                 error = []
  2159.   75                 self._service.ioloop.add_callback(_call)
  2160.   76                 ev.wait()
  2161.   77                 if error:
  2162.   78 ==>                 six.reraise(*error[0])
  2163.   79                 else:
  2164.   80                     return result[0]
  2165.   81    
  2166.   82             if item.startswith("_"):
  2167.   83                 return self.__dict__[item]
  2168.   84             elif self._sync:
  2169. Variables:
  2170.              kwargs = {}
  2171.                self = <noc.core.service.rpc.RPCProxy object at 0x7ff1a3665910>
  2172.                args = (13, 'get_capabilities', {}, None)
  2173.                item = 'script'
  2174.              result = []
  2175.               error =
  2176. [(<type 'exceptions.TypeError'>,
  2177.  TypeError('unsupported type for timedelta seconds component: datetime.timedelta',),
  2178.  <traceback object at 0x7ff19f5acb90>)]
  2179.                  ev = <threading._Event object at 0x7ff1a35e4c50>
  2180.               _call = <function _call at 0x7ff1a25719b0>
  2181. ------------------------------------------------------------------------
  2182. File: sa/mtmanager.py (Line: 30)
  2183. Function: run
  2184.   23             """
  2185.    24             Run SA script and wait for result
  2186.    25             """
  2187.   26             if "." in script:
  2188.   27                 # Leave only script name
  2189.   28                 script = script.split(".")[-1]
  2190.   29             return open_sync_rpc("sae", calling_service="MTManager").script(
  2191.   30 ==>             object.id, script, params, timeout
  2192.   31             )
  2193.   32    
  2194.   33    
  2195.   34     # Run single instance
  2196.   35     MTManager = MTManagerImplementation()
  2197. Variables:
  2198.                self = <noc.sa.mtmanager.MTManagerImplementation object at 0x7ff1aa721f10>
  2199.              object = <ManagedObject: DeviceName>
  2200.              params = {}
  2201.             timeout = None
  2202.              script = 'get_capabilities'
  2203. ------------------------------------------------------------------------
  2204. File: sa/models/managedobject.py (Line: 1172)
  2205. Function: __call__
  2206. 1165     class ScriptsProxy(object):
  2207. 1166         class CallWrapper(object):
  2208. 1167             def __init__(self, obj, name):
  2209. 1168                 self.name = name
  2210. 1169                 self.object = obj
  2211. 1170    
  2212. 1171             def __call__(self, **kwargs):
  2213. 1172 ==>             return MTManager.run(self.object, self.name, kwargs)
  2214. 1173    
  2215. 1174         def __init__(self, obj):
  2216. 1175             self._object = obj
  2217. 1176             self._cache = {}
  2218. 1177    
  2219. 1178         def __getattr__(self, name):
  2220. Variables:
  2221.                self = <noc.sa.models.managedobject.CallWrapper object at 0x7ff1a3665ad0>
  2222.              kwargs = {}
  2223. ------------------------------------------------------------------------
  2224. File: services/discovery/jobs/box/caps.py (Line: 24)
  2225. Function: handler
  2226.   17         Version discovery
  2227.   18         """
  2228.    19         name = "caps"
  2229.    20         required_script = "get_capabilities"
  2230.    21    
  2231.    22         def handler(self):
  2232.    23             self.logger.info("Checking capabilities")
  2233.    24 ==>         result = self.object.scripts.get_capabilities()
  2234.    25             self.logger.debug("Received capabilities: \n%s",
  2235.    26                               ujson.dumps(result, indent=4))
  2236.    27             self.update_caps(result, source="caps")
  2237. Variables:
  2238.                 self =
  2239. <noc.services.discovery.jobs.box.caps.CapsCheck object at 0x7ff19f29d910>
  2240. ------------------------------------------------------------------------
  2241. File: services/discovery/jobs/base.py (Line: 382)
  2242. Function: run
  2243.   375                                      self.required_script)
  2244.   376                     return
  2245.   377                 # Check required capabilities
  2246.   378                 if not self.has_required_capabilities():
  2247.   379                     return
  2248.   380                 # Run check
  2249.   381                 try:
  2250.   382 ==>                 self.handler()
  2251.   383                 except RPCRemoteError as e:
  2252.   384                     self.logger.error(
  2253.   385                         "RPC Remote error (%s): %s",
  2254.   386                         e.remote_code, e)
  2255.   387                     self.set_problem(
  2256.   388                         alarm_class=self.error_map.get(e.remote_code),
  2257. Variables:
  2258.                 self =
  2259. <noc.services.discovery.jobs.box.caps.CapsCheck object at 0x7ff19f29d910>
  2260.                    e =
  2261. TypeError('unsupported type for timedelta seconds component: datetime.timedelta',)
  2262. ------------------------------------------------------------------------
  2263. END OF TRACEBACK
  2264. 2017-07-04 10:34:45.251094 [discovery|box|DeviceName|interface]  Checking interfaces
  2265. 2017-07-04 10:34:45.252637 [discovery|box|DeviceName|interface]  Set path: None
  2266. 2017-07-04 10:34:45.272130 [discovery|box|DeviceName|interface]  UNHANDLED EXCEPTION (2017-07-04 10:34:45.253560)
  2267. BRANCH: feature/microservices TIP: 0db95855ccf8
  2268. PROCESS: ./services/discovery/service.py
  2269. ERROR FINGERPRINT: 63d23b53-e459-5cf6-a8b0-b3cf3621d591
  2270. WORKING DIRECTORY: /opt/noc
  2271. EXCEPTION: <type 'exceptions.TypeError'> unsupported type for timedelta seconds component: datetime.timedelta
  2272. START OF TRACEBACK
  2273. ------------------------------------------------------------------------
  2274. File: core/dcs/base.py (Line: 225)
  2275. Function: resolve
  2276.   218         @tornado.gen.coroutine
  2277.   219         def resolve(self, hint=None, wait=True, timeout=None, full_result=False):
  2278.   220             metrics["dcs.resolver.requests"] += 1
  2279.   221             if wait:
  2280.   222                 # Wait until service catalog populated
  2281.   223                 try:
  2282.   224                     yield self.ready_event.wait(
  2283.   225 ==>                     timeout=datetime.timedelta(seconds=timeout or self.dcs.DEFAULT_SERVICE_RESOLUTION_TIMEOUT)
  2284.   226                     )
  2285.   227                 except tornado.gen.TimeoutError:
  2286.   228                     metrics["dcs.resolver.errors"] += 1
  2287.   229                     raise ResolutionError()
  2288.   230             if not wait and not self.ready_event.is_set():
  2289.   231                 raise ResolutionError()
  2290. Variables:
  2291.                 self = <noc.core.dcs.consuldcs.ConsulResolver object at 0x7ff1a4537e90>
  2292.                 hint = None
  2293.              timeout = None
  2294.          full_result = False
  2295.                 wait = True
  2296. ------------------------------------------------------------------------
  2297. File: lib/python2.7/site-packages/tornado/gen.py (Line: 307)
  2298. Function: wrapper
  2299.   300                     # Inline the first iteration of Runner.run.  This lets us
  2300.   301                     # avoid the cost of creating a Runner when the coroutine
  2301.   302                     # never actually yields, which in turn allows us to
  2302.   303                     # use "optional" coroutines in critical path code without
  2303.   304                     # performance penalty for the synchronous case.
  2304.   305                     try:
  2305.   306                         orig_stack_contexts = stack_context._state.contexts
  2306.   307 ==>                     yielded = next(result)
  2307.   308                         if stack_context._state.contexts is not orig_stack_contexts:
  2308.   309                             yielded = TracebackFuture()
  2309.   310                             yielded.set_exception(
  2310.   311                                 stack_context.StackContextInconsistentError(
  2311.   312                                     'stack_context inconsistency (probably caused '
  2312.   313                                     'by yield within a "with StackContext" block)'))
  2313. Variables:
  2314.                 func = <function resolve at 0x7ff1b91302a8>
  2315.                 args = (<noc.core.dcs.consuldcs.ConsulResolver object at 0x7ff1a4537e90>,)
  2316.              yielded = None
  2317.     replace_callback = True
  2318.               future = None
  2319.               result = <generator object resolve at 0x7ff19f53be60>
  2320.  orig_stack_contexts = ((), None)
  2321.               kwargs = {'wait': True, 'full_result': False, 'timeout': None, 'hint': None}
  2322. ------------------------------------------------------------------------
  2323. File: lib/python2.7/site-packages/tornado/concurrent.py (Line: 238)
  2324. Function: result
  2325.   231             before the `Future` is done, so the ``timeout`` is never used.
  2326.   232             """
  2327.  233             self._clear_tb_log()
  2328.  234             if self._result is not None:
  2329.  235                 return self._result
  2330.  236             if self._exc_info is not None:
  2331.  237                 try:
  2332.  238 ==>                 raise_exc_info(self._exc_info)
  2333.  239                 finally:
  2334.  240                     self = None
  2335.  241             self._check_done()
  2336.  242             return self._result
  2337.  243    
  2338.  244         def exception(self, timeout=None):
  2339. Variables:
  2340.                self = None
  2341.             timeout = None
  2342. ------------------------------------------------------------------------
  2343. File: lib/python2.7/site-packages/tornado/gen.py (Line: 1055)
  2344. Function: run
  2345. 1048                         return
  2346. 1049                     self.future = None
  2347. 1050                     try:
  2348. 1051                         orig_stack_contexts = stack_context._state.contexts
  2349. 1052                         exc_info = None
  2350. 1053    
  2351. 1054                         try:
  2352. 1055 ==>                         value = future.result()
  2353. 1056                         except Exception:
  2354. 1057                             self.had_exception = True
  2355. 1058                             exc_info = sys.exc_info()
  2356. 1059                         future = None
  2357. 1060    
  2358. 1061                         if exc_info is not None:
  2359. Variables:
  2360.                self = <tornado.gen.Runner object at 0x7ff19f351050>
  2361.               value = <noc.core.dcs.consuldcs.ConsulResolver object at 0x7ff1a4537e90>
  2362.             yielded = None
  2363.              future = None
  2364. orig_stack_contexts = ((), None)
  2365.            exc_info = None
  2366. ------------------------------------------------------------------------
  2367. File: core/dcs/base.py (Line: 114)
  2368. Function: resolve
  2369.  107    
  2370.  108         @tornado.gen.coroutine
  2371.  109         def resolve(self, name, hint=None, wait=True, timeout=None,
  2372.  110                     full_result=False):
  2373.  111             resolver = yield self.get_resolver(name)
  2374.  112             r = yield resolver.resolve(
  2375.  113                 hint=hint, wait=wait, timeout=timeout,
  2376.  114 ==>             full_result=full_result
  2377.  115             )
  2378.  116             raise tornado.gen.Return(r)
  2379.  117    
  2380.  118         @tornado.gen.coroutine
  2381.  119         def expire_resolvers(self):
  2382.  120             with self.resolvers_lock:
  2383. Variables:
  2384.                name = 'sae'
  2385.                hint = None
  2386.                self = <noc.core.dcs.consuldcs.ConsulDCS object at 0x7ff1ae99a150>
  2387.            resolver = <noc.core.dcs.consuldcs.ConsulResolver object at 0x7ff1a4537e90>
  2388.         full_result = False
  2389.             timeout = None
  2390.                wait = True
  2391. ------------------------------------------------------------------------
  2392. File: lib/python2.7/site-packages/tornado/gen.py (Line: 1063)
  2393. Function: run
  2394. 1056                         except Exception:
  2395. 1057                             self.had_exception = True
  2396. 1058                             exc_info = sys.exc_info()
  2397. 1059                         future = None
  2398. 1060    
  2399. 1061                         if exc_info is not None:
  2400. 1062                             try:
  2401. 1063 ==>                             yielded = self.gen.throw(*exc_info)
  2402. 1064                             finally:
  2403. 1065                                 # Break up a reference to itself
  2404. 1066                                 # for faster GC on CPython.
  2405. 1067                                 exc_info = None
  2406. 1068                         else:
  2407. 1069                             yielded = self.gen.send(value)
  2408. Variables:
  2409.                self = <tornado.gen.Runner object at 0x7ff19f351050>
  2410.               value = <noc.core.dcs.consuldcs.ConsulResolver object at 0x7ff1a4537e90>
  2411.             yielded = None
  2412.              future = None
  2413. orig_stack_contexts = ((), None)
  2414.            exc_info = None
  2415. ------------------------------------------------------------------------
  2416. File: lib/python2.7/site-packages/tornado/concurrent.py (Line: 238)
  2417. Function: result
  2418.  231             before the `Future` is done, so the ``timeout`` is never used.
  2419.  232             """
  2420.   233             self._clear_tb_log()
  2421.   234             if self._result is not None:
  2422.   235                 return self._result
  2423.   236             if self._exc_info is not None:
  2424.   237                 try:
  2425.   238 ==>                 raise_exc_info(self._exc_info)
  2426.   239                 finally:
  2427.   240                     self = None
  2428.   241             self._check_done()
  2429.   242             return self._result
  2430.   243    
  2431.   244         def exception(self, timeout=None):
  2432. Variables:
  2433.                 self = None
  2434.              timeout = None
  2435. ------------------------------------------------------------------------
  2436. File: lib/python2.7/site-packages/tornado/gen.py (Line: 1055)
  2437. Function: run
  2438.  1048                         return
  2439.  1049                     self.future = None
  2440.  1050                     try:
  2441.  1051                         orig_stack_contexts = stack_context._state.contexts
  2442.  1052                         exc_info = None
  2443.  1053    
  2444.  1054                         try:
  2445.  1055 ==>                         value = future.result()
  2446.  1056                         except Exception:
  2447.  1057                             self.had_exception = True
  2448.  1058                             exc_info = sys.exc_info()
  2449.  1059                         future = None
  2450.  1060    
  2451.  1061                         if exc_info is not None:
  2452. Variables:
  2453.             exc_info = None
  2454.                 self = <tornado.gen.Runner object at 0x7ff19f5b4490>
  2455.               future = None
  2456.  orig_stack_contexts = ((), None)
  2457. ------------------------------------------------------------------------
  2458. File: core/service/rpc.py (Line: 148)
  2459. Function: _call
  2460.   141             # Get services
  2461.   142             response = None
  2462.   143             for t in self._service.iter_rpc_retry_timeout():
  2463.   144                 # Resolve service against service catalog
  2464.   145                 if self._hints:
  2465.   146                     svc = random.choice(self._hints)
  2466.   147                 else:
  2467.   148 ==>                 svc = yield self._service.dcs.resolve(self._service_name)
  2468.   149                 response = yield make_call(
  2469.   150                     "http://%s/api/%s/" % (svc, self._api),
  2470.   151                     body
  2471.   152                 )
  2472.   153                 if response:
  2473.   154                     break
  2474. Variables:
  2475.                 body = '{"params":[13,"get_interfaces",{},null],"method":"script","id":0}'
  2476.                 self = <noc.core.service.rpc.RPCProxy object at 0x7ff1a35e4a50>
  2477.                 args = (13, 'get_interfaces', {}, None)
  2478.                   t0 = 1499153685.251442
  2479.             response = None
  2480.                  tid = 0
  2481.                    t = 0.1
  2482.               kwargs = {}
  2483.                  msg =
  2484. {'id': 0, 'method': 'script', 'params': [13, 'get_interfaces', {}, None]}
  2485.               method = 'script'
  2486.            make_call = <function make_call at 0x7ff19f37fed8>
  2487.            is_notify = False
  2488. ------------------------------------------------------------------------
  2489. File: lib/python2.7/site-packages/tornado/gen.py (Line: 1063)
  2490. Function: run
  2491.  1056                         except Exception:
  2492.  1057                             self.had_exception = True
  2493.  1058                             exc_info = sys.exc_info()
  2494.  1059                         future = None
  2495.  1060    
  2496.  1061                         if exc_info is not None:
  2497.  1062                             try:
  2498.  1063 ==>                             yielded = self.gen.throw(*exc_info)
  2499.  1064                             finally:
  2500.  1065                                 # Break up a reference to itself
  2501.  1066                                 # for faster GC on CPython.
  2502.  1067                                 exc_info = None
  2503.  1068                         else:
  2504.  1069                             yielded = self.gen.send(value)
  2505. Variables:
  2506.             exc_info = None
  2507.                 self = <tornado.gen.Runner object at 0x7ff19f5b4490>
  2508.               future = None
  2509.  orig_stack_contexts = ((), None)
  2510. ------------------------------------------------------------------------
  2511. File: lib/python2.7/site-packages/tornado/concurrent.py (Line: 238)
  2512. Function: result
  2513.   231             before the `Future` is done, so the ``timeout`` is never used.
  2514.   232             """
  2515.  233             self._clear_tb_log()
  2516.  234             if self._result is not None:
  2517.  235                 return self._result
  2518.  236             if self._exc_info is not None:
  2519.  237                 try:
  2520.  238 ==>                 raise_exc_info(self._exc_info)
  2521.  239                 finally:
  2522.  240                     self = None
  2523.  241             self._check_done()
  2524.  242             return self._result
  2525.  243    
  2526.  244         def exception(self, timeout=None):
  2527. Variables:
  2528.                self = None
  2529.             timeout = None
  2530. ------------------------------------------------------------------------
  2531. File: lib/python2.7/site-packages/tornado/gen.py (Line: 1055)
  2532. Function: run
  2533. 1048                         return
  2534. 1049                     self.future = None
  2535. 1050                     try:
  2536. 1051                         orig_stack_contexts = stack_context._state.contexts
  2537. 1052                         exc_info = None
  2538. 1053    
  2539. 1054                         try:
  2540. 1055 ==>                         value = future.result()
  2541. 1056                         except Exception:
  2542. 1057                             self.had_exception = True
  2543. 1058                             exc_info = sys.exc_info()
  2544. 1059                         future = None
  2545. 1060    
  2546. 1061                         if exc_info is not None:
  2547. Variables:
  2548.            exc_info = None
  2549.                self = <tornado.gen.Runner object at 0x7ff19f5b4f50>
  2550.              future = None
  2551.                   e = StopIteration()
  2552. orig_stack_contexts = ((), None)
  2553. ------------------------------------------------------------------------
  2554. File: core/service/rpc.py (Line: 63)
  2555. Function: _call
  2556.   56                 result = yield self._call(item, *args, **kwargs)
  2557.   57                 raise tornado.gen.Return(result)
  2558.   58    
  2559.   59             def sync_wrapper(*args, **kwargs):
  2560.   60                 @tornado.gen.coroutine
  2561.   61                 def _call():
  2562.   62                     try:
  2563.   63 ==>                     r = yield self._call(item, *args, **kwargs)
  2564.   64                         result.append(r)
  2565.   65                     except tornado.gen.Return as e:
  2566.   66                         result.append(e.value)
  2567.   67                     except Exception:
  2568.   68                         error.append(sys.exc_info())
  2569.   69                     finally:
  2570. Variables:
  2571.                args = (13, 'get_interfaces', {}, None)
  2572.                self = <noc.core.service.rpc.RPCProxy object at 0x7ff1a35e4a50>
  2573.              kwargs = {}
  2574.                item = 'script'
  2575.              result = []
  2576.               error =
  2577. [(<type 'exceptions.TypeError'>,
  2578.  TypeError('unsupported type for timedelta seconds component: datetime.timedelta',),
  2579.  <traceback object at 0x7ff19f6f65f0>)]
  2580.                  ev = <threading._Event object at 0x7ff1a35e4510>
  2581. ------------------------------------------------------------------------
  2582. File: core/service/rpc.py (Line: 78)
  2583. Function: sync_wrapper
  2584.   71    
  2585.   72                 ev = threading.Event()
  2586.   73                 result = []
  2587.   74                 error = []
  2588.   75                 self._service.ioloop.add_callback(_call)
  2589.   76                 ev.wait()
  2590.   77                 if error:
  2591.   78 ==>                 six.reraise(*error[0])
  2592.   79                 else:
  2593.   80                     return result[0]
  2594.   81    
  2595.   82             if item.startswith("_"):
  2596.   83                 return self.__dict__[item]
  2597.   84             elif self._sync:
  2598. Variables:
  2599.              kwargs = {}
  2600.                self = <noc.core.service.rpc.RPCProxy object at 0x7ff1a35e4a50>
  2601.                args = (13, 'get_interfaces', {}, None)
  2602.                item = 'script'
  2603.              result = []
  2604.               error =
  2605. [(<type 'exceptions.TypeError'>,
  2606.  TypeError('unsupported type for timedelta seconds component: datetime.timedelta',),
  2607.  <traceback object at 0x7ff19f6f65f0>)]
  2608.                  ev = <threading._Event object at 0x7ff1a35e4510>
  2609.               _call = <function _call at 0x7ff19f37f410>
  2610. ------------------------------------------------------------------------
  2611. File: sa/mtmanager.py (Line: 30)
  2612. Function: run
  2613.   23             """
  2614.    24             Run SA script and wait for result
  2615.    25             """
  2616.   26             if "." in script:
  2617.   27                 # Leave only script name
  2618.   28                 script = script.split(".")[-1]
  2619.   29             return open_sync_rpc("sae", calling_service="MTManager").script(
  2620.   30 ==>             object.id, script, params, timeout
  2621.   31             )
  2622.   32    
  2623.   33    
  2624.   34     # Run single instance
  2625.   35     MTManager = MTManagerImplementation()
  2626. Variables:
  2627.                self = <noc.sa.mtmanager.MTManagerImplementation object at 0x7ff1aa721f10>
  2628.              object = <ManagedObject: DeviceName>
  2629.              params = {}
  2630.             timeout = None
  2631.              script = 'get_interfaces'
  2632. ------------------------------------------------------------------------
  2633. File: sa/models/managedobject.py (Line: 1172)
  2634. Function: __call__
  2635. 1165     class ScriptsProxy(object):
  2636. 1166         class CallWrapper(object):
  2637. 1167             def __init__(self, obj, name):
  2638. 1168                 self.name = name
  2639. 1169                 self.object = obj
  2640. 1170    
  2641. 1171             def __call__(self, **kwargs):
  2642. 1172 ==>             return MTManager.run(self.object, self.name, kwargs)
  2643. 1173    
  2644. 1174         def __init__(self, obj):
  2645. 1175             self._object = obj
  2646. 1176             self._cache = {}
  2647. 1177    
  2648. 1178         def __getattr__(self, name):
  2649. Variables:
  2650.                self = <noc.sa.models.managedobject.CallWrapper object at 0x7ff1a35e4610>
  2651.              kwargs = {}
  2652. ------------------------------------------------------------------------
  2653. File: services/discovery/jobs/box/interface.py (Line: 33)
  2654. Function: handler
  2655.   26    
  2656.   27         def __init__(self, *args, **kwargs):
  2657.   28             super(InterfaceCheck, self).__init__(*args, **kwargs)
  2658.   29             self.get_interface_profile = InterfaceClassificationRule.get_classificator()
  2659.   30    
  2660.   31         def handler(self):
  2661.   32             self.logger.info("Checking interfaces")
  2662.   33 ==>         result = self.object.scripts.get_interfaces()
  2663.   34             self.seen_interfaces = []
  2664.   35             # Process forwarding instances
  2665.   36             for fi in result:
  2666.   37                 # Apply forwarding instance
  2667.   38                 forwarding_instance = self.submit_forwarding_instance(
  2668.   39                     name=fi["forwarding_instance"],
  2669. Variables:
  2670.                self =
  2671. <noc.services.discovery.jobs.box.interface.InterfaceCheck object at 0x7ff19f29d910>
  2672. ------------------------------------------------------------------------
  2673. File: services/discovery/jobs/base.py (Line: 382)
  2674. Function: run
  2675.  375                                      self.required_script)
  2676.  376                     return
  2677.  377                 # Check required capabilities
  2678.  378                 if not self.has_required_capabilities():
  2679.  379                     return
  2680.  380                 # Run check
  2681.  381                 try:
  2682.  382 ==>                 self.handler()
  2683.  383                 except RPCRemoteError as e:
  2684.  384                     self.logger.error(
  2685.  385                         "RPC Remote error (%s): %s",
  2686.  386                         e.remote_code, e)
  2687.  387                     self.set_problem(
  2688.  388                         alarm_class=self.error_map.get(e.remote_code),
  2689. Variables:
  2690.                self =
  2691. <noc.services.discovery.jobs.box.interface.InterfaceCheck object at 0x7ff19f29d910>
  2692.                   e =
  2693. TypeError('unsupported type for timedelta seconds component: datetime.timedelta',)
  2694. ------------------------------------------------------------------------
  2695. END OF TRACEBACK
  2696. 2017-07-04 10:34:45.273384 [discovery|box|DeviceName|id]  Checking chassis id
  2697. 2017-07-04 10:34:45.274947 [discovery|box|DeviceName|id]  Set path: None
  2698. 2017-07-04 10:34:45.294507 [discovery|box|DeviceName|id]  UNHANDLED EXCEPTION (2017-07-04 10:34:45.275877)
  2699. BRANCH: feature/microservices TIP: 0db95855ccf8
  2700. PROCESS: ./services/discovery/service.py
  2701. ERROR FINGERPRINT: 63d23b53-e459-5cf6-a8b0-b3cf3621d591
  2702. WORKING DIRECTORY: /opt/noc
  2703. EXCEPTION: <type 'exceptions.TypeError'> unsupported type for timedelta seconds component: datetime.timedelta
  2704. START OF TRACEBACK
  2705. ------------------------------------------------------------------------
  2706. File: core/dcs/base.py (Line: 225)
  2707. Function: resolve
  2708.  218         @tornado.gen.coroutine
  2709.  219         def resolve(self, hint=None, wait=True, timeout=None, full_result=False):
  2710.  220             metrics["dcs.resolver.requests"] += 1
  2711.  221             if wait:
  2712.  222                 # Wait until service catalog populated
  2713.  223                 try:
  2714.  224                     yield self.ready_event.wait(
  2715.  225 ==>                     timeout=datetime.timedelta(seconds=timeout or self.dcs.DEFAULT_SERVICE_RESOLUTION_TIMEOUT)
  2716.  226                     )
  2717.  227                 except tornado.gen.TimeoutError:
  2718.  228                     metrics["dcs.resolver.errors"] += 1
  2719.  229                     raise ResolutionError()
  2720.  230             if not wait and not self.ready_event.is_set():
  2721.  231                 raise ResolutionError()
  2722. Variables:
  2723.                self = <noc.core.dcs.consuldcs.ConsulResolver object at 0x7ff1a4537e90>
  2724.                hint = None
  2725.             timeout = None
  2726.         full_result = False
  2727.                wait = True
  2728. ------------------------------------------------------------------------
  2729. File: lib/python2.7/site-packages/tornado/gen.py (Line: 307)
  2730. Function: wrapper
  2731.  300                     # Inline the first iteration of Runner.run.  This lets us
  2732.  301                     # avoid the cost of creating a Runner when the coroutine
  2733.  302                     # never actually yields, which in turn allows us to
  2734.  303                     # use "optional" coroutines in critical path code without
  2735.  304                     # performance penalty for the synchronous case.
  2736.  305                     try:
  2737.  306                         orig_stack_contexts = stack_context._state.contexts
  2738.  307 ==>                     yielded = next(result)
  2739.  308                         if stack_context._state.contexts is not orig_stack_contexts:
  2740.  309                             yielded = TracebackFuture()
  2741.  310                             yielded.set_exception(
  2742.  311                                 stack_context.StackContextInconsistentError(
  2743.  312                                     'stack_context inconsistency (probably caused '
  2744.  313                                     'by yield within a "with StackContext" block)'))
  2745. Variables:
  2746.                func = <function resolve at 0x7ff1b91302a8>
  2747.                args = (<noc.core.dcs.consuldcs.ConsulResolver object at 0x7ff1a4537e90>,)
  2748.             yielded = None
  2749.    replace_callback = True
  2750.              future = None
  2751.              result = <generator object resolve at 0x7ff19f5b1320>
  2752. orig_stack_contexts = ((), None)
  2753.              kwargs = {'wait': True, 'full_result': False, 'timeout': None, 'hint': None}
  2754. ------------------------------------------------------------------------
  2755. File: lib/python2.7/site-packages/tornado/concurrent.py (Line: 238)
  2756. Function: result
  2757.  231             before the `Future` is done, so the ``timeout`` is never used.
  2758.  232             """
  2759.   233             self._clear_tb_log()
  2760.   234             if self._result is not None:
  2761.   235                 return self._result
  2762.   236             if self._exc_info is not None:
  2763.   237                 try:
  2764.   238 ==>                 raise_exc_info(self._exc_info)
  2765.   239                 finally:
  2766.   240                     self = None
  2767.   241             self._check_done()
  2768.   242             return self._result
  2769.   243    
  2770.   244         def exception(self, timeout=None):
  2771. Variables:
  2772.                 self = None
  2773.              timeout = None
  2774. ------------------------------------------------------------------------
  2775. File: lib/python2.7/site-packages/tornado/gen.py (Line: 1055)
  2776. Function: run
  2777.  1048                         return
  2778.  1049                     self.future = None
  2779.  1050                     try:
  2780.  1051                         orig_stack_contexts = stack_context._state.contexts
  2781.  1052                         exc_info = None
  2782.  1053    
  2783.  1054                         try:
  2784.  1055 ==>                         value = future.result()
  2785.  1056                         except Exception:
  2786.  1057                             self.had_exception = True
  2787.  1058                             exc_info = sys.exc_info()
  2788.  1059                         future = None
  2789.  1060    
  2790.  1061                         if exc_info is not None:
  2791. Variables:
  2792.                 self = <tornado.gen.Runner object at 0x7ff19f351790>
  2793.                value = <noc.core.dcs.consuldcs.ConsulResolver object at 0x7ff1a4537e90>
  2794.              yielded = None
  2795.               future = None
  2796.  orig_stack_contexts = ((), None)
  2797.             exc_info = None
  2798. ------------------------------------------------------------------------
  2799. File: core/dcs/base.py (Line: 114)
  2800. Function: resolve
  2801.   107    
  2802.   108         @tornado.gen.coroutine
  2803.   109         def resolve(self, name, hint=None, wait=True, timeout=None,
  2804.   110                     full_result=False):
  2805.   111             resolver = yield self.get_resolver(name)
  2806.   112             r = yield resolver.resolve(
  2807.   113                 hint=hint, wait=wait, timeout=timeout,
  2808.   114 ==>             full_result=full_result
  2809.   115             )
  2810.   116             raise tornado.gen.Return(r)
  2811.   117    
  2812.   118         @tornado.gen.coroutine
  2813.   119         def expire_resolvers(self):
  2814.   120             with self.resolvers_lock:
  2815. Variables:
  2816.                 name = 'sae'
  2817.                 hint = None
  2818.                 self = <noc.core.dcs.consuldcs.ConsulDCS object at 0x7ff1ae99a150>
  2819.             resolver = <noc.core.dcs.consuldcs.ConsulResolver object at 0x7ff1a4537e90>
  2820.          full_result = False
  2821.              timeout = None
  2822.                 wait = True
  2823. ------------------------------------------------------------------------
  2824. File: lib/python2.7/site-packages/tornado/gen.py (Line: 1063)
  2825. Function: run
  2826.  1056                         except Exception:
  2827.  1057                             self.had_exception = True
  2828.  1058                             exc_info = sys.exc_info()
  2829.  1059                         future = None
  2830.  1060    
  2831.  1061                         if exc_info is not None:
  2832.  1062                             try:
  2833.  1063 ==>                             yielded = self.gen.throw(*exc_info)
  2834.  1064                             finally:
  2835.  1065                                 # Break up a reference to itself
  2836.  1066                                 # for faster GC on CPython.
  2837.  1067                                 exc_info = None
  2838.  1068                         else:
  2839.  1069                             yielded = self.gen.send(value)
  2840. Variables:
  2841.                 self = <tornado.gen.Runner object at 0x7ff19f351790>
  2842.                value = <noc.core.dcs.consuldcs.ConsulResolver object at 0x7ff1a4537e90>
  2843.              yielded = None
  2844.               future = None
  2845.  orig_stack_contexts = ((), None)
  2846.             exc_info = None
  2847. ------------------------------------------------------------------------
  2848. File: lib/python2.7/site-packages/tornado/concurrent.py (Line: 238)
  2849. Function: result
  2850.   231             before the `Future` is done, so the ``timeout`` is never used.
  2851.   232             """
  2852.  233             self._clear_tb_log()
  2853.  234             if self._result is not None:
  2854.  235                 return self._result
  2855.  236             if self._exc_info is not None:
  2856.  237                 try:
  2857.  238 ==>                 raise_exc_info(self._exc_info)
  2858.  239                 finally:
  2859.  240                     self = None
  2860.  241             self._check_done()
  2861.  242             return self._result
  2862.  243    
  2863.  244         def exception(self, timeout=None):
  2864. Variables:
  2865.                self = None
  2866.             timeout = None
  2867. ------------------------------------------------------------------------
  2868. File: lib/python2.7/site-packages/tornado/gen.py (Line: 1055)
  2869. Function: run
  2870. 1048                         return
  2871. 1049                     self.future = None
  2872. 1050                     try:
  2873. 1051                         orig_stack_contexts = stack_context._state.contexts
  2874. 1052                         exc_info = None
  2875. 1053    
  2876. 1054                         try:
  2877. 1055 ==>                         value = future.result()
  2878. 1056                         except Exception:
  2879. 1057                             self.had_exception = True
  2880. 1058                             exc_info = sys.exc_info()
  2881. 1059                         future = None
  2882. 1060    
  2883. 1061                         if exc_info is not None:
  2884. Variables:
  2885.            exc_info = None
  2886.                self = <tornado.gen.Runner object at 0x7ff19f351250>
  2887.              future = None
  2888. orig_stack_contexts = ((), None)
  2889. ------------------------------------------------------------------------
  2890. File: core/service/rpc.py (Line: 148)
  2891. Function: _call
  2892.  141             # Get services
  2893.  142             response = None
  2894.  143             for t in self._service.iter_rpc_retry_timeout():
  2895.  144                 # Resolve service against service catalog
  2896.  145                 if self._hints:
  2897.  146                     svc = random.choice(self._hints)
  2898.  147                 else:
  2899.  148 ==>                 svc = yield self._service.dcs.resolve(self._service_name)
  2900.  149                 response = yield make_call(
  2901.  150                     "http://%s/api/%s/" % (svc, self._api),
  2902.  151                     body
  2903.  152                 )
  2904.  153                 if response:
  2905.  154                     break
  2906. Variables:
  2907.                body = '{"params":[13,"get_discovery_id",{},null],"method":"script","id":0}'
  2908.                self = <noc.core.service.rpc.RPCProxy object at 0x7ff19f5b4d50>
  2909.                args = (13, 'get_discovery_id', {}, None)
  2910.                  t0 = 1499153685.273782
  2911.            response = None
  2912.                 tid = 0
  2913.                   t = 0.1
  2914.              kwargs = {}
  2915.                 msg =
  2916. {'id': 0, 'method': 'script', 'params': [13, 'get_discovery_id', {}, None]}
  2917.              method = 'script'
  2918.           make_call = <function make_call at 0x7ff1a2571b90>
  2919.           is_notify = False
  2920. ------------------------------------------------------------------------
  2921. File: lib/python2.7/site-packages/tornado/gen.py (Line: 1063)
  2922. Function: run
  2923. 1056                         except Exception:
  2924. 1057                             self.had_exception = True
  2925. 1058                             exc_info = sys.exc_info()
  2926. 1059                         future = None
  2927. 1060    
  2928. 1061                         if exc_info is not None:
  2929. 1062                             try:
  2930. 1063 ==>                             yielded = self.gen.throw(*exc_info)
  2931. 1064                             finally:
  2932. 1065                                 # Break up a reference to itself
  2933. 1066                                 # for faster GC on CPython.
  2934. 1067                                 exc_info = None
  2935. 1068                         else:
  2936. 1069                             yielded = self.gen.send(value)
  2937. Variables:
  2938.            exc_info = None
  2939.                self = <tornado.gen.Runner object at 0x7ff19f351250>
  2940.              future = None
  2941. orig_stack_contexts = ((), None)
  2942. ------------------------------------------------------------------------
  2943. File: lib/python2.7/site-packages/tornado/concurrent.py (Line: 238)
  2944. Function: result
  2945.  231             before the `Future` is done, so the ``timeout`` is never used.
  2946.  232             """
  2947.   233             self._clear_tb_log()
  2948.   234             if self._result is not None:
  2949.   235                 return self._result
  2950.   236             if self._exc_info is not None:
  2951.   237                 try:
  2952.   238 ==>                 raise_exc_info(self._exc_info)
  2953.   239                 finally:
  2954.   240                     self = None
  2955.   241             self._check_done()
  2956.   242             return self._result
  2957.   243    
  2958.   244         def exception(self, timeout=None):
  2959. Variables:
  2960.                 self = None
  2961.              timeout = None
  2962. ------------------------------------------------------------------------
  2963. File: lib/python2.7/site-packages/tornado/gen.py (Line: 1055)
  2964. Function: run
  2965.  1048                         return
  2966.  1049                     self.future = None
  2967.  1050                     try:
  2968.  1051                         orig_stack_contexts = stack_context._state.contexts
  2969.  1052                         exc_info = None
  2970.  1053    
  2971.  1054                         try:
  2972.  1055 ==>                         value = future.result()
  2973.  1056                         except Exception:
  2974.  1057                             self.had_exception = True
  2975.  1058                             exc_info = sys.exc_info()
  2976.  1059                         future = None
  2977.  1060    
  2978.  1061                         if exc_info is not None:
  2979. Variables:
  2980.             exc_info = None
  2981.                 self = <tornado.gen.Runner object at 0x7ff19f351110>
  2982.               future = None
  2983.                    e = StopIteration()
  2984.  orig_stack_contexts = ((), None)
  2985. ------------------------------------------------------------------------
  2986. File: core/service/rpc.py (Line: 63)
  2987. Function: _call
  2988.    56                 result = yield self._call(item, *args, **kwargs)
  2989.    57                 raise tornado.gen.Return(result)
  2990.    58    
  2991.    59             def sync_wrapper(*args, **kwargs):
  2992.    60                 @tornado.gen.coroutine
  2993.    61                 def _call():
  2994.    62                     try:
  2995.    63 ==>                     r = yield self._call(item, *args, **kwargs)
  2996.    64                         result.append(r)
  2997.    65                     except tornado.gen.Return as e:
  2998.    66                         result.append(e.value)
  2999.    67                     except Exception:
  3000.    68                         error.append(sys.exc_info())
  3001.    69                     finally:
  3002. Variables:
  3003.                 args = (13, 'get_discovery_id', {}, None)
  3004.                 self = <noc.core.service.rpc.RPCProxy object at 0x7ff19f5b4d50>
  3005.               kwargs = {}
  3006.                 item = 'script'
  3007.               result = []
  3008.                error =
  3009. [(<type 'exceptions.TypeError'>,
  3010.   TypeError('unsupported type for timedelta seconds component: datetime.timedelta',),
  3011.   <traceback object at 0x7ff1a45f60e0>)]
  3012.                   ev = <threading._Event object at 0x7ff19f3516d0>
  3013. ------------------------------------------------------------------------
  3014. File: core/service/rpc.py (Line: 78)
  3015. Function: sync_wrapper
  3016.    71    
  3017.    72                 ev = threading.Event()
  3018.    73                 result = []
  3019.    74                 error = []
  3020.    75                 self._service.ioloop.add_callback(_call)
  3021.    76                 ev.wait()
  3022.    77                 if error:
  3023.    78 ==>                 six.reraise(*error[0])
  3024.    79                 else:
  3025.    80                     return result[0]
  3026.    81    
  3027.    82             if item.startswith("_"):
  3028.    83                 return self.__dict__[item]
  3029.    84             elif self._sync:
  3030. Variables:
  3031.               kwargs = {}
  3032.                 self = <noc.core.service.rpc.RPCProxy object at 0x7ff19f5b4d50>
  3033.                 args = (13, 'get_discovery_id', {}, None)
  3034.                 item = 'script'
  3035.               result = []
  3036.                error =
  3037. [(<type 'exceptions.TypeError'>,
  3038.   TypeError('unsupported type for timedelta seconds component: datetime.timedelta',),
  3039.   <traceback object at 0x7ff1a45f60e0>)]
  3040.                   ev = <threading._Event object at 0x7ff19f3516d0>
  3041.                _call = <function _call at 0x7ff19ec29398>
  3042. ------------------------------------------------------------------------
  3043. File: sa/mtmanager.py (Line: 30)
  3044. Function: run
  3045.    23             """
  3046.   24             Run SA script and wait for result
  3047.   25             """
  3048.    26             if "." in script:
  3049.    27                 # Leave only script name
  3050.    28                 script = script.split(".")[-1]
  3051.    29             return open_sync_rpc("sae", calling_service="MTManager").script(
  3052.    30 ==>             object.id, script, params, timeout
  3053.    31             )
  3054.    32    
  3055.    33    
  3056.    34     # Run single instance
  3057.    35     MTManager = MTManagerImplementation()
  3058. Variables:
  3059.                 self = <noc.sa.mtmanager.MTManagerImplementation object at 0x7ff1aa721f10>
  3060.               object = <ManagedObject: DeviceName>
  3061.               params = {}
  3062.              timeout = None
  3063.               script = 'get_discovery_id'
  3064. ------------------------------------------------------------------------
  3065. File: sa/models/managedobject.py (Line: 1172)
  3066. Function: __call__
  3067.  1165     class ScriptsProxy(object):
  3068.  1166         class CallWrapper(object):
  3069.  1167             def __init__(self, obj, name):
  3070.  1168                 self.name = name
  3071.  1169                 self.object = obj
  3072.  1170    
  3073.  1171             def __call__(self, **kwargs):
  3074.  1172 ==>             return MTManager.run(self.object, self.name, kwargs)
  3075.  1173    
  3076.  1174         def __init__(self, obj):
  3077.  1175             self._object = obj
  3078.  1176             self._cache = {}
  3079.  1177    
  3080.  1178         def __getattr__(self, name):
  3081. Variables:
  3082.                 self = <noc.sa.models.managedobject.CallWrapper object at 0x7ff1a35e4250>
  3083.               kwargs = {}
  3084. ------------------------------------------------------------------------
  3085. File: services/discovery/jobs/box/id.py (Line: 23)
  3086. Function: handler
  3087.    16         Version discovery
  3088.    17         """
  3089.   18         name = "id"
  3090.   19         required_script = "get_discovery_id"
  3091.   20    
  3092.   21         def handler(self):
  3093.   22             self.logger.info("Checking chassis id")
  3094.   23 ==>         result = self.object.scripts.get_discovery_id()
  3095.   24             cm = result.get("chassis_mac")
  3096.   25             if cm:
  3097.   26                 cm = ", ".join(
  3098.   27                     "%s - %s" % (m["first_chassis_mac"], m["last_chassis_mac"])
  3099.   28                     for m in cm
  3100.   29                 )
  3101. Variables:
  3102.                self = <noc.services.discovery.jobs.box.id.IDCheck object at 0x7ff19f29d910>
  3103. ------------------------------------------------------------------------
  3104. File: services/discovery/jobs/base.py (Line: 382)
  3105. Function: run
  3106.  375                                      self.required_script)
  3107.  376                     return
  3108.  377                 # Check required capabilities
  3109.  378                 if not self.has_required_capabilities():
  3110.  379                     return
  3111.  380                 # Run check
  3112.  381                 try:
  3113.  382 ==>                 self.handler()
  3114.  383                 except RPCRemoteError as e:
  3115.  384                     self.logger.error(
  3116.  385                         "RPC Remote error (%s): %s",
  3117.  386                         e.remote_code, e)
  3118.  387                     self.set_problem(
  3119.  388                         alarm_class=self.error_map.get(e.remote_code),
  3120. Variables:
  3121.                self = <noc.services.discovery.jobs.box.id.IDCheck object at 0x7ff19f29d910>
  3122.                   e =
  3123. TypeError('unsupported type for timedelta seconds component: datetime.timedelta',)
  3124. ------------------------------------------------------------------------
  3125. END OF TRACEBACK
  3126. 2017-07-04 10:34:45.295806 [discovery|box|DeviceName|config]  Checking config
  3127. 2017-07-04 10:34:45.297369 [discovery|box|DeviceName|config]  Set path: None
  3128. 2017-07-04 10:34:45.317250 [discovery|box|DeviceName|config]  UNHANDLED EXCEPTION (2017-07-04 10:34:45.298312)
  3129. BRANCH: feature/microservices TIP: 0db95855ccf8
  3130. PROCESS: ./services/discovery/service.py
  3131. ERROR FINGERPRINT: 63d23b53-e459-5cf6-a8b0-b3cf3621d591
  3132. WORKING DIRECTORY: /opt/noc
  3133. EXCEPTION: <type 'exceptions.TypeError'> unsupported type for timedelta seconds component: datetime.timedelta
  3134. START OF TRACEBACK
  3135. ------------------------------------------------------------------------
  3136. File: core/dcs/base.py (Line: 225)
  3137. Function: resolve
  3138.  218         @tornado.gen.coroutine
  3139.  219         def resolve(self, hint=None, wait=True, timeout=None, full_result=False):
  3140.  220             metrics["dcs.resolver.requests"] += 1
  3141.  221             if wait:
  3142.  222                 # Wait until service catalog populated
  3143.  223                 try:
  3144.  224                     yield self.ready_event.wait(
  3145.  225 ==>                     timeout=datetime.timedelta(seconds=timeout or self.dcs.DEFAULT_SERVICE_RESOLUTION_TIMEOUT)
  3146.  226                     )
  3147.  227                 except tornado.gen.TimeoutError:
  3148.  228                     metrics["dcs.resolver.errors"] += 1
  3149.  229                     raise ResolutionError()
  3150.  230             if not wait and not self.ready_event.is_set():
  3151.  231                 raise ResolutionError()
  3152. Variables:
  3153.                self = <noc.core.dcs.consuldcs.ConsulResolver object at 0x7ff1a4537e90>
  3154.                hint = None
  3155.             timeout = None
  3156.         full_result = False
  3157.                wait = True
  3158. ------------------------------------------------------------------------
  3159. File: lib/python2.7/site-packages/tornado/gen.py (Line: 307)
  3160. Function: wrapper
  3161.  300                     # Inline the first iteration of Runner.run.  This lets us
  3162.  301                     # avoid the cost of creating a Runner when the coroutine
  3163.  302                     # never actually yields, which in turn allows us to
  3164.  303                     # use "optional" coroutines in critical path code without
  3165.  304                     # performance penalty for the synchronous case.
  3166.  305                     try:
  3167.  306                         orig_stack_contexts = stack_context._state.contexts
  3168.  307 ==>                     yielded = next(result)
  3169.  308                         if stack_context._state.contexts is not orig_stack_contexts:
  3170.  309                             yielded = TracebackFuture()
  3171.  310                             yielded.set_exception(
  3172.  311                                 stack_context.StackContextInconsistentError(
  3173.  312                                     'stack_context inconsistency (probably caused '
  3174.  313                                     'by yield within a "with StackContext" block)'))
  3175. Variables:
  3176.                func = <function resolve at 0x7ff1b91302a8>
  3177.                args = (<noc.core.dcs.consuldcs.ConsulResolver object at 0x7ff1a4537e90>,)
  3178.             yielded = None
  3179.    replace_callback = True
  3180.              future = None
  3181.              result = <generator object resolve at 0x7ff19f253c30>
  3182. orig_stack_contexts = ((), None)
  3183.              kwargs = {'wait': True, 'full_result': False, 'timeout': None, 'hint': None}
  3184. ------------------------------------------------------------------------
  3185. File: lib/python2.7/site-packages/tornado/concurrent.py (Line: 238)
  3186. Function: result
  3187.  231             before the `Future` is done, so the ``timeout`` is never used.
  3188.  232             """
  3189.   233             self._clear_tb_log()
  3190.   234             if self._result is not None:
  3191.   235                 return self._result
  3192.   236             if self._exc_info is not None:
  3193.   237                 try:
  3194.   238 ==>                 raise_exc_info(self._exc_info)
  3195.   239                 finally:
  3196.   240                     self = None
  3197.   241             self._check_done()
  3198.   242             return self._result
  3199.   243    
  3200.   244         def exception(self, timeout=None):
  3201. Variables:
  3202.                 self = None
  3203.              timeout = None
  3204. ------------------------------------------------------------------------
  3205. File: lib/python2.7/site-packages/tornado/gen.py (Line: 1055)
  3206. Function: run
  3207.  1048                         return
  3208.  1049                     self.future = None
  3209.  1050                     try:
  3210.  1051                         orig_stack_contexts = stack_context._state.contexts
  3211.  1052                         exc_info = None
  3212.  1053    
  3213.  1054                         try:
  3214.  1055 ==>                         value = future.result()
  3215.  1056                         except Exception:
  3216.  1057                             self.had_exception = True
  3217.  1058                             exc_info = sys.exc_info()
  3218.  1059                         future = None
  3219.  1060    
  3220.  1061                         if exc_info is not None:
  3221. Variables:
  3222.                 self = <tornado.gen.Runner object at 0x7ff19f3513d0>
  3223.                value = <noc.core.dcs.consuldcs.ConsulResolver object at 0x7ff1a4537e90>
  3224.              yielded = None
  3225.               future = None
  3226.  orig_stack_contexts = ((), None)
  3227.             exc_info = None
  3228. ------------------------------------------------------------------------
  3229. File: core/dcs/base.py (Line: 114)
  3230. Function: resolve
  3231.   107    
  3232.   108         @tornado.gen.coroutine
  3233.   109         def resolve(self, name, hint=None, wait=True, timeout=None,
  3234.   110                     full_result=False):
  3235.   111             resolver = yield self.get_resolver(name)
  3236.   112             r = yield resolver.resolve(
  3237.   113                 hint=hint, wait=wait, timeout=timeout,
  3238.   114 ==>             full_result=full_result
  3239.   115             )
  3240.   116             raise tornado.gen.Return(r)
  3241.   117    
  3242.   118         @tornado.gen.coroutine
  3243.   119         def expire_resolvers(self):
  3244.   120             with self.resolvers_lock:
  3245. Variables:
  3246.                 name = 'sae'
  3247.                 hint = None
  3248.                 self = <noc.core.dcs.consuldcs.ConsulDCS object at 0x7ff1ae99a150>
  3249.             resolver = <noc.core.dcs.consuldcs.ConsulResolver object at 0x7ff1a4537e90>
  3250.          full_result = False
  3251.              timeout = None
  3252.                 wait = True
  3253. ------------------------------------------------------------------------
  3254. File: lib/python2.7/site-packages/tornado/gen.py (Line: 1063)
  3255. Function: run
  3256.  1056                         except Exception:
  3257.  1057                             self.had_exception = True
  3258.  1058                             exc_info = sys.exc_info()
  3259.  1059                         future = None
  3260.  1060    
  3261.  1061                         if exc_info is not None:
  3262.  1062                             try:
  3263.  1063 ==>                             yielded = self.gen.throw(*exc_info)
  3264.  1064                             finally:
  3265.  1065                                 # Break up a reference to itself
  3266.  1066                                 # for faster GC on CPython.
  3267.  1067                                 exc_info = None
  3268.  1068                         else:
  3269.  1069                             yielded = self.gen.send(value)
  3270. Variables:
  3271.                 self = <tornado.gen.Runner object at 0x7ff19f3513d0>
  3272.                value = <noc.core.dcs.consuldcs.ConsulResolver object at 0x7ff1a4537e90>
  3273.              yielded = None
  3274.               future = None
  3275.  orig_stack_contexts = ((), None)
  3276.             exc_info = None
  3277. ------------------------------------------------------------------------
  3278. File: lib/python2.7/site-packages/tornado/concurrent.py (Line: 238)
  3279. Function: result
  3280.   231             before the `Future` is done, so the ``timeout`` is never used.
  3281.   232             """
  3282.  233             self._clear_tb_log()
  3283.  234             if self._result is not None:
  3284.  235                 return self._result
  3285.  236             if self._exc_info is not None:
  3286.  237                 try:
  3287.  238 ==>                 raise_exc_info(self._exc_info)
  3288.  239                 finally:
  3289.  240                     self = None
  3290.  241             self._check_done()
  3291.  242             return self._result
  3292.  243    
  3293.  244         def exception(self, timeout=None):
  3294. Variables:
  3295.                self = None
  3296.             timeout = None
  3297. ------------------------------------------------------------------------
  3298. File: lib/python2.7/site-packages/tornado/gen.py (Line: 1055)
  3299. Function: run
  3300. 1048                         return
  3301. 1049                     self.future = None
  3302. 1050                     try:
  3303. 1051                         orig_stack_contexts = stack_context._state.contexts
  3304. 1052                         exc_info = None
  3305. 1053    
  3306. 1054                         try:
  3307. 1055 ==>                         value = future.result()
  3308. 1056                         except Exception:
  3309. 1057                             self.had_exception = True
  3310. 1058                             exc_info = sys.exc_info()
  3311. 1059                         future = None
  3312. 1060    
  3313. 1061                         if exc_info is not None:
  3314. Variables:
  3315.            exc_info = None
  3316.                self = <tornado.gen.Runner object at 0x7ff19f351410>
  3317.              future = None
  3318. orig_stack_contexts = ((), None)
  3319. ------------------------------------------------------------------------
  3320. File: core/service/rpc.py (Line: 148)
  3321. Function: _call
  3322.  141             # Get services
  3323.  142             response = None
  3324.  143             for t in self._service.iter_rpc_retry_timeout():
  3325.  144                 # Resolve service against service catalog
  3326.  145                 if self._hints:
  3327.  146                     svc = random.choice(self._hints)
  3328.  147                 else:
  3329.  148 ==>                 svc = yield self._service.dcs.resolve(self._service_name)
  3330.  149                 response = yield make_call(
  3331.  150                     "http://%s/api/%s/" % (svc, self._api),
  3332.  151                     body
  3333.  152                 )
  3334.  153                 if response:
  3335.  154                     break
  3336. Variables:
  3337.                body = '{"params":[13,"get_config",{},null],"method":"script","id":0}'
  3338.                self = <noc.core.service.rpc.RPCProxy object at 0x7ff19f351610>
  3339.                args = (13, 'get_config', {}, None)
  3340.                  t0 = 1499153685.296176
  3341.            response = None
  3342.                 tid = 0
  3343.                   t = 0.1
  3344.              kwargs = {}
  3345.                 msg = {'params': [13, 'get_config', {}, None], 'method': 'script', 'id': 0}
  3346.              method = 'script'
  3347.           make_call = <function make_call at 0x7ff19f37fc08>
  3348.           is_notify = False
  3349. ------------------------------------------------------------------------
  3350. File: lib/python2.7/site-packages/tornado/gen.py (Line: 1063)
  3351. Function: run
  3352. 1056                         except Exception:
  3353. 1057                             self.had_exception = True
  3354. 1058                             exc_info = sys.exc_info()
  3355. 1059                         future = None
  3356. 1060    
  3357. 1061                         if exc_info is not None:
  3358. 1062                             try:
  3359. 1063 ==>                             yielded = self.gen.throw(*exc_info)
  3360. 1064                             finally:
  3361. 1065                                 # Break up a reference to itself
  3362. 1066                                 # for faster GC on CPython.
  3363. 1067                                 exc_info = None
  3364. 1068                         else:
  3365. 1069                             yielded = self.gen.send(value)
  3366. Variables:
  3367.            exc_info = None
  3368.                self = <tornado.gen.Runner object at 0x7ff19f351410>
  3369.              future = None
  3370. orig_stack_contexts = ((), None)
  3371. ------------------------------------------------------------------------
  3372. File: lib/python2.7/site-packages/tornado/concurrent.py (Line: 238)
  3373. Function: result
  3374.  231             before the `Future` is done, so the ``timeout`` is never used.
  3375.  232             """
  3376.   233             self._clear_tb_log()
  3377.   234             if self._result is not None:
  3378.   235                 return self._result
  3379.   236             if self._exc_info is not None:
  3380.   237                 try:
  3381.   238 ==>                 raise_exc_info(self._exc_info)
  3382.   239                 finally:
  3383.   240                     self = None
  3384.   241             self._check_done()
  3385.   242             return self._result
  3386.   243    
  3387.   244         def exception(self, timeout=None):
  3388. Variables:
  3389.                 self = None
  3390.              timeout = None
  3391. ------------------------------------------------------------------------
  3392. File: lib/python2.7/site-packages/tornado/gen.py (Line: 1055)
  3393. Function: run
  3394.  1048                         return
  3395.  1049                     self.future = None
  3396.  1050                     try:
  3397.  1051                         orig_stack_contexts = stack_context._state.contexts
  3398.  1052                         exc_info = None
  3399.  1053    
  3400.  1054                         try:
  3401.  1055 ==>                         value = future.result()
  3402.  1056                         except Exception:
  3403.  1057                             self.had_exception = True
  3404.  1058                             exc_info = sys.exc_info()
  3405.  1059                         future = None
  3406.  1060    
  3407.  1061                         if exc_info is not None:
  3408. Variables:
  3409.             exc_info = None
  3410.                 self = <tornado.gen.Runner object at 0x7ff19f351190>
  3411.               future = None
  3412.                    e = StopIteration()
  3413.  orig_stack_contexts = ((), None)
  3414. ------------------------------------------------------------------------
  3415. File: core/service/rpc.py (Line: 63)
  3416. Function: _call
  3417.    56                 result = yield self._call(item, *args, **kwargs)
  3418.    57                 raise tornado.gen.Return(result)
  3419.    58    
  3420.    59             def sync_wrapper(*args, **kwargs):
  3421.    60                 @tornado.gen.coroutine
  3422.    61                 def _call():
  3423.    62                     try:
  3424.    63 ==>                     r = yield self._call(item, *args, **kwargs)
  3425.    64                         result.append(r)
  3426.    65                     except tornado.gen.Return as e:
  3427.    66                         result.append(e.value)
  3428.    67                     except Exception:
  3429.    68                         error.append(sys.exc_info())
  3430.    69                     finally:
  3431. Variables:
  3432.                 args = (13, 'get_config', {}, None)
  3433.                 self = <noc.core.service.rpc.RPCProxy object at 0x7ff19f351610>
  3434.               kwargs = {}
  3435.                 item = 'script'
  3436.               result = []
  3437.                error =
  3438. [(<type 'exceptions.TypeError'>,
  3439.   TypeError('unsupported type for timedelta seconds component: datetime.timedelta',),
  3440.   <traceback object at 0x7ff19f2c7a28>)]
  3441.                   ev = <threading._Event object at 0x7ff19f3512d0>
  3442. ------------------------------------------------------------------------
  3443. File: core/service/rpc.py (Line: 78)
  3444. Function: sync_wrapper
  3445.    71    
  3446.    72                 ev = threading.Event()
  3447.    73                 result = []
  3448.    74                 error = []
  3449.    75                 self._service.ioloop.add_callback(_call)
  3450.    76                 ev.wait()
  3451.    77                 if error:
  3452.    78 ==>                 six.reraise(*error[0])
  3453.    79                 else:
  3454.    80                     return result[0]
  3455.    81    
  3456.    82             if item.startswith("_"):
  3457.    83                 return self.__dict__[item]
  3458.    84             elif self._sync:
  3459. Variables:
  3460.               kwargs = {}
  3461.                 self = <noc.core.service.rpc.RPCProxy object at 0x7ff19f351610>
  3462.                 args = (13, 'get_config', {}, None)
  3463.                 item = 'script'
  3464.               result = []
  3465.                error =
  3466. [(<type 'exceptions.TypeError'>,
  3467.   TypeError('unsupported type for timedelta seconds component: datetime.timedelta',),
  3468.   <traceback object at 0x7ff19f2c7a28>)]
  3469.                   ev = <threading._Event object at 0x7ff19f3512d0>
  3470.                _call = <function _call at 0x7ff19f377f50>
  3471. ------------------------------------------------------------------------
  3472. File: sa/mtmanager.py (Line: 30)
  3473. Function: run
  3474.    23             """
  3475.   24             Run SA script and wait for result
  3476.   25             """
  3477.    26             if "." in script:
  3478.    27                 # Leave only script name
  3479.    28                 script = script.split(".")[-1]
  3480.    29             return open_sync_rpc("sae", calling_service="MTManager").script(
  3481.    30 ==>             object.id, script, params, timeout
  3482.    31             )
  3483.    32    
  3484.    33    
  3485.    34     # Run single instance
  3486.    35     MTManager = MTManagerImplementation()
  3487. Variables:
  3488.                 self = <noc.sa.mtmanager.MTManagerImplementation object at 0x7ff1aa721f10>
  3489.               object = <ManagedObject: DeviceName>
  3490.               params = {}
  3491.              timeout = None
  3492.               script = 'get_config'
  3493. ------------------------------------------------------------------------
  3494. File: sa/models/managedobject.py (Line: 1172)
  3495. Function: __call__
  3496.  1165     class ScriptsProxy(object):
  3497.  1166         class CallWrapper(object):
  3498.  1167             def __init__(self, obj, name):
  3499.  1168                 self.name = name
  3500.  1169                 self.object = obj
  3501.  1170    
  3502.  1171             def __call__(self, **kwargs):
  3503.  1172 ==>             return MTManager.run(self.object, self.name, kwargs)
  3504.  1173    
  3505.  1174         def __init__(self, obj):
  3506.  1175             self._object = obj
  3507.  1176             self._cache = {}
  3508.  1177    
  3509.  1178         def __getattr__(self, name):
  3510. Variables:
  3511.                 self = <noc.sa.models.managedobject.CallWrapper object at 0x7ff19f351710>
  3512.               kwargs = {}
  3513. ------------------------------------------------------------------------
  3514. File: services/discovery/jobs/box/config.py (Line: 22)
  3515. Function: handler
  3516.    15         Version discovery
  3517.    16         """
  3518.   17         name = "config"
  3519.   18         required_script = "get_config"
  3520.   19    
  3521.   20         def handler(self):
  3522.   21             self.logger.info("Checking config")
  3523.   22 ==>         result = self.object.scripts.get_config()
  3524.   23             self.object.save_config(result)
  3525. Variables:
  3526.                self =
  3527. <noc.services.discovery.jobs.box.config.ConfigCheck object at 0x7ff19f29d910>
  3528. ------------------------------------------------------------------------
  3529. File: services/discovery/jobs/base.py (Line: 382)
  3530. Function: run
  3531.  375                                      self.required_script)
  3532.  376                     return
  3533.  377                 # Check required capabilities
  3534.  378                 if not self.has_required_capabilities():
  3535.  379                     return
  3536.  380                 # Run check
  3537.  381                 try:
  3538.  382 ==>                 self.handler()
  3539.  383                 except RPCRemoteError as e:
  3540.  384                     self.logger.error(
  3541.  385                         "RPC Remote error (%s): %s",
  3542.  386                         e.remote_code, e)
  3543.  387                     self.set_problem(
  3544.  388                         alarm_class=self.error_map.get(e.remote_code),
  3545. Variables:
  3546.                self =
  3547. <noc.services.discovery.jobs.box.config.ConfigCheck object at 0x7ff19f29d910>
  3548.                   e =
  3549. TypeError('unsupported type for timedelta seconds component: datetime.timedelta',)
  3550. ------------------------------------------------------------------------
  3551. END OF TRACEBACK
  3552. 2017-07-04 10:34:45.322443 [discovery|box|DeviceName|asset]  Checking assets
  3553. 2017-07-04 10:34:45.324652 [discovery|box|DeviceName|asset]  Set path: None
  3554. 2017-07-04 10:34:45.343824 [discovery|box|DeviceName|asset]  UNHANDLED EXCEPTION (2017-07-04 10:34:45.325597)
  3555. BRANCH: feature/microservices TIP: 0db95855ccf8
  3556. PROCESS: ./services/discovery/service.py
  3557. ERROR FINGERPRINT: 63d23b53-e459-5cf6-a8b0-b3cf3621d591
  3558. WORKING DIRECTORY: /opt/noc
  3559. EXCEPTION: <type 'exceptions.TypeError'> unsupported type for timedelta seconds component: datetime.timedelta
  3560. START OF TRACEBACK
  3561. ------------------------------------------------------------------------
  3562. File: core/dcs/base.py (Line: 225)
  3563. Function: resolve
  3564.  218         @tornado.gen.coroutine
  3565.  219         def resolve(self, hint=None, wait=True, timeout=None, full_result=False):
  3566.  220             metrics["dcs.resolver.requests"] += 1
  3567.  221             if wait:
  3568.  222                 # Wait until service catalog populated
  3569.  223                 try:
  3570.  224                     yield self.ready_event.wait(
  3571.  225 ==>                     timeout=datetime.timedelta(seconds=timeout or self.dcs.DEFAULT_SERVICE_RESOLUTION_TIMEOUT)
  3572.  226                     )
  3573.  227                 except tornado.gen.TimeoutError:
  3574.  228                     metrics["dcs.resolver.errors"] += 1
  3575.  229                     raise ResolutionError()
  3576.  230             if not wait and not self.ready_event.is_set():
  3577.  231                 raise ResolutionError()
  3578. Variables:
  3579.                self = <noc.core.dcs.consuldcs.ConsulResolver object at 0x7ff1a4537e90>
  3580.                hint = None
  3581.             timeout = None
  3582.         full_result = False
  3583.                wait = True
  3584. ------------------------------------------------------------------------
  3585. File: lib/python2.7/site-packages/tornado/gen.py (Line: 307)
  3586. Function: wrapper
  3587.  300                     # Inline the first iteration of Runner.run.  This lets us
  3588.  301                     # avoid the cost of creating a Runner when the coroutine
  3589.  302                     # never actually yields, which in turn allows us to
  3590.  303                     # use "optional" coroutines in critical path code without
  3591.  304                     # performance penalty for the synchronous case.
  3592.  305                     try:
  3593.  306                         orig_stack_contexts = stack_context._state.contexts
  3594.  307 ==>                     yielded = next(result)
  3595.  308                         if stack_context._state.contexts is not orig_stack_contexts:
  3596.  309                             yielded = TracebackFuture()
  3597.  310                             yielded.set_exception(
  3598.  311                                 stack_context.StackContextInconsistentError(
  3599.  312                                     'stack_context inconsistency (probably caused '
  3600.  313                                     'by yield within a "with StackContext" block)'))
  3601. Variables:
  3602.                func = <function resolve at 0x7ff1b91302a8>
  3603.                args = (<noc.core.dcs.consuldcs.ConsulResolver object at 0x7ff1a4537e90>,)
  3604.             yielded = None
  3605.    replace_callback = True
  3606.              future = None
  3607.              result = <generator object resolve at 0x7ff1a8558fa0>
  3608. orig_stack_contexts = ((), None)
  3609.              kwargs = {'wait': True, 'full_result': False, 'timeout': None, 'hint': None}
  3610. ------------------------------------------------------------------------
  3611. File: lib/python2.7/site-packages/tornado/concurrent.py (Line: 238)
  3612. Function: result
  3613.  231             before the `Future` is done, so the ``timeout`` is never used.
  3614.  232             """
  3615.   233             self._clear_tb_log()
  3616.   234             if self._result is not None:
  3617.   235                 return self._result
  3618.   236             if self._exc_info is not None:
  3619.   237                 try:
  3620.   238 ==>                 raise_exc_info(self._exc_info)
  3621.   239                 finally:
  3622.   240                     self = None
  3623.   241             self._check_done()
  3624.   242             return self._result
  3625.   243    
  3626.   244         def exception(self, timeout=None):
  3627. Variables:
  3628.                 self = None
  3629.              timeout = None
  3630. ------------------------------------------------------------------------
  3631. File: lib/python2.7/site-packages/tornado/gen.py (Line: 1055)
  3632. Function: run
  3633.  1048                         return
  3634.  1049                     self.future = None
  3635.  1050                     try:
  3636.  1051                         orig_stack_contexts = stack_context._state.contexts
  3637.  1052                         exc_info = None
  3638.  1053    
  3639.  1054                         try:
  3640.  1055 ==>                         value = future.result()
  3641.  1056                         except Exception:
  3642.  1057                             self.had_exception = True
  3643.  1058                             exc_info = sys.exc_info()
  3644.  1059                         future = None
  3645.  1060    
  3646.  1061                         if exc_info is not None:
  3647. Variables:
  3648.                 self = <tornado.gen.Runner object at 0x7ff19f6f4550>
  3649.                value = <noc.core.dcs.consuldcs.ConsulResolver object at 0x7ff1a4537e90>
  3650.              yielded = None
  3651.               future = None
  3652.  orig_stack_contexts = ((), None)
  3653.             exc_info = None
  3654. ------------------------------------------------------------------------
  3655. File: core/dcs/base.py (Line: 114)
  3656. Function: resolve
  3657.   107    
  3658.   108         @tornado.gen.coroutine
  3659.   109         def resolve(self, name, hint=None, wait=True, timeout=None,
  3660.   110                     full_result=False):
  3661.   111             resolver = yield self.get_resolver(name)
  3662.   112             r = yield resolver.resolve(
  3663.   113                 hint=hint, wait=wait, timeout=timeout,
  3664.   114 ==>             full_result=full_result
  3665.   115             )
  3666.   116             raise tornado.gen.Return(r)
  3667.   117    
  3668.   118         @tornado.gen.coroutine
  3669.   119         def expire_resolvers(self):
  3670.   120             with self.resolvers_lock:
  3671. Variables:
  3672.                 name = 'sae'
  3673.                 hint = None
  3674.                 self = <noc.core.dcs.consuldcs.ConsulDCS object at 0x7ff1ae99a150>
  3675.             resolver = <noc.core.dcs.consuldcs.ConsulResolver object at 0x7ff1a4537e90>
  3676.          full_result = False
  3677.              timeout = None
  3678.                 wait = True
  3679. ------------------------------------------------------------------------
  3680. File: lib/python2.7/site-packages/tornado/gen.py (Line: 1063)
  3681. Function: run
  3682.  1056                         except Exception:
  3683.  1057                             self.had_exception = True
  3684.  1058                             exc_info = sys.exc_info()
  3685.  1059                         future = None
  3686.  1060    
  3687.  1061                         if exc_info is not None:
  3688.  1062                             try:
  3689.  1063 ==>                             yielded = self.gen.throw(*exc_info)
  3690.  1064                             finally:
  3691.  1065                                 # Break up a reference to itself
  3692.  1066                                 # for faster GC on CPython.
  3693.  1067                                 exc_info = None
  3694.  1068                         else:
  3695.  1069                             yielded = self.gen.send(value)
  3696. Variables:
  3697.                 self = <tornado.gen.Runner object at 0x7ff19f6f4550>
  3698.                value = <noc.core.dcs.consuldcs.ConsulResolver object at 0x7ff1a4537e90>
  3699.              yielded = None
  3700.               future = None
  3701.  orig_stack_contexts = ((), None)
  3702.             exc_info = None
  3703. ------------------------------------------------------------------------
  3704. File: lib/python2.7/site-packages/tornado/concurrent.py (Line: 238)
  3705. Function: result
  3706.   231             before the `Future` is done, so the ``timeout`` is never used.
  3707.   232             """
  3708.  233             self._clear_tb_log()
  3709.  234             if self._result is not None:
  3710.  235                 return self._result
  3711.  236             if self._exc_info is not None:
  3712.  237                 try:
  3713.  238 ==>                 raise_exc_info(self._exc_info)
  3714.  239                 finally:
  3715.  240                     self = None
  3716.  241             self._check_done()
  3717.  242             return self._result
  3718.  243    
  3719.  244         def exception(self, timeout=None):
  3720. Variables:
  3721.                self = None
  3722.             timeout = None
  3723. ------------------------------------------------------------------------
  3724. File: lib/python2.7/site-packages/tornado/gen.py (Line: 1055)
  3725. Function: run
  3726. 1048                         return
  3727. 1049                     self.future = None
  3728. 1050                     try:
  3729. 1051                         orig_stack_contexts = stack_context._state.contexts
  3730. 1052                         exc_info = None
  3731. 1053    
  3732. 1054                         try:
  3733. 1055 ==>                         value = future.result()
  3734. 1056                         except Exception:
  3735. 1057                             self.had_exception = True
  3736. 1058                             exc_info = sys.exc_info()
  3737. 1059                         future = None
  3738. 1060    
  3739. 1061                         if exc_info is not None:
  3740. Variables:
  3741.            exc_info = None
  3742.                self = <tornado.gen.Runner object at 0x7ff19f6f4dd0>
  3743.              future = None
  3744. orig_stack_contexts = ((), None)
  3745. ------------------------------------------------------------------------
  3746. File: core/service/rpc.py (Line: 148)
  3747. Function: _call
  3748.  141             # Get services
  3749.  142             response = None
  3750.  143             for t in self._service.iter_rpc_retry_timeout():
  3751.  144                 # Resolve service against service catalog
  3752.  145                 if self._hints:
  3753.  146                     svc = random.choice(self._hints)
  3754.  147                 else:
  3755.  148 ==>                 svc = yield self._service.dcs.resolve(self._service_name)
  3756.  149                 response = yield make_call(
  3757.  150                     "http://%s/api/%s/" % (svc, self._api),
  3758.  151                     body
  3759.  152                 )
  3760.  153                 if response:
  3761.  154                     break
  3762. Variables:
  3763.                body = '{"params":[13,"get_inventory",{},null],"method":"script","id":0}'
  3764.                self = <noc.core.service.rpc.RPCProxy object at 0x7ff19f351250>
  3765.                args = (13, 'get_inventory', {}, None)
  3766.                  t0 = 1499153685.322955
  3767.            response = None
  3768.                 tid = 0
  3769.                   t = 0.1
  3770.              kwargs = {}
  3771.                 msg = {'params': [13, 'get_inventory', {}, None], 'method': 'script', 'id': 0}
  3772.              method = 'script'
  3773.           make_call = <function make_call at 0x7ff19f54f500>
  3774.           is_notify = False
  3775. ------------------------------------------------------------------------
  3776. File: lib/python2.7/site-packages/tornado/gen.py (Line: 1063)
  3777. Function: run
  3778. 1056                         except Exception:
  3779. 1057                             self.had_exception = True
  3780. 1058                             exc_info = sys.exc_info()
  3781. 1059                         future = None
  3782. 1060    
  3783. 1061                         if exc_info is not None:
  3784. 1062                             try:
  3785. 1063 ==>                             yielded = self.gen.throw(*exc_info)
  3786. 1064                             finally:
  3787. 1065                                 # Break up a reference to itself
  3788. 1066                                 # for faster GC on CPython.
  3789. 1067                                 exc_info = None
  3790. 1068                         else:
  3791. 1069                             yielded = self.gen.send(value)
  3792. Variables:
  3793.            exc_info = None
  3794.                self = <tornado.gen.Runner object at 0x7ff19f6f4dd0>
  3795.              future = None
  3796. orig_stack_contexts = ((), None)
  3797. ------------------------------------------------------------------------
  3798. File: lib/python2.7/site-packages/tornado/concurrent.py (Line: 238)
  3799. Function: result
  3800.  231             before the `Future` is done, so the ``timeout`` is never used.
  3801.  232             """
  3802.   233             self._clear_tb_log()
  3803.   234             if self._result is not None:
  3804.   235                 return self._result
  3805.   236             if self._exc_info is not None:
  3806.   237                 try:
  3807.   238 ==>                 raise_exc_info(self._exc_info)
  3808.   239                 finally:
  3809.   240                     self = None
  3810.   241             self._check_done()
  3811.   242             return self._result
  3812.   243    
  3813.   244         def exception(self, timeout=None):
  3814. Variables:
  3815.                 self = None
  3816.              timeout = None
  3817. ------------------------------------------------------------------------
  3818. File: lib/python2.7/site-packages/tornado/gen.py (Line: 1055)
  3819. Function: run
  3820.  1048                         return
  3821.  1049                     self.future = None
  3822.  1050                     try:
  3823.  1051                         orig_stack_contexts = stack_context._state.contexts
  3824.  1052                         exc_info = None
  3825.  1053    
  3826.  1054                         try:
  3827.  1055 ==>                         value = future.result()
  3828.  1056                         except Exception:
  3829.  1057                             self.had_exception = True
  3830.  1058                             exc_info = sys.exc_info()
  3831.  1059                         future = None
  3832.  1060    
  3833.  1061                         if exc_info is not None:
  3834. Variables:
  3835.             exc_info = None
  3836.                 self = <tornado.gen.Runner object at 0x7ff19f351810>
  3837.               future = None
  3838.                    e = StopIteration()
  3839.  orig_stack_contexts = ((), None)
  3840. ------------------------------------------------------------------------
  3841. File: core/service/rpc.py (Line: 63)
  3842. Function: _call
  3843.    56                 result = yield self._call(item, *args, **kwargs)
  3844.    57                 raise tornado.gen.Return(result)
  3845.    58    
  3846.    59             def sync_wrapper(*args, **kwargs):
  3847.    60                 @tornado.gen.coroutine
  3848.    61                 def _call():
  3849.    62                     try:
  3850.    63 ==>                     r = yield self._call(item, *args, **kwargs)
  3851.    64                         result.append(r)
  3852.    65                     except tornado.gen.Return as e:
  3853.    66                         result.append(e.value)
  3854.    67                     except Exception:
  3855.    68                         error.append(sys.exc_info())
  3856.    69                     finally:
  3857. Variables:
  3858.                 args = (13, 'get_inventory', {}, None)
  3859.                 self = <noc.core.service.rpc.RPCProxy object at 0x7ff19f351250>
  3860.               kwargs = {}
  3861.                 item = 'script'
  3862.               result = []
  3863.                error =
  3864. [(<type 'exceptions.TypeError'>,
  3865.   TypeError('unsupported type for timedelta seconds component: datetime.timedelta',),
  3866.   <traceback object at 0x7ff1a45f6440>)]
  3867.                   ev = <threading._Event object at 0x7ff19f351590>
  3868. ------------------------------------------------------------------------
  3869. File: core/service/rpc.py (Line: 78)
  3870. Function: sync_wrapper
  3871.    71    
  3872.    72                 ev = threading.Event()
  3873.    73                 result = []
  3874.    74                 error = []
  3875.    75                 self._service.ioloop.add_callback(_call)
  3876.    76                 ev.wait()
  3877.    77                 if error:
  3878.    78 ==>                 six.reraise(*error[0])
  3879.    79                 else:
  3880.    80                     return result[0]
  3881.    81    
  3882.    82             if item.startswith("_"):
  3883.    83                 return self.__dict__[item]
  3884.    84             elif self._sync:
  3885. Variables:
  3886.               kwargs = {}
  3887.                 self = <noc.core.service.rpc.RPCProxy object at 0x7ff19f351250>
  3888.                 args = (13, 'get_inventory', {}, None)
  3889.                 item = 'script'
  3890.               result = []
  3891.                error =
  3892. [(<type 'exceptions.TypeError'>,
  3893.   TypeError('unsupported type for timedelta seconds component: datetime.timedelta',),
  3894.   <traceback object at 0x7ff1a45f6440>)]
  3895.                   ev = <threading._Event object at 0x7ff19f351590>
  3896.                _call = <function _call at 0x7ff1a3601578>
  3897. ------------------------------------------------------------------------
  3898. File: sa/mtmanager.py (Line: 30)
  3899. Function: run
  3900.    23             """
  3901.   24             Run SA script and wait for result
  3902.   25             """
  3903.    26             if "." in script:
  3904.    27                 # Leave only script name
  3905.    28                 script = script.split(".")[-1]
  3906.    29             return open_sync_rpc("sae", calling_service="MTManager").script(
  3907.    30 ==>             object.id, script, params, timeout
  3908.    31             )
  3909.    32    
  3910.    33    
  3911.    34     # Run single instance
  3912.    35     MTManager = MTManagerImplementation()
  3913. Variables:
  3914.                 self = <noc.sa.mtmanager.MTManagerImplementation object at 0x7ff1aa721f10>
  3915.               object = <ManagedObject: DeviceName>
  3916.               params = {}
  3917.              timeout = None
  3918.               script = 'get_inventory'
  3919. ------------------------------------------------------------------------
  3920. File: sa/models/managedobject.py (Line: 1172)
  3921. Function: __call__
  3922.  1165     class ScriptsProxy(object):
  3923.  1166         class CallWrapper(object):
  3924.  1167             def __init__(self, obj, name):
  3925.  1168                 self.name = name
  3926.  1169                 self.object = obj
  3927.  1170    
  3928.  1171             def __call__(self, **kwargs):
  3929.  1172 ==>             return MTManager.run(self.object, self.name, kwargs)
  3930.  1173    
  3931.  1174         def __init__(self, obj):
  3932.  1175             self._object = obj
  3933.  1176             self._cache = {}
  3934.  1177    
  3935.  1178         def __getattr__(self, name):
  3936. Variables:
  3937.                 self = <noc.sa.models.managedobject.CallWrapper object at 0x7ff19f351050>
  3938.               kwargs = {}
  3939. ------------------------------------------------------------------------
  3940. File: services/discovery/jobs/box/asset.py (Line: 49)
  3941. Function: handler
  3942.    42             self.stack_member = {}  # object -> stack member numbers
  3943.    43             self.managed = set()  # Object ids
  3944.    44             self.unk_model = {}  # name -> model
  3945.    45             self.lost_and_found = self.get_lost_and_found(self.object)
  3946.    46    
  3947.    47         def handler(self):
  3948.    48             self.logger.info("Checking assets")
  3949.    49 ==>         result = self.object.scripts.get_inventory()
  3950.    50             self.find_managed()
  3951.    51             # Submit objects
  3952.    52             for o in result:
  3953.    53                 self.logger.debug("Submit %s", str_dict(o))
  3954.    54                 self.submit(
  3955.    55                     type=o["type"], number=o.get("number"),
  3956. Variables:
  3957.                 self =
  3958. <noc.services.discovery.jobs.box.asset.AssetCheck object at 0x7ff19f29d910>
  3959. ------------------------------------------------------------------------
  3960. File: services/discovery/jobs/base.py (Line: 382)
  3961. Function: run
  3962.   375                                      self.required_script)
  3963.   376                     return
  3964.   377                 # Check required capabilities
  3965.   378                 if not self.has_required_capabilities():
  3966.   379                     return
  3967.   380                 # Run check
  3968.   381                 try:
  3969.   382 ==>                 self.handler()
  3970.   383                 except RPCRemoteError as e:
  3971.   384                     self.logger.error(
  3972.   385                         "RPC Remote error (%s): %s",
  3973.   386                         e.remote_code, e)
  3974.   387                     self.set_problem(
  3975.   388                         alarm_class=self.error_map.get(e.remote_code),
  3976. Variables:
  3977.                 self =
  3978. <noc.services.discovery.jobs.box.asset.AssetCheck object at 0x7ff19f29d910>
  3979.                    e =
  3980. TypeError('unsupported type for timedelta seconds component: datetime.timedelta',)
  3981. ------------------------------------------------------------------------
  3982. END OF TRACEBACK
  3983. 2017-07-04 10:34:45.345028 [discovery|box|DeviceName|vlan]  Checking vlans
  3984. 2017-07-04 10:34:45.348970 [discovery|box|DeviceName|vlan]  Set path: None
  3985. 2017-07-04 10:34:45.366055 [discovery|box|DeviceName|vlan]  UNHANDLED EXCEPTION (2017-07-04 10:34:45.349798)
  3986. BRANCH: feature/microservices TIP: 0db95855ccf8
  3987. PROCESS: ./services/discovery/service.py
  3988. ERROR FINGERPRINT: 63d23b53-e459-5cf6-a8b0-b3cf3621d591
  3989. WORKING DIRECTORY: /opt/noc
  3990. EXCEPTION: <type 'exceptions.TypeError'> unsupported type for timedelta seconds component: datetime.timedelta
  3991. START OF TRACEBACK
  3992. ------------------------------------------------------------------------
  3993. File: core/dcs/base.py (Line: 225)
  3994. Function: resolve
  3995.   218         @tornado.gen.coroutine
  3996.   219         def resolve(self, hint=None, wait=True, timeout=None, full_result=False):
  3997.   220             metrics["dcs.resolver.requests"] += 1
  3998.   221             if wait:
  3999.   222                 # Wait until service catalog populated
  4000.   223                 try:
  4001.   224                     yield self.ready_event.wait(
  4002.   225 ==>                     timeout=datetime.timedelta(seconds=timeout or self.dcs.DEFAULT_SERVICE_RESOLUTION_TIMEOUT)
  4003.   226                     )
  4004.   227                 except tornado.gen.TimeoutError:
  4005.   228                     metrics["dcs.resolver.errors"] += 1
  4006.   229                     raise ResolutionError()
  4007.   230             if not wait and not self.ready_event.is_set():
  4008.   231                 raise ResolutionError()
  4009. Variables:
  4010.                 self = <noc.core.dcs.consuldcs.ConsulResolver object at 0x7ff1a4537e90>
  4011.                 hint = None
  4012.              timeout = None
  4013.          full_result = False
  4014.                 wait = True
  4015. ------------------------------------------------------------------------
  4016. File: lib/python2.7/site-packages/tornado/gen.py (Line: 307)
  4017. Function: wrapper
  4018.   300                     # Inline the first iteration of Runner.run.  This lets us
  4019.   301                     # avoid the cost of creating a Runner when the coroutine
  4020.   302                     # never actually yields, which in turn allows us to
  4021.   303                     # use "optional" coroutines in critical path code without
  4022.   304                     # performance penalty for the synchronous case.
  4023.   305                     try:
  4024.   306                         orig_stack_contexts = stack_context._state.contexts
  4025.   307 ==>                     yielded = next(result)
  4026.   308                         if stack_context._state.contexts is not orig_stack_contexts:
  4027.   309                             yielded = TracebackFuture()
  4028.   310                             yielded.set_exception(
  4029.   311                                 stack_context.StackContextInconsistentError(
  4030.   312                                     'stack_context inconsistency (probably caused '
  4031.   313                                     'by yield within a "with StackContext" block)'))
  4032. Variables:
  4033.                 func = <function resolve at 0x7ff1b91302a8>
  4034.                 args = (<noc.core.dcs.consuldcs.ConsulResolver object at 0x7ff1a4537e90>,)
  4035.              yielded = None
  4036.     replace_callback = True
  4037.               future = None
  4038.               result = <generator object resolve at 0x7ff19f253b40>
  4039.  orig_stack_contexts = ((), None)
  4040.               kwargs = {'wait': True, 'full_result': False, 'timeout': None, 'hint': None}
  4041. ------------------------------------------------------------------------
  4042. File: lib/python2.7/site-packages/tornado/concurrent.py (Line: 238)
  4043. Function: result
  4044.   231             before the `Future` is done, so the ``timeout`` is never used.
  4045.   232             """
  4046.  233             self._clear_tb_log()
  4047.  234             if self._result is not None:
  4048.  235                 return self._result
  4049.  236             if self._exc_info is not None:
  4050.  237                 try:
  4051.  238 ==>                 raise_exc_info(self._exc_info)
  4052.  239                 finally:
  4053.  240                     self = None
  4054.  241             self._check_done()
  4055.  242             return self._result
  4056.  243    
  4057.  244         def exception(self, timeout=None):
  4058. Variables:
  4059.                self = None
  4060.             timeout = None
  4061. ------------------------------------------------------------------------
  4062. File: lib/python2.7/site-packages/tornado/gen.py (Line: 1055)
  4063. Function: run
  4064. 1048                         return
  4065. 1049                     self.future = None
  4066. 1050                     try:
  4067. 1051                         orig_stack_contexts = stack_context._state.contexts
  4068. 1052                         exc_info = None
  4069. 1053    
  4070. 1054                         try:
  4071. 1055 ==>                         value = future.result()
  4072. 1056                         except Exception:
  4073. 1057                             self.had_exception = True
  4074. 1058                             exc_info = sys.exc_info()
  4075. 1059                         future = None
  4076. 1060    
  4077. 1061                         if exc_info is not None:
  4078. Variables:
  4079.                self = <tornado.gen.Runner object at 0x7ff19f6e16d0>
  4080.               value = <noc.core.dcs.consuldcs.ConsulResolver object at 0x7ff1a4537e90>
  4081.             yielded = None
  4082.              future = None
  4083. orig_stack_contexts = ((), None)
  4084.            exc_info = None
  4085. ------------------------------------------------------------------------
  4086. File: core/dcs/base.py (Line: 114)
  4087. Function: resolve
  4088.  107    
  4089.  108         @tornado.gen.coroutine
  4090.  109         def resolve(self, name, hint=None, wait=True, timeout=None,
  4091.  110                     full_result=False):
  4092.  111             resolver = yield self.get_resolver(name)
  4093.  112             r = yield resolver.resolve(
  4094.  113                 hint=hint, wait=wait, timeout=timeout,
  4095.  114 ==>             full_result=full_result
  4096.  115             )
  4097.  116             raise tornado.gen.Return(r)
  4098.  117    
  4099.  118         @tornado.gen.coroutine
  4100.  119         def expire_resolvers(self):
  4101.  120             with self.resolvers_lock:
  4102. Variables:
  4103.                name = 'sae'
  4104.                hint = None
  4105.                self = <noc.core.dcs.consuldcs.ConsulDCS object at 0x7ff1ae99a150>
  4106.            resolver = <noc.core.dcs.consuldcs.ConsulResolver object at 0x7ff1a4537e90>
  4107.         full_result = False
  4108.             timeout = None
  4109.                wait = True
  4110. ------------------------------------------------------------------------
  4111. File: lib/python2.7/site-packages/tornado/gen.py (Line: 1063)
  4112. Function: run
  4113. 1056                         except Exception:
  4114. 1057                             self.had_exception = True
  4115. 1058                             exc_info = sys.exc_info()
  4116. 1059                         future = None
  4117. 1060    
  4118. 1061                         if exc_info is not None:
  4119. 1062                             try:
  4120. 1063 ==>                             yielded = self.gen.throw(*exc_info)
  4121. 1064                             finally:
  4122. 1065                                 # Break up a reference to itself
  4123. 1066                                 # for faster GC on CPython.
  4124. 1067                                 exc_info = None
  4125. 1068                         else:
  4126. 1069                             yielded = self.gen.send(value)
  4127. Variables:
  4128.                self = <tornado.gen.Runner object at 0x7ff19f6e16d0>
  4129.               value = <noc.core.dcs.consuldcs.ConsulResolver object at 0x7ff1a4537e90>
  4130.             yielded = None
  4131.              future = None
  4132. orig_stack_contexts = ((), None)
  4133.            exc_info = None
  4134. ------------------------------------------------------------------------
  4135. File: lib/python2.7/site-packages/tornado/concurrent.py (Line: 238)
  4136. Function: result
  4137.  231             before the `Future` is done, so the ``timeout`` is never used.
  4138.  232             """
  4139.   233             self._clear_tb_log()
  4140.   234             if self._result is not None:
  4141.   235                 return self._result
  4142.   236             if self._exc_info is not None:
  4143.   237                 try:
  4144.   238 ==>                 raise_exc_info(self._exc_info)
  4145.   239                 finally:
  4146.   240                     self = None
  4147.   241             self._check_done()
  4148.   242             return self._result
  4149.   243    
  4150.   244         def exception(self, timeout=None):
  4151. Variables:
  4152.                 self = None
  4153.              timeout = None
  4154. ------------------------------------------------------------------------
  4155. File: lib/python2.7/site-packages/tornado/gen.py (Line: 1055)
  4156. Function: run
  4157.  1048                         return
  4158.  1049                     self.future = None
  4159.  1050                     try:
  4160.  1051                         orig_stack_contexts = stack_context._state.contexts
  4161.  1052                         exc_info = None
  4162.  1053    
  4163.  1054                         try:
  4164.  1055 ==>                         value = future.result()
  4165.  1056                         except Exception:
  4166.  1057                             self.had_exception = True
  4167.  1058                             exc_info = sys.exc_info()
  4168.  1059                         future = None
  4169.  1060    
  4170.  1061                         if exc_info is not None:
  4171. Variables:
  4172.             exc_info = None
  4173.                 self = <tornado.gen.Runner object at 0x7ff19f6e1050>
  4174.               future = None
  4175.  orig_stack_contexts = ((), None)
  4176. ------------------------------------------------------------------------
  4177. File: core/service/rpc.py (Line: 148)
  4178. Function: _call
  4179.   141             # Get services
  4180.   142             response = None
  4181.   143             for t in self._service.iter_rpc_retry_timeout():
  4182.   144                 # Resolve service against service catalog
  4183.   145                 if self._hints:
  4184.   146                     svc = random.choice(self._hints)
  4185.   147                 else:
  4186.   148 ==>                 svc = yield self._service.dcs.resolve(self._service_name)
  4187.   149                 response = yield make_call(
  4188.   150                     "http://%s/api/%s/" % (svc, self._api),
  4189.   151                     body
  4190.   152                 )
  4191.   153                 if response:
  4192.   154                     break
  4193. Variables:
  4194.                 body = '{"params":[13,"get_vlans",{},null],"method":"script","id":0}'
  4195.                 self = <noc.core.service.rpc.RPCProxy object at 0x7ff1a360b250>
  4196.                 args = (13, 'get_vlans', {}, None)
  4197.                   t0 = 1499153685.347559
  4198.             response = None
  4199.                  tid = 0
  4200.                    t = 0.1
  4201.               kwargs = {}
  4202.                  msg = {'params': [13, 'get_vlans', {}, None], 'method': 'script', 'id': 0}
  4203.               method = 'script'
  4204.            make_call = <function make_call at 0x7ff19ec29398>
  4205.            is_notify = False
  4206. ------------------------------------------------------------------------
  4207. File: lib/python2.7/site-packages/tornado/gen.py (Line: 1063)
  4208. Function: run
  4209.  1056                         except Exception:
  4210.  1057                             self.had_exception = True
  4211.  1058                             exc_info = sys.exc_info()
  4212.  1059                         future = None
  4213.  1060    
  4214.  1061                         if exc_info is not None:
  4215.  1062                             try:
  4216.  1063 ==>                             yielded = self.gen.throw(*exc_info)
  4217.  1064                             finally:
  4218.  1065                                 # Break up a reference to itself
  4219.  1066                                 # for faster GC on CPython.
  4220.  1067                                 exc_info = None
  4221.  1068                         else:
  4222.  1069                             yielded = self.gen.send(value)
  4223. Variables:
  4224.             exc_info = None
  4225.                 self = <tornado.gen.Runner object at 0x7ff19f6e1050>
  4226.               future = None
  4227.  orig_stack_contexts = ((), None)
  4228. ------------------------------------------------------------------------
  4229. File: lib/python2.7/site-packages/tornado/concurrent.py (Line: 238)
  4230. Function: result
  4231.   231             before the `Future` is done, so the ``timeout`` is never used.
  4232.   232             """
  4233.  233             self._clear_tb_log()
  4234.  234             if self._result is not None:
  4235.  235                 return self._result
  4236.  236             if self._exc_info is not None:
  4237.  237                 try:
  4238.  238 ==>                 raise_exc_info(self._exc_info)
  4239.  239                 finally:
  4240.  240                     self = None
  4241.  241             self._check_done()
  4242.  242             return self._result
  4243.  243    
  4244.  244         def exception(self, timeout=None):
  4245. Variables:
  4246.                self = None
  4247.             timeout = None
  4248. ------------------------------------------------------------------------
  4249. File: lib/python2.7/site-packages/tornado/gen.py (Line: 1055)
  4250. Function: run
  4251. 1048                         return
  4252. 1049                     self.future = None
  4253. 1050                     try:
  4254. 1051                         orig_stack_contexts = stack_context._state.contexts
  4255. 1052                         exc_info = None
  4256. 1053    
  4257. 1054                         try:
  4258. 1055 ==>                         value = future.result()
  4259. 1056                         except Exception:
  4260. 1057                             self.had_exception = True
  4261. 1058                             exc_info = sys.exc_info()
  4262. 1059                         future = None
  4263. 1060    
  4264. 1061                         if exc_info is not None:
  4265. Variables:
  4266.            exc_info = None
  4267.                self = <tornado.gen.Runner object at 0x7ff19f6e14d0>
  4268.              future = None
  4269.                   e = StopIteration()
  4270. orig_stack_contexts = ((), None)
  4271. ------------------------------------------------------------------------
  4272. File: core/service/rpc.py (Line: 63)
  4273. Function: _call
  4274.   56                 result = yield self._call(item, *args, **kwargs)
  4275.   57                 raise tornado.gen.Return(result)
  4276.   58    
  4277.   59             def sync_wrapper(*args, **kwargs):
  4278.   60                 @tornado.gen.coroutine
  4279.   61                 def _call():
  4280.   62                     try:
  4281.   63 ==>                     r = yield self._call(item, *args, **kwargs)
  4282.   64                         result.append(r)
  4283.   65                     except tornado.gen.Return as e:
  4284.   66                         result.append(e.value)
  4285.   67                     except Exception:
  4286.   68                         error.append(sys.exc_info())
  4287.   69                     finally:
  4288. Variables:
  4289.                args = (13, 'get_vlans', {}, None)
  4290.                self = <noc.core.service.rpc.RPCProxy object at 0x7ff1a360b250>
  4291.              kwargs = {}
  4292.                item = 'script'
  4293.              result = []
  4294.               error =
  4295. [(<type 'exceptions.TypeError'>,
  4296.  TypeError('unsupported type for timedelta seconds component: datetime.timedelta',),
  4297.  <traceback object at 0x7ff1a3585170>)]
  4298.                  ev = <threading._Event object at 0x7ff1a360b850>
  4299. ------------------------------------------------------------------------
  4300. File: core/service/rpc.py (Line: 78)
  4301. Function: sync_wrapper
  4302.   71    
  4303.   72                 ev = threading.Event()
  4304.   73                 result = []
  4305.   74                 error = []
  4306.   75                 self._service.ioloop.add_callback(_call)
  4307.   76                 ev.wait()
  4308.   77                 if error:
  4309.   78 ==>                 six.reraise(*error[0])
  4310.   79                 else:
  4311.   80                     return result[0]
  4312.   81    
  4313.   82             if item.startswith("_"):
  4314.   83                 return self.__dict__[item]
  4315.   84             elif self._sync:
  4316. Variables:
  4317.              kwargs = {}
  4318.                self = <noc.core.service.rpc.RPCProxy object at 0x7ff1a360b250>
  4319.                args = (13, 'get_vlans', {}, None)
  4320.                item = 'script'
  4321.              result = []
  4322.               error =
  4323. [(<type 'exceptions.TypeError'>,
  4324.  TypeError('unsupported type for timedelta seconds component: datetime.timedelta',),
  4325.  <traceback object at 0x7ff1a3585170>)]
  4326.                  ev = <threading._Event object at 0x7ff1a360b850>
  4327.               _call = <function _call at 0x7ff1a3601938>
  4328. ------------------------------------------------------------------------
  4329. File: sa/mtmanager.py (Line: 30)
  4330. Function: run
  4331.   23             """
  4332.    24             Run SA script and wait for result
  4333.    25             """
  4334.   26             if "." in script:
  4335.   27                 # Leave only script name
  4336.   28                 script = script.split(".")[-1]
  4337.   29             return open_sync_rpc("sae", calling_service="MTManager").script(
  4338.   30 ==>             object.id, script, params, timeout
  4339.   31             )
  4340.   32    
  4341.   33    
  4342.   34     # Run single instance
  4343.   35     MTManager = MTManagerImplementation()
  4344. Variables:
  4345.                self = <noc.sa.mtmanager.MTManagerImplementation object at 0x7ff1aa721f10>
  4346.              object = <ManagedObject: DeviceName>
  4347.              params = {}
  4348.             timeout = None
  4349.              script = 'get_vlans'
  4350. ------------------------------------------------------------------------
  4351. File: sa/models/managedobject.py (Line: 1172)
  4352. Function: __call__
  4353. 1165     class ScriptsProxy(object):
  4354. 1166         class CallWrapper(object):
  4355. 1167             def __init__(self, obj, name):
  4356. 1168                 self.name = name
  4357. 1169                 self.object = obj
  4358. 1170    
  4359. 1171             def __call__(self, **kwargs):
  4360. 1172 ==>             return MTManager.run(self.object, self.name, kwargs)
  4361. 1173    
  4362. 1174         def __init__(self, obj):
  4363. 1175             self._object = obj
  4364. 1176             self._cache = {}
  4365. 1177    
  4366. 1178         def __getattr__(self, name):
  4367. Variables:
  4368.                self = <noc.sa.models.managedobject.CallWrapper object at 0x7ff1a35f23d0>
  4369.              kwargs = {}
  4370. ------------------------------------------------------------------------
  4371. File: services/discovery/jobs/box/vlan.py (Line: 28)
  4372. Function: handler
  4373.   21         def handler(self):
  4374.   22             self.logger.info("Checking vlans")
  4375.   23             if not self.object.vc_domain:
  4376.   24                 self.logger.info(
  4377.   25                     "No vc domain. Skipping"
  4378.   26                 )
  4379.   27                 return
  4380.   28 ==>         result = self.object.scripts.get_vlans()
  4381.   29             for v in result:
  4382.   30                 self.submit(
  4383.   31                     vc_domain=self.object.vc_domain,
  4384.   32                     l1=v["vlan_id"],
  4385.   33                     name=v.get("name")
  4386.   34                 )
  4387. Variables:
  4388.                self =
  4389. <noc.services.discovery.jobs.box.vlan.VLANCheck object at 0x7ff19f29d910>
  4390. ------------------------------------------------------------------------
  4391. File: services/discovery/jobs/base.py (Line: 382)
  4392. Function: run
  4393.  375                                      self.required_script)
  4394.  376                     return
  4395.  377                 # Check required capabilities
  4396.  378                 if not self.has_required_capabilities():
  4397.  379                     return
  4398.  380                 # Run check
  4399.  381                 try:
  4400.  382 ==>                 self.handler()
  4401.  383                 except RPCRemoteError as e:
  4402.  384                     self.logger.error(
  4403.  385                         "RPC Remote error (%s): %s",
  4404.  386                         e.remote_code, e)
  4405.  387                     self.set_problem(
  4406.  388                         alarm_class=self.error_map.get(e.remote_code),
  4407. Variables:
  4408.                self =
  4409. <noc.services.discovery.jobs.box.vlan.VLANCheck object at 0x7ff19f29d910>
  4410.                   e =
  4411. TypeError('unsupported type for timedelta seconds component: datetime.timedelta',)
  4412. ------------------------------------------------------------------------
  4413. END OF TRACEBACK
  4414. 2017-07-04 10:34:45.367193 [discovery|box|DeviceName|lacp]  Checking lacp topology
  4415. 2017-07-04 10:34:45.368881 [discovery|box|DeviceName|lacp]  Set path: None
  4416. 2017-07-04 10:34:45.396375 [discovery|box|DeviceName|lacp]  UNHANDLED EXCEPTION (2017-07-04 10:34:45.369750)
  4417. BRANCH: feature/microservices TIP: 0db95855ccf8
  4418. PROCESS: ./services/discovery/service.py
  4419. ERROR FINGERPRINT: 63d23b53-e459-5cf6-a8b0-b3cf3621d591
  4420. WORKING DIRECTORY: /opt/noc
  4421. EXCEPTION: <type 'exceptions.TypeError'> unsupported type for timedelta seconds component: datetime.timedelta
  4422. START OF TRACEBACK
  4423. ------------------------------------------------------------------------
  4424. File: core/dcs/base.py (Line: 225)
  4425. Function: resolve
  4426.  218         @tornado.gen.coroutine
  4427.  219         def resolve(self, hint=None, wait=True, timeout=None, full_result=False):
  4428.  220             metrics["dcs.resolver.requests"] += 1
  4429.  221             if wait:
  4430.  222                 # Wait until service catalog populated
  4431.  223                 try:
  4432.  224                     yield self.ready_event.wait(
  4433.  225 ==>                     timeout=datetime.timedelta(seconds=timeout or self.dcs.DEFAULT_SERVICE_RESOLUTION_TIMEOUT)
  4434.  226                     )
  4435.  227                 except tornado.gen.TimeoutError:
  4436.  228                     metrics["dcs.resolver.errors"] += 1
  4437.  229                     raise ResolutionError()
  4438.  230             if not wait and not self.ready_event.is_set():
  4439.  231                 raise ResolutionError()
  4440. Variables:
  4441.                self = <noc.core.dcs.consuldcs.ConsulResolver object at 0x7ff1a4537e90>
  4442.                hint = None
  4443.             timeout = None
  4444.         full_result = False
  4445.                wait = True
  4446. ------------------------------------------------------------------------
  4447. File: lib/python2.7/site-packages/tornado/gen.py (Line: 307)
  4448. Function: wrapper
  4449.  300                     # Inline the first iteration of Runner.run.  This lets us
  4450.  301                     # avoid the cost of creating a Runner when the coroutine
  4451.  302                     # never actually yields, which in turn allows us to
  4452.  303                     # use "optional" coroutines in critical path code without
  4453.  304                     # performance penalty for the synchronous case.
  4454.  305                     try:
  4455.  306                         orig_stack_contexts = stack_context._state.contexts
  4456.  307 ==>                     yielded = next(result)
  4457.  308                         if stack_context._state.contexts is not orig_stack_contexts:
  4458.  309                             yielded = TracebackFuture()
  4459.  310                             yielded.set_exception(
  4460.  311                                 stack_context.StackContextInconsistentError(
  4461.  312                                     'stack_context inconsistency (probably caused '
  4462.  313                                     'by yield within a "with StackContext" block)'))
  4463. Variables:
  4464.                func = <function resolve at 0x7ff1b91302a8>
  4465.                args = (<noc.core.dcs.consuldcs.ConsulResolver object at 0x7ff1a4537e90>,)
  4466.             yielded = None
  4467.    replace_callback = True
  4468.              future = None
  4469.              result = <generator object resolve at 0x7ff19f5b1320>
  4470. orig_stack_contexts = ((), None)
  4471.              kwargs = {'wait': True, 'full_result': False, 'timeout': None, 'hint': None}
  4472. ------------------------------------------------------------------------
  4473. File: lib/python2.7/site-packages/tornado/concurrent.py (Line: 238)
  4474. Function: result
  4475.  231             before the `Future` is done, so the ``timeout`` is never used.
  4476.  232             """
  4477.   233             self._clear_tb_log()
  4478.   234             if self._result is not None:
  4479.   235                 return self._result
  4480.   236             if self._exc_info is not None:
  4481.   237                 try:
  4482.   238 ==>                 raise_exc_info(self._exc_info)
  4483.   239                 finally:
  4484.   240                     self = None
  4485.   241             self._check_done()
  4486.   242             return self._result
  4487.   243    
  4488.   244         def exception(self, timeout=None):
  4489. Variables:
  4490.                 self = None
  4491.              timeout = None
  4492. ------------------------------------------------------------------------
  4493. File: lib/python2.7/site-packages/tornado/gen.py (Line: 1055)
  4494. Function: run
  4495.  1048                         return
  4496.  1049                     self.future = None
  4497.  1050                     try:
  4498.  1051                         orig_stack_contexts = stack_context._state.contexts
  4499.  1052                         exc_info = None
  4500.  1053    
  4501.  1054                         try:
  4502.  1055 ==>                         value = future.result()
  4503.  1056                         except Exception:
  4504.  1057                             self.had_exception = True
  4505.  1058                             exc_info = sys.exc_info()
  4506.  1059                         future = None
  4507.  1060    
  4508.  1061                         if exc_info is not None:
  4509. Variables:
  4510.                 self = <tornado.gen.Runner object at 0x7ff19f3514d0>
  4511.                value = <noc.core.dcs.consuldcs.ConsulResolver object at 0x7ff1a4537e90>
  4512.              yielded = None
  4513.               future = None
  4514.  orig_stack_contexts = ((), None)
  4515.             exc_info = None
  4516. ------------------------------------------------------------------------
  4517. File: core/dcs/base.py (Line: 114)
  4518. Function: resolve
  4519.   107    
  4520.   108         @tornado.gen.coroutine
  4521.   109         def resolve(self, name, hint=None, wait=True, timeout=None,
  4522.   110                     full_result=False):
  4523.   111             resolver = yield self.get_resolver(name)
  4524.   112             r = yield resolver.resolve(
  4525.   113                 hint=hint, wait=wait, timeout=timeout,
  4526.   114 ==>             full_result=full_result
  4527.   115             )
  4528.   116             raise tornado.gen.Return(r)
  4529.   117    
  4530.   118         @tornado.gen.coroutine
  4531.   119         def expire_resolvers(self):
  4532.   120             with self.resolvers_lock:
  4533. Variables:
  4534.                 name = 'sae'
  4535.                 hint = None
  4536.                 self = <noc.core.dcs.consuldcs.ConsulDCS object at 0x7ff1ae99a150>
  4537.             resolver = <noc.core.dcs.consuldcs.ConsulResolver object at 0x7ff1a4537e90>
  4538.          full_result = False
  4539.              timeout = None
  4540.                 wait = True
  4541. ------------------------------------------------------------------------
  4542. File: lib/python2.7/site-packages/tornado/gen.py (Line: 1063)
  4543. Function: run
  4544.  1056                         except Exception:
  4545.  1057                             self.had_exception = True
  4546.  1058                             exc_info = sys.exc_info()
  4547.  1059                         future = None
  4548.  1060    
  4549.  1061                         if exc_info is not None:
  4550.  1062                             try:
  4551.  1063 ==>                             yielded = self.gen.throw(*exc_info)
  4552.  1064                             finally:
  4553.  1065                                 # Break up a reference to itself
  4554.  1066                                 # for faster GC on CPython.
  4555.  1067                                 exc_info = None
  4556.  1068                         else:
  4557.  1069                             yielded = self.gen.send(value)
  4558. Variables:
  4559.                 self = <tornado.gen.Runner object at 0x7ff19f3514d0>
  4560.                value = <noc.core.dcs.consuldcs.ConsulResolver object at 0x7ff1a4537e90>
  4561.              yielded = None
  4562.               future = None
  4563.  orig_stack_contexts = ((), None)
  4564.             exc_info = None
  4565. ------------------------------------------------------------------------
  4566. File: lib/python2.7/site-packages/tornado/concurrent.py (Line: 238)
  4567. Function: result
  4568.   231             before the `Future` is done, so the ``timeout`` is never used.
  4569.   232             """
  4570.  233             self._clear_tb_log()
  4571.  234             if self._result is not None:
  4572.  235                 return self._result
  4573.  236             if self._exc_info is not None:
  4574.  237                 try:
  4575.  238 ==>                 raise_exc_info(self._exc_info)
  4576.  239                 finally:
  4577.  240                     self = None
  4578.  241             self._check_done()
  4579.  242             return self._result
  4580.  243    
  4581.  244         def exception(self, timeout=None):
  4582. Variables:
  4583.                self = None
  4584.             timeout = None
  4585. ------------------------------------------------------------------------
  4586. File: lib/python2.7/site-packages/tornado/gen.py (Line: 1055)
  4587. Function: run
  4588. 1048                         return
  4589. 1049                     self.future = None
  4590. 1050                     try:
  4591. 1051                         orig_stack_contexts = stack_context._state.contexts
  4592. 1052                         exc_info = None
  4593. 1053    
  4594. 1054                         try:
  4595. 1055 ==>                         value = future.result()
  4596. 1056                         except Exception:
  4597. 1057                             self.had_exception = True
  4598. 1058                             exc_info = sys.exc_info()
  4599. 1059                         future = None
  4600. 1060    
  4601. 1061                         if exc_info is not None:
  4602. Variables:
  4603.            exc_info = None
  4604.                self = <tornado.gen.Runner object at 0x7ff19f3518d0>
  4605.              future = None
  4606. orig_stack_contexts = ((), None)
  4607. ------------------------------------------------------------------------
  4608. File: core/service/rpc.py (Line: 148)
  4609. Function: _call
  4610.  141             # Get services
  4611.  142             response = None
  4612.  143             for t in self._service.iter_rpc_retry_timeout():
  4613.  144                 # Resolve service against service catalog
  4614.  145                 if self._hints:
  4615.  146                     svc = random.choice(self._hints)
  4616.  147                 else:
  4617.  148 ==>                 svc = yield self._service.dcs.resolve(self._service_name)
  4618.  149                 response = yield make_call(
  4619.  150                     "http://%s/api/%s/" % (svc, self._api),
  4620.  151                     body
  4621.  152                 )
  4622.  153                 if response:
  4623.  154                     break
  4624. Variables:
  4625.                body = '{"params":[13,"get_lacp_neighbors",{},null],"method":"script","id":0}'
  4626.                self = <noc.core.service.rpc.RPCProxy object at 0x7ff19f6e1a50>
  4627.                args = (13, 'get_lacp_neighbors', {}, None)
  4628.                  t0 = 1499153685.367538
  4629.            response = None
  4630.                 tid = 0
  4631.                   t = 0.1
  4632.              kwargs = {}
  4633.                 msg =
  4634. {'id': 0, 'method': 'script', 'params': [13, 'get_lacp_neighbors', {}, None]}
  4635.              method = 'script'
  4636.           make_call = <function make_call at 0x7ff1a36b19b0>
  4637.           is_notify = False
  4638. ------------------------------------------------------------------------
  4639. File: lib/python2.7/site-packages/tornado/gen.py (Line: 1063)
  4640. Function: run
  4641. 1056                         except Exception:
  4642. 1057                             self.had_exception = True
  4643. 1058                             exc_info = sys.exc_info()
  4644. 1059                         future = None
  4645. 1060    
  4646. 1061                         if exc_info is not None:
  4647. 1062                             try:
  4648. 1063 ==>                             yielded = self.gen.throw(*exc_info)
  4649. 1064                             finally:
  4650. 1065                                 # Break up a reference to itself
  4651. 1066                                 # for faster GC on CPython.
  4652. 1067                                 exc_info = None
  4653. 1068                         else:
  4654. 1069                             yielded = self.gen.send(value)
  4655. Variables:
  4656.            exc_info = None
  4657.                self = <tornado.gen.Runner object at 0x7ff19f3518d0>
  4658.              future = None
  4659. orig_stack_contexts = ((), None)
  4660. ------------------------------------------------------------------------
  4661. File: lib/python2.7/site-packages/tornado/concurrent.py (Line: 238)
  4662. Function: result
  4663.  231             before the `Future` is done, so the ``timeout`` is never used.
  4664.  232             """
  4665.   233             self._clear_tb_log()
  4666.   234             if self._result is not None:
  4667.   235                 return self._result
  4668.   236             if self._exc_info is not None:
  4669.   237                 try:
  4670.   238 ==>                 raise_exc_info(self._exc_info)
  4671.   239                 finally:
  4672.   240                     self = None
  4673.   241             self._check_done()
  4674.   242             return self._result
  4675.   243    
  4676.   244         def exception(self, timeout=None):
  4677. Variables:
  4678.                 self = None
  4679.              timeout = None
  4680. ------------------------------------------------------------------------
  4681. File: lib/python2.7/site-packages/tornado/gen.py (Line: 1055)
  4682. Function: run
  4683.  1048                         return
  4684.  1049                     self.future = None
  4685.  1050                     try:
  4686.  1051                         orig_stack_contexts = stack_context._state.contexts
  4687.  1052                         exc_info = None
  4688.  1053    
  4689.  1054                         try:
  4690.  1055 ==>                         value = future.result()
  4691.  1056                         except Exception:
  4692.  1057                             self.had_exception = True
  4693.  1058                             exc_info = sys.exc_info()
  4694.  1059                         future = None
  4695.  1060    
  4696.  1061                         if exc_info is not None:
  4697. Variables:
  4698.             exc_info = None
  4699.                 self = <tornado.gen.Runner object at 0x7ff19f702310>
  4700.               future = None
  4701.                    e = StopIteration()
  4702.  orig_stack_contexts = ((), None)
  4703. ------------------------------------------------------------------------
  4704. File: core/service/rpc.py (Line: 63)
  4705. Function: _call
  4706.    56                 result = yield self._call(item, *args, **kwargs)
  4707.    57                 raise tornado.gen.Return(result)
  4708.    58    
  4709.    59             def sync_wrapper(*args, **kwargs):
  4710.    60                 @tornado.gen.coroutine
  4711.    61                 def _call():
  4712.    62                     try:
  4713.    63 ==>                     r = yield self._call(item, *args, **kwargs)
  4714.    64                         result.append(r)
  4715.    65                     except tornado.gen.Return as e:
  4716.    66                         result.append(e.value)
  4717.    67                     except Exception:
  4718.    68                         error.append(sys.exc_info())
  4719.    69                     finally:
  4720. Variables:
  4721.                 args = (13, 'get_lacp_neighbors', {}, None)
  4722.                 self = <noc.core.service.rpc.RPCProxy object at 0x7ff19f6e1a50>
  4723.               kwargs = {}
  4724.                 item = 'script'
  4725.               result = []
  4726.                error =
  4727. [(<type 'exceptions.TypeError'>,
  4728.   TypeError('unsupported type for timedelta seconds component: datetime.timedelta',),
  4729.   <traceback object at 0x7ff1a3583d88>)]
  4730.                   ev = <threading._Event object at 0x7ff19f6e10d0>
  4731. ------------------------------------------------------------------------
  4732. File: core/service/rpc.py (Line: 78)
  4733. Function: sync_wrapper
  4734.    71    
  4735.    72                 ev = threading.Event()
  4736.    73                 result = []
  4737.    74                 error = []
  4738.    75                 self._service.ioloop.add_callback(_call)
  4739.    76                 ev.wait()
  4740.    77                 if error:
  4741.    78 ==>                 six.reraise(*error[0])
  4742.    79                 else:
  4743.    80                     return result[0]
  4744.    81    
  4745.    82             if item.startswith("_"):
  4746.    83                 return self.__dict__[item]
  4747.    84             elif self._sync:
  4748. Variables:
  4749.               kwargs = {}
  4750.                 self = <noc.core.service.rpc.RPCProxy object at 0x7ff19f6e1a50>
  4751.                 args = (13, 'get_lacp_neighbors', {}, None)
  4752.                 item = 'script'
  4753.               result = []
  4754.                error =
  4755. [(<type 'exceptions.TypeError'>,
  4756.   TypeError('unsupported type for timedelta seconds component: datetime.timedelta',),
  4757.   <traceback object at 0x7ff1a3583d88>)]
  4758.                   ev = <threading._Event object at 0x7ff19f6e10d0>
  4759.                _call = <function _call at 0x7ff1a36b1488>
  4760. ------------------------------------------------------------------------
  4761. File: sa/mtmanager.py (Line: 30)
  4762. Function: run
  4763.    23             """
  4764.   24             Run SA script and wait for result
  4765.   25             """
  4766.    26             if "." in script:
  4767.    27                 # Leave only script name
  4768.    28                 script = script.split(".")[-1]
  4769.    29             return open_sync_rpc("sae", calling_service="MTManager").script(
  4770.    30 ==>             object.id, script, params, timeout
  4771.    31             )
  4772.    32    
  4773.    33    
  4774.    34     # Run single instance
  4775.    35     MTManager = MTManagerImplementation()
  4776. Variables:
  4777.                 self = <noc.sa.mtmanager.MTManagerImplementation object at 0x7ff1aa721f10>
  4778.               object = <ManagedObject: DeviceName>
  4779.               params = {}
  4780.              timeout = None
  4781.               script = 'get_lacp_neighbors'
  4782. ------------------------------------------------------------------------
  4783. File: sa/models/managedobject.py (Line: 1172)
  4784. Function: __call__
  4785.  1165     class ScriptsProxy(object):
  4786.  1166         class CallWrapper(object):
  4787.  1167             def __init__(self, obj, name):
  4788.  1168                 self.name = name
  4789.  1169                 self.object = obj
  4790.  1170    
  4791.  1171             def __call__(self, **kwargs):
  4792.  1172 ==>             return MTManager.run(self.object, self.name, kwargs)
  4793.  1173    
  4794.  1174         def __init__(self, obj):
  4795.  1175             self._object = obj
  4796.  1176             self._cache = {}
  4797.  1177    
  4798.  1178         def __getattr__(self, name):
  4799. Variables:
  4800.                 self = <noc.sa.models.managedobject.CallWrapper object at 0x7ff19f6e1450>
  4801.               kwargs = {}
  4802. ------------------------------------------------------------------------
  4803. File: services/discovery/jobs/box/lacp.py (Line: 22)
  4804. Function: iter_neighbors
  4805.    15         CDP Topology discovery
  4806.    16         """
  4807.   17         name = "lacp"
  4808.   18         required_script = "get_lacp_neighbors"
  4809.   19         required_capabilities = ["Network | LACP"]
  4810.   20    
  4811.   21         def iter_neighbors(self, mo):
  4812.   22 ==>         result = mo.scripts.get_lacp_neighbors()
  4813.   23             for lag in result:
  4814.   24                 for n in lag["bundle"]:
  4815.   25                     self.set_interface_alias(mo, n["interface"], n["local_port_id"])
  4816.   26                     # We yield local port id instead of real name
  4817.   27                     # as we set interface alias
  4818.   28                     # Real port name will be set during clean_interface
  4819. Variables:
  4820.                  mo = <ManagedObject: DeviceName>
  4821.                self =
  4822. <noc.services.discovery.jobs.box.lacp.LACPCheck object at 0x7ff1a360b7d0>
  4823. ------------------------------------------------------------------------
  4824. File: services/discovery/jobs/base.py (Line: 593)
  4825. Function: handler
  4826.  586         def handler(self):
  4827.  587             self.logger.info("Checking %s topology", self.name)
  4828.  588             # remote object -> [(local, remote), ..]
  4829.  589             candidates = defaultdict(set)
  4830.  590             loops = {}  # first interface, second interface
  4831.  591             problems = {}
  4832.  592             # Check local side
  4833.  593 ==>         for li, ro, ri in self.iter_neighbors(self.object):
  4834.  594                 # Resolve remote object
  4835.  595                 remote_object = self.get_neighbor(ro)
  4836.  596                 if not remote_object:
  4837.  597                     problems[li] = "Remote object '%s' is not found" % str(ro)
  4838.  598                     self.logger.info(
  4839.  599                         "Remote object '%s' is not found. Skipping",
  4840. Variables:
  4841.               loops = {}
  4842.          candidates = defaultdict(<type 'set'>, {})
  4843.                self =
  4844. <noc.services.discovery.jobs.box.lacp.LACPCheck object at 0x7ff1a360b7d0>
  4845.            problems = {}
  4846. ------------------------------------------------------------------------
  4847. File: services/discovery/jobs/base.py (Line: 382)
  4848. Function: run
  4849.  375                                      self.required_script)
  4850.  376                     return
  4851.  377                 # Check required capabilities
  4852.  378                 if not self.has_required_capabilities():
  4853.  379                     return
  4854.  380                 # Run check
  4855.  381                 try:
  4856.  382 ==>                 self.handler()
  4857.  383                 except RPCRemoteError as e:
  4858.  384                     self.logger.error(
  4859.  385                         "RPC Remote error (%s): %s",
  4860.  386                         e.remote_code, e)
  4861.  387                     self.set_problem(
  4862.  388                         alarm_class=self.error_map.get(e.remote_code),
  4863. Variables:
  4864.                self =
  4865. <noc.services.discovery.jobs.box.lacp.LACPCheck object at 0x7ff1a360b7d0>
  4866.                   e =
  4867. TypeError('unsupported type for timedelta seconds component: datetime.timedelta',)
  4868. ------------------------------------------------------------------------
  4869. END OF TRACEBACK
  4870. 2017-07-04 10:34:45.397723 [discovery|box|DeviceName|udld]  Object hasn't required capability 'Network | UDLD'. Skipping
  4871. 2017-07-04 10:34:45.397968 [discovery|box|DeviceName|lldp]  Checking lldp topology
  4872. 2017-07-04 10:34:45.399667 [discovery|box|DeviceName|lldp]  Set path: None
  4873. 2017-07-04 10:34:45.420801 [discovery|box|DeviceName|lldp]  UNHANDLED EXCEPTION (2017-07-04 10:34:45.400644)
  4874. BRANCH: feature/microservices TIP: 0db95855ccf8
  4875. PROCESS: ./services/discovery/service.py
  4876. ERROR FINGERPRINT: 63d23b53-e459-5cf6-a8b0-b3cf3621d591
  4877. WORKING DIRECTORY: /opt/noc
  4878. EXCEPTION: <type 'exceptions.TypeError'> unsupported type for timedelta seconds component: datetime.timedelta
  4879. START OF TRACEBACK
  4880. ------------------------------------------------------------------------
  4881. File: core/dcs/base.py (Line: 225)
  4882. Function: resolve
  4883.  218         @tornado.gen.coroutine
  4884.  219         def resolve(self, hint=None, wait=True, timeout=None, full_result=False):
  4885.  220             metrics["dcs.resolver.requests"] += 1
  4886.  221             if wait:
  4887.  222                 # Wait until service catalog populated
  4888.  223                 try:
  4889.  224                     yield self.ready_event.wait(
  4890.  225 ==>                     timeout=datetime.timedelta(seconds=timeout or self.dcs.DEFAULT_SERVICE_RESOLUTION_TIMEOUT)
  4891.  226                     )
  4892.  227                 except tornado.gen.TimeoutError:
  4893.  228                     metrics["dcs.resolver.errors"] += 1
  4894.  229                     raise ResolutionError()
  4895.  230             if not wait and not self.ready_event.is_set():
  4896.  231                 raise ResolutionError()
  4897. Variables:
  4898.                self = <noc.core.dcs.consuldcs.ConsulResolver object at 0x7ff1a4537e90>
  4899.                hint = None
  4900.             timeout = None
  4901.         full_result = False
  4902.                wait = True
  4903. ------------------------------------------------------------------------
  4904. File: lib/python2.7/site-packages/tornado/gen.py (Line: 307)
  4905. Function: wrapper
  4906.  300                     # Inline the first iteration of Runner.run.  This lets us
  4907.  301                     # avoid the cost of creating a Runner when the coroutine
  4908.  302                     # never actually yields, which in turn allows us to
  4909.  303                     # use "optional" coroutines in critical path code without
  4910.  304                     # performance penalty for the synchronous case.
  4911.  305                     try:
  4912.  306                         orig_stack_contexts = stack_context._state.contexts
  4913.  307 ==>                     yielded = next(result)
  4914.  308                         if stack_context._state.contexts is not orig_stack_contexts:
  4915.  309                             yielded = TracebackFuture()
  4916.  310                             yielded.set_exception(
  4917.  311                                 stack_context.StackContextInconsistentError(
  4918.  312                                     'stack_context inconsistency (probably caused '
  4919.  313                                     'by yield within a "with StackContext" block)'))
  4920. Variables:
  4921.                func = <function resolve at 0x7ff1b91302a8>
  4922.                args = (<noc.core.dcs.consuldcs.ConsulResolver object at 0x7ff1a4537e90>,)
  4923.             yielded = None
  4924.    replace_callback = True
  4925.              future = None
  4926.              result = <generator object resolve at 0x7ff19f596190>
  4927. orig_stack_contexts = ((), None)
  4928.              kwargs = {'wait': True, 'full_result': False, 'timeout': None, 'hint': None}
  4929. ------------------------------------------------------------------------
  4930. File: lib/python2.7/site-packages/tornado/concurrent.py (Line: 238)
  4931. Function: result
  4932.  231             before the `Future` is done, so the ``timeout`` is never used.
  4933.  232             """
  4934.   233             self._clear_tb_log()
  4935.   234             if self._result is not None:
  4936.   235                 return self._result
  4937.   236             if self._exc_info is not None:
  4938.   237                 try:
  4939.   238 ==>                 raise_exc_info(self._exc_info)
  4940.   239                 finally:
  4941.   240                     self = None
  4942.   241             self._check_done()
  4943.   242             return self._result
  4944.   243    
  4945.   244         def exception(self, timeout=None):
  4946. Variables:
  4947.                 self = None
  4948.              timeout = None
  4949. ------------------------------------------------------------------------
  4950. File: lib/python2.7/site-packages/tornado/gen.py (Line: 1055)
  4951. Function: run
  4952.  1048                         return
  4953.  1049                     self.future = None
  4954.  1050                     try:
  4955.  1051                         orig_stack_contexts = stack_context._state.contexts
  4956.  1052                         exc_info = None
  4957.  1053    
  4958.  1054                         try:
  4959.  1055 ==>                         value = future.result()
  4960.  1056                         except Exception:
  4961.  1057                             self.had_exception = True
  4962.  1058                             exc_info = sys.exc_info()
  4963.  1059                         future = None
  4964.  1060    
  4965.  1061                         if exc_info is not None:
  4966. Variables:
  4967.                 self = <tornado.gen.Runner object at 0x7ff19f6f4f50>
  4968.                value = <noc.core.dcs.consuldcs.ConsulResolver object at 0x7ff1a4537e90>
  4969.              yielded = None
  4970.               future = None
  4971.  orig_stack_contexts = ((), None)
  4972.             exc_info = None
  4973. ------------------------------------------------------------------------
  4974. File: core/dcs/base.py (Line: 114)
  4975. Function: resolve
  4976.   107    
  4977.   108         @tornado.gen.coroutine
  4978.   109         def resolve(self, name, hint=None, wait=True, timeout=None,
  4979.   110                     full_result=False):
  4980.   111             resolver = yield self.get_resolver(name)
  4981.   112             r = yield resolver.resolve(
  4982.   113                 hint=hint, wait=wait, timeout=timeout,
  4983.   114 ==>             full_result=full_result
  4984.   115             )
  4985.   116             raise tornado.gen.Return(r)
  4986.   117    
  4987.   118         @tornado.gen.coroutine
  4988.   119         def expire_resolvers(self):
  4989.   120             with self.resolvers_lock:
  4990. Variables:
  4991.                 name = 'sae'
  4992.                 hint = None
  4993.                 self = <noc.core.dcs.consuldcs.ConsulDCS object at 0x7ff1ae99a150>
  4994.             resolver = <noc.core.dcs.consuldcs.ConsulResolver object at 0x7ff1a4537e90>
  4995.          full_result = False
  4996.              timeout = None
  4997.                 wait = True
  4998. ------------------------------------------------------------------------
  4999. File: lib/python2.7/site-packages/tornado/gen.py (Line: 1063)
  5000. Function: run
  5001.  1056                         except Exception:
  5002.  1057                             self.had_exception = True
  5003.  1058                             exc_info = sys.exc_info()
  5004.  1059                         future = None
  5005.  1060    
  5006.  1061                         if exc_info is not None:
  5007.  1062                             try:
  5008.  1063 ==>                             yielded = self.gen.throw(*exc_info)
  5009.  1064                             finally:
  5010.  1065                                 # Break up a reference to itself
  5011.  1066                                 # for faster GC on CPython.
  5012.  1067                                 exc_info = None
  5013.  1068                         else:
  5014.  1069                             yielded = self.gen.send(value)
  5015. Variables:
  5016.                 self = <tornado.gen.Runner object at 0x7ff19f6f4f50>
  5017.                value = <noc.core.dcs.consuldcs.ConsulResolver object at 0x7ff1a4537e90>
  5018.              yielded = None
  5019.               future = None
  5020.  orig_stack_contexts = ((), None)
  5021.             exc_info = None
  5022. ------------------------------------------------------------------------
  5023. File: lib/python2.7/site-packages/tornado/concurrent.py (Line: 238)
  5024. Function: result
  5025.   231             before the `Future` is done, so the ``timeout`` is never used.
  5026.   232             """
  5027.  233             self._clear_tb_log()
  5028.  234             if self._result is not None:
  5029.  235                 return self._result
  5030.  236             if self._exc_info is not None:
  5031.  237                 try:
  5032.  238 ==>                 raise_exc_info(self._exc_info)
  5033.  239                 finally:
  5034.  240                     self = None
  5035.  241             self._check_done()
  5036.  242             return self._result
  5037.  243    
  5038.  244         def exception(self, timeout=None):
  5039. Variables:
  5040.                self = None
  5041.             timeout = None
  5042. ------------------------------------------------------------------------
  5043. File: lib/python2.7/site-packages/tornado/gen.py (Line: 1055)
  5044. Function: run
  5045. 1048                         return
  5046. 1049                     self.future = None
  5047. 1050                     try:
  5048. 1051                         orig_stack_contexts = stack_context._state.contexts
  5049. 1052                         exc_info = None
  5050. 1053    
  5051. 1054                         try:
  5052. 1055 ==>                         value = future.result()
  5053. 1056                         except Exception:
  5054. 1057                             self.had_exception = True
  5055. 1058                             exc_info = sys.exc_info()
  5056. 1059                         future = None
  5057. 1060    
  5058. 1061                         if exc_info is not None:
  5059. Variables:
  5060.            exc_info = None
  5061.                self = <tornado.gen.Runner object at 0x7ff19f6f4890>
  5062.              future = None
  5063. orig_stack_contexts = ((), None)
  5064. ------------------------------------------------------------------------
  5065. File: core/service/rpc.py (Line: 148)
  5066. Function: _call
  5067.  141             # Get services
  5068.  142             response = None
  5069.  143             for t in self._service.iter_rpc_retry_timeout():
  5070.  144                 # Resolve service against service catalog
  5071.  145                 if self._hints:
  5072.  146                     svc = random.choice(self._hints)
  5073.  147                 else:
  5074.  148 ==>                 svc = yield self._service.dcs.resolve(self._service_name)
  5075.  149                 response = yield make_call(
  5076.  150                     "http://%s/api/%s/" % (svc, self._api),
  5077.  151                     body
  5078.  152                 )
  5079.  153                 if response:
  5080.  154                     break
  5081. Variables:
  5082.                body = '{"params":[13,"get_lldp_neighbors",{},null],"method":"script","id":0}'
  5083.                self = <noc.core.service.rpc.RPCProxy object at 0x7ff19f6e1390>
  5084.                args = (13, 'get_lldp_neighbors', {}, None)
  5085.                  t0 = 1499153685.398464
  5086.            response = None
  5087.                 tid = 0
  5088.                   t = 0.1
  5089.              kwargs = {}
  5090.                 msg =
  5091. {'id': 0, 'method': 'script', 'params': [13, 'get_lldp_neighbors', {}, None]}
  5092.              method = 'script'
  5093.           make_call = <function make_call at 0x7ff1a2571c08>
  5094.           is_notify = False
  5095. ------------------------------------------------------------------------
  5096. File: lib/python2.7/site-packages/tornado/gen.py (Line: 1063)
  5097. Function: run
  5098. 1056                         except Exception:
  5099. 1057                             self.had_exception = True
  5100. 1058                             exc_info = sys.exc_info()
  5101. 1059                         future = None
  5102. 1060    
  5103. 1061                         if exc_info is not None:
  5104. 1062                             try:
  5105. 1063 ==>                             yielded = self.gen.throw(*exc_info)
  5106. 1064                             finally:
  5107. 1065                                 # Break up a reference to itself
  5108. 1066                                 # for faster GC on CPython.
  5109. 1067                                 exc_info = None
  5110. 1068                         else:
  5111. 1069                             yielded = self.gen.send(value)
  5112. Variables:
  5113.            exc_info = None
  5114.                self = <tornado.gen.Runner object at 0x7ff19f6f4890>
  5115.              future = None
  5116. orig_stack_contexts = ((), None)
  5117. ------------------------------------------------------------------------
  5118. File: lib/python2.7/site-packages/tornado/concurrent.py (Line: 238)
  5119. Function: result
  5120.  231             before the `Future` is done, so the ``timeout`` is never used.
  5121.  232             """
  5122.   233             self._clear_tb_log()
  5123.   234             if self._result is not None:
  5124.   235                 return self._result
  5125.   236             if self._exc_info is not None:
  5126.   237                 try:
  5127.   238 ==>                 raise_exc_info(self._exc_info)
  5128.   239                 finally:
  5129.   240                     self = None
  5130.   241             self._check_done()
  5131.   242             return self._result
  5132.   243    
  5133.   244         def exception(self, timeout=None):
  5134. Variables:
  5135.                 self = None
  5136.              timeout = None
  5137. ------------------------------------------------------------------------
  5138. File: lib/python2.7/site-packages/tornado/gen.py (Line: 1055)
  5139. Function: run
  5140.  1048                         return
  5141.  1049                     self.future = None
  5142.  1050                     try:
  5143.  1051                         orig_stack_contexts = stack_context._state.contexts
  5144.  1052                         exc_info = None
  5145.  1053    
  5146.  1054                         try:
  5147.  1055 ==>                         value = future.result()
  5148.  1056                         except Exception:
  5149.  1057                             self.had_exception = True
  5150.  1058                             exc_info = sys.exc_info()
  5151.  1059                         future = None
  5152.  1060    
  5153.  1061                         if exc_info is not None:
  5154. Variables:
  5155.             exc_info = None
  5156.                 self = <tornado.gen.Runner object at 0x7ff19f6f4790>
  5157.               future = None
  5158.                    e = StopIteration()
  5159.  orig_stack_contexts = ((), None)
  5160. ------------------------------------------------------------------------
  5161. File: core/service/rpc.py (Line: 63)
  5162. Function: _call
  5163.    56                 result = yield self._call(item, *args, **kwargs)
  5164.    57                 raise tornado.gen.Return(result)
  5165.    58    
  5166.    59             def sync_wrapper(*args, **kwargs):
  5167.    60                 @tornado.gen.coroutine
  5168.    61                 def _call():
  5169.    62                     try:
  5170.    63 ==>                     r = yield self._call(item, *args, **kwargs)
  5171.    64                         result.append(r)
  5172.    65                     except tornado.gen.Return as e:
  5173.    66                         result.append(e.value)
  5174.    67                     except Exception:
  5175.    68                         error.append(sys.exc_info())
  5176.    69                     finally:
  5177. Variables:
  5178.                 args = (13, 'get_lldp_neighbors', {}, None)
  5179.                 self = <noc.core.service.rpc.RPCProxy object at 0x7ff19f6e1390>
  5180.               kwargs = {}
  5181.                 item = 'script'
  5182.               result = []
  5183.                error =
  5184. [(<type 'exceptions.TypeError'>,
  5185.   TypeError('unsupported type for timedelta seconds component: datetime.timedelta',),
  5186.   <traceback object at 0x7ff1a255fcb0>)]
  5187.                   ev = <threading._Event object at 0x7ff1a360b7d0>
  5188. ------------------------------------------------------------------------
  5189. File: core/service/rpc.py (Line: 78)
  5190. Function: sync_wrapper
  5191.    71    
  5192.    72                 ev = threading.Event()
  5193.    73                 result = []
  5194.    74                 error = []
  5195.    75                 self._service.ioloop.add_callback(_call)
  5196.    76                 ev.wait()
  5197.    77                 if error:
  5198.    78 ==>                 six.reraise(*error[0])
  5199.    79                 else:
  5200.    80                     return result[0]
  5201.    81    
  5202.    82             if item.startswith("_"):
  5203.    83                 return self.__dict__[item]
  5204.    84             elif self._sync:
  5205. Variables:
  5206.               kwargs = {}
  5207.                 self = <noc.core.service.rpc.RPCProxy object at 0x7ff19f6e1390>
  5208.                 args = (13, 'get_lldp_neighbors', {}, None)
  5209.                 item = 'script'
  5210.               result = []
  5211.                error =
  5212. [(<type 'exceptions.TypeError'>,
  5213.   TypeError('unsupported type for timedelta seconds component: datetime.timedelta',),
  5214.   <traceback object at 0x7ff1a255fcb0>)]
  5215.                   ev = <threading._Event object at 0x7ff1a360b7d0>
  5216.                _call = <function _call at 0x7ff1a2571d70>
  5217. ------------------------------------------------------------------------
  5218. File: sa/mtmanager.py (Line: 30)
  5219. Function: run
  5220.    23             """
  5221.   24             Run SA script and wait for result
  5222.   25             """
  5223.    26             if "." in script:
  5224.    27                 # Leave only script name
  5225.    28                 script = script.split(".")[-1]
  5226.    29             return open_sync_rpc("sae", calling_service="MTManager").script(
  5227.    30 ==>             object.id, script, params, timeout
  5228.    31             )
  5229.    32    
  5230.    33    
  5231.    34     # Run single instance
  5232.    35     MTManager = MTManagerImplementation()
  5233. Variables:
  5234.                 self = <noc.sa.mtmanager.MTManagerImplementation object at 0x7ff1aa721f10>
  5235.               object = <ManagedObject: DeviceName>
  5236.               params = {}
  5237.              timeout = None
  5238.               script = 'get_lldp_neighbors'
  5239. ------------------------------------------------------------------------
  5240. File: sa/models/managedobject.py (Line: 1172)
  5241. Function: __call__
  5242.  1165     class ScriptsProxy(object):
  5243.  1166         class CallWrapper(object):
  5244.  1167             def __init__(self, obj, name):
  5245.  1168                 self.name = name
  5246.  1169                 self.object = obj
  5247.  1170    
  5248.  1171             def __call__(self, **kwargs):
  5249.  1172 ==>             return MTManager.run(self.object, self.name, kwargs)
  5250.  1173    
  5251.  1174         def __init__(self, obj):
  5252.  1175             self._object = obj
  5253.  1176             self._cache = {}
  5254.  1177    
  5255.  1178         def __getattr__(self, name):
  5256. Variables:
  5257.                 self = <noc.sa.models.managedobject.CallWrapper object at 0x7ff19f702490>
  5258.               kwargs = {}
  5259. ------------------------------------------------------------------------
  5260. File: services/discovery/jobs/box/lldp.py (Line: 35)
  5261. Function: iter_neighbors
  5262.    28         PORT_SUBTYPE_ALIAS = 1
  5263.    29         PORT_SUBTYPE_MAC = 3
  5264.    30         PORT_SUBTYPE_NAME = 5
  5265.    31         PORT_SUBTYPE_LOCAL = 7
  5266.    32         PORT_SUBTYPE_UNSPECIFIED = 128
  5267.    33    
  5268.    34         def iter_neighbors(self, mo):
  5269.    35 ==>         result = mo.scripts.get_lldp_neighbors()
  5270.    36             self.n_cache = {}  # (chassis_id, chassis_subtype) -> object
  5271.    37             for n in result:
  5272.    38                 if len(n["neighbors"]) == 1:
  5273.    39                     nn = n["neighbors"][0]
  5274.    40                     yield n["local_interface"], nn, nn
  5275.    41    
  5276. Variables:
  5277.                   mo = <ManagedObject: DeviceName>
  5278.                 self =
  5279. <noc.services.discovery.jobs.box.lldp.LLDPCheck object at 0x7ff19f6e1550>
  5280. ------------------------------------------------------------------------
  5281. File: services/discovery/jobs/base.py (Line: 593)
  5282. Function: handler
  5283.   586         def handler(self):
  5284.   587             self.logger.info("Checking %s topology", self.name)
  5285.   588             # remote object -> [(local, remote), ..]
  5286.   589             candidates = defaultdict(set)
  5287.   590             loops = {}  # first interface, second interface
  5288.   591             problems = {}
  5289.   592             # Check local side
  5290.   593 ==>         for li, ro, ri in self.iter_neighbors(self.object):
  5291.   594                 # Resolve remote object
  5292.   595                 remote_object = self.get_neighbor(ro)
  5293.   596                 if not remote_object:
  5294.   597                     problems[li] = "Remote object '%s' is not found" % str(ro)
  5295.   598                     self.logger.info(
  5296.   599                         "Remote object '%s' is not found. Skipping",
  5297. Variables:
  5298.                loops = {}
  5299.           candidates = defaultdict(<type 'set'>, {})
  5300.                 self =
  5301. <noc.services.discovery.jobs.box.lldp.LLDPCheck object at 0x7ff19f6e1550>
  5302.             problems = {}
  5303. ------------------------------------------------------------------------
  5304. File: services/discovery/jobs/base.py (Line: 382)
  5305. Function: run
  5306.   375                                      self.required_script)
  5307.   376                     return
  5308.   377                 # Check required capabilities
  5309.   378                 if not self.has_required_capabilities():
  5310.   379                     return
  5311.   380                 # Run check
  5312.   381                 try:
  5313.   382 ==>                 self.handler()
  5314.   383                 except RPCRemoteError as e:
  5315.   384                     self.logger.error(
  5316.   385                         "RPC Remote error (%s): %s",
  5317.   386                         e.remote_code, e)
  5318.   387                     self.set_problem(
  5319.   388                         alarm_class=self.error_map.get(e.remote_code),
  5320. Variables:
  5321.                 self =
  5322. <noc.services.discovery.jobs.box.lldp.LLDPCheck object at 0x7ff19f6e1550>
  5323.                    e =
  5324. TypeError('unsupported type for timedelta seconds component: datetime.timedelta',)
  5325. ------------------------------------------------------------------------
  5326. END OF TRACEBACK
  5327. 2017-07-04 10:34:45.422218 [discovery|box|DeviceName|cdp]  Checking cdp topology
  5328. 2017-07-04 10:34:45.423831 [discovery|box|DeviceName|cdp]  Set path: None
  5329. 2017-07-04 10:34:45.444269 [discovery|box|DeviceName|cdp]  UNHANDLED EXCEPTION (2017-07-04 10:34:45.424806)
  5330. BRANCH: feature/microservices TIP: 0db95855ccf8
  5331. PROCESS: ./services/discovery/service.py
  5332. ERROR FINGERPRINT: 63d23b53-e459-5cf6-a8b0-b3cf3621d591
  5333. WORKING DIRECTORY: /opt/noc
  5334. EXCEPTION: <type 'exceptions.TypeError'> unsupported type for timedelta seconds component: datetime.timedelta
  5335. START OF TRACEBACK
  5336. ------------------------------------------------------------------------
  5337. File: core/dcs/base.py (Line: 225)
  5338. Function: resolve
  5339.   218         @tornado.gen.coroutine
  5340.   219         def resolve(self, hint=None, wait=True, timeout=None, full_result=False):
  5341.   220             metrics["dcs.resolver.requests"] += 1
  5342.   221             if wait:
  5343.   222                 # Wait until service catalog populated
  5344.   223                 try:
  5345.   224                     yield self.ready_event.wait(
  5346.   225 ==>                     timeout=datetime.timedelta(seconds=timeout or self.dcs.DEFAULT_SERVICE_RESOLUTION_TIMEOUT)
  5347.   226                     )
  5348.   227                 except tornado.gen.TimeoutError:
  5349.   228                     metrics["dcs.resolver.errors"] += 1
  5350.   229                     raise ResolutionError()
  5351.   230             if not wait and not self.ready_event.is_set():
  5352.   231                 raise ResolutionError()
  5353. Variables:
  5354.                 self = <noc.core.dcs.consuldcs.ConsulResolver object at 0x7ff1a4537e90>
  5355.                 hint = None
  5356.              timeout = None
  5357.          full_result = False
  5358.                 wait = True
  5359. ------------------------------------------------------------------------
  5360. File: lib/python2.7/site-packages/tornado/gen.py (Line: 307)
  5361. Function: wrapper
  5362.   300                     # Inline the first iteration of Runner.run.  This lets us
  5363.   301                     # avoid the cost of creating a Runner when the coroutine
  5364.   302                     # never actually yields, which in turn allows us to
  5365.   303                     # use "optional" coroutines in critical path code without
  5366.   304                     # performance penalty for the synchronous case.
  5367.   305                     try:
  5368.   306                         orig_stack_contexts = stack_context._state.contexts
  5369.   307 ==>                     yielded = next(result)
  5370.   308                         if stack_context._state.contexts is not orig_stack_contexts:
  5371.   309                             yielded = TracebackFuture()
  5372.   310                             yielded.set_exception(
  5373.   311                                 stack_context.StackContextInconsistentError(
  5374.   312                                     'stack_context inconsistency (probably caused '
  5375.   313                                     'by yield within a "with StackContext" block)'))
  5376. Variables:
  5377.                 func = <function resolve at 0x7ff1b91302a8>
  5378.                 args = (<noc.core.dcs.consuldcs.ConsulResolver object at 0x7ff1a4537e90>,)
  5379.              yielded = None
  5380.     replace_callback = True
  5381.               future = None
  5382.               result = <generator object resolve at 0x7ff1a8558140>
  5383.  orig_stack_contexts = ((), None)
  5384.               kwargs = {'wait': True, 'full_result': False, 'timeout': None, 'hint': None}
  5385. ------------------------------------------------------------------------
  5386. File: lib/python2.7/site-packages/tornado/concurrent.py (Line: 238)
  5387. Function: result
  5388.   231             before the `Future` is done, so the ``timeout`` is never used.
  5389.   232             """
  5390.  233             self._clear_tb_log()
  5391.  234             if self._result is not None:
  5392.  235                 return self._result
  5393.  236             if self._exc_info is not None:
  5394.  237                 try:
  5395.  238 ==>                 raise_exc_info(self._exc_info)
  5396.  239                 finally:
  5397.  240                     self = None
  5398.  241             self._check_done()
  5399.  242             return self._result
  5400.  243    
  5401.  244         def exception(self, timeout=None):
  5402. Variables:
  5403.                self = None
  5404.             timeout = None
  5405. ------------------------------------------------------------------------
  5406. File: lib/python2.7/site-packages/tornado/gen.py (Line: 1055)
  5407. Function: run
  5408. 1048                         return
  5409. 1049                     self.future = None
  5410. 1050                     try:
  5411. 1051                         orig_stack_contexts = stack_context._state.contexts
  5412. 1052                         exc_info = None
  5413. 1053    
  5414. 1054                         try:
  5415. 1055 ==>                         value = future.result()
  5416. 1056                         except Exception:
  5417. 1057                             self.had_exception = True
  5418. 1058                             exc_info = sys.exc_info()
  5419. 1059                         future = None
  5420. 1060    
  5421. 1061                         if exc_info is not None:
  5422. Variables:
  5423.                self = <tornado.gen.Runner object at 0x7ff19f6f48d0>
  5424.               value = <noc.core.dcs.consuldcs.ConsulResolver object at 0x7ff1a4537e90>
  5425.             yielded = None
  5426.              future = None
  5427. orig_stack_contexts = ((), None)
  5428.            exc_info = None
  5429. ------------------------------------------------------------------------
  5430. File: core/dcs/base.py (Line: 114)
  5431. Function: resolve
  5432.  107    
  5433.  108         @tornado.gen.coroutine
  5434.  109         def resolve(self, name, hint=None, wait=True, timeout=None,
  5435.  110                     full_result=False):
  5436.  111             resolver = yield self.get_resolver(name)
  5437.  112             r = yield resolver.resolve(
  5438.  113                 hint=hint, wait=wait, timeout=timeout,
  5439.  114 ==>             full_result=full_result
  5440.  115             )
  5441.  116             raise tornado.gen.Return(r)
  5442.  117    
  5443.  118         @tornado.gen.coroutine
  5444.  119         def expire_resolvers(self):
  5445.  120             with self.resolvers_lock:
  5446. Variables:
  5447.                name = 'sae'
  5448.                hint = None
  5449.                self = <noc.core.dcs.consuldcs.ConsulDCS object at 0x7ff1ae99a150>
  5450.            resolver = <noc.core.dcs.consuldcs.ConsulResolver object at 0x7ff1a4537e90>
  5451.         full_result = False
  5452.             timeout = None
  5453.                wait = True
  5454. ------------------------------------------------------------------------
  5455. File: lib/python2.7/site-packages/tornado/gen.py (Line: 1063)
  5456. Function: run
  5457. 1056                         except Exception:
  5458. 1057                             self.had_exception = True
  5459. 1058                             exc_info = sys.exc_info()
  5460. 1059                         future = None
  5461. 1060    
  5462. 1061                         if exc_info is not None:
  5463. 1062                             try:
  5464. 1063 ==>                             yielded = self.gen.throw(*exc_info)
  5465. 1064                             finally:
  5466. 1065                                 # Break up a reference to itself
  5467. 1066                                 # for faster GC on CPython.
  5468. 1067                                 exc_info = None
  5469. 1068                         else:
  5470. 1069                             yielded = self.gen.send(value)
  5471. Variables:
  5472.                self = <tornado.gen.Runner object at 0x7ff19f6f48d0>
  5473.               value = <noc.core.dcs.consuldcs.ConsulResolver object at 0x7ff1a4537e90>
  5474.             yielded = None
  5475.              future = None
  5476. orig_stack_contexts = ((), None)
  5477.            exc_info = None
  5478. ------------------------------------------------------------------------
  5479. File: lib/python2.7/site-packages/tornado/concurrent.py (Line: 238)
  5480. Function: result
  5481.  231             before the `Future` is done, so the ``timeout`` is never used.
  5482.  232             """
  5483.   233             self._clear_tb_log()
  5484.   234             if self._result is not None:
  5485.   235                 return self._result
  5486.   236             if self._exc_info is not None:
  5487.   237                 try:
  5488.   238 ==>                 raise_exc_info(self._exc_info)
  5489.   239                 finally:
  5490.   240                     self = None
  5491.   241             self._check_done()
  5492.   242             return self._result
  5493.   243    
  5494.   244         def exception(self, timeout=None):
  5495. Variables:
  5496.                 self = None
  5497.              timeout = None
  5498. ------------------------------------------------------------------------
  5499. File: lib/python2.7/site-packages/tornado/gen.py (Line: 1055)
  5500. Function: run
  5501.  1048                         return
  5502.  1049                     self.future = None
  5503.  1050                     try:
  5504.  1051                         orig_stack_contexts = stack_context._state.contexts
  5505.  1052                         exc_info = None
  5506.  1053    
  5507.  1054                         try:
  5508.  1055 ==>                         value = future.result()
  5509.  1056                         except Exception:
  5510.  1057                             self.had_exception = True
  5511.  1058                             exc_info = sys.exc_info()
  5512.  1059                         future = None
  5513.  1060    
  5514.  1061                         if exc_info is not None:
  5515. Variables:
  5516.             exc_info = None
  5517.                 self = <tornado.gen.Runner object at 0x7ff19f6f44d0>
  5518.               future = None
  5519.  orig_stack_contexts = ((), None)
  5520. ------------------------------------------------------------------------
  5521. File: core/service/rpc.py (Line: 148)
  5522. Function: _call
  5523.   141             # Get services
  5524.   142             response = None
  5525.   143             for t in self._service.iter_rpc_retry_timeout():
  5526.   144                 # Resolve service against service catalog
  5527.   145                 if self._hints:
  5528.   146                     svc = random.choice(self._hints)
  5529.   147                 else:
  5530.   148 ==>                 svc = yield self._service.dcs.resolve(self._service_name)
  5531.   149                 response = yield make_call(
  5532.   150                     "http://%s/api/%s/" % (svc, self._api),
  5533.   151                     body
  5534.   152                 )
  5535.   153                 if response:
  5536.   154                     break
  5537. Variables:
  5538.                 body = '{"params":[13,"get_cdp_neighbors",{},null],"method":"script","id":0}'
  5539.                 self = <noc.core.service.rpc.RPCProxy object at 0x7ff19f713390>
  5540.                 args = (13, 'get_cdp_neighbors', {}, None)
  5541.                   t0 = 1499153685.422671
  5542.             response = None
  5543.                  tid = 0
  5544.                    t = 0.1
  5545.               kwargs = {}
  5546.                  msg =
  5547. {'id': 0, 'method': 'script', 'params': [13, 'get_cdp_neighbors', {}, None]}
  5548.               method = 'script'
  5549.            make_call = <function make_call at 0x7ff19f29a2a8>
  5550.            is_notify = False
  5551. ------------------------------------------------------------------------
  5552. File: lib/python2.7/site-packages/tornado/gen.py (Line: 1063)
  5553. Function: run
  5554.  1056                         except Exception:
  5555.  1057                             self.had_exception = True
  5556.  1058                             exc_info = sys.exc_info()
  5557.  1059                         future = None
  5558.  1060    
  5559.  1061                         if exc_info is not None:
  5560.  1062                             try:
  5561.  1063 ==>                             yielded = self.gen.throw(*exc_info)
  5562.  1064                             finally:
  5563.  1065                                 # Break up a reference to itself
  5564.  1066                                 # for faster GC on CPython.
  5565.  1067                                 exc_info = None
  5566.  1068                         else:
  5567.  1069                             yielded = self.gen.send(value)
  5568. Variables:
  5569.             exc_info = None
  5570.                 self = <tornado.gen.Runner object at 0x7ff19f6f44d0>
  5571.               future = None
  5572.  orig_stack_contexts = ((), None)
  5573. ------------------------------------------------------------------------
  5574. File: lib/python2.7/site-packages/tornado/concurrent.py (Line: 238)
  5575. Function: result
  5576.   231             before the `Future` is done, so the ``timeout`` is never used.
  5577.   232             """
  5578.  233             self._clear_tb_log()
  5579.  234             if self._result is not None:
  5580.  235                 return self._result
  5581.  236             if self._exc_info is not None:
  5582.  237                 try:
  5583.  238 ==>                 raise_exc_info(self._exc_info)
  5584.  239                 finally:
  5585.  240                     self = None
  5586.  241             self._check_done()
  5587.  242             return self._result
  5588.  243    
  5589.  244         def exception(self, timeout=None):
  5590. Variables:
  5591.                self = None
  5592.             timeout = None
  5593. ------------------------------------------------------------------------
  5594. File: lib/python2.7/site-packages/tornado/gen.py (Line: 1055)
  5595. Function: run
  5596. 1048                         return
  5597. 1049                     self.future = None
  5598. 1050                     try:
  5599. 1051                         orig_stack_contexts = stack_context._state.contexts
  5600. 1052                         exc_info = None
  5601. 1053    
  5602. 1054                         try:
  5603. 1055 ==>                         value = future.result()
  5604. 1056                         except Exception:
  5605. 1057                             self.had_exception = True
  5606. 1058                             exc_info = sys.exc_info()
  5607. 1059                         future = None
  5608. 1060    
  5609. 1061                         if exc_info is not None:
  5610. Variables:
  5611.            exc_info = None
  5612.                self = <tornado.gen.Runner object at 0x7ff19f6f4810>
  5613.              future = None
  5614.                   e = StopIteration()
  5615. orig_stack_contexts = ((), None)
  5616. ------------------------------------------------------------------------
  5617. File: core/service/rpc.py (Line: 63)
  5618. Function: _call
  5619.   56                 result = yield self._call(item, *args, **kwargs)
  5620.   57                 raise tornado.gen.Return(result)
  5621.   58    
  5622.   59             def sync_wrapper(*args, **kwargs):
  5623.   60                 @tornado.gen.coroutine
  5624.   61                 def _call():
  5625.   62                     try:
  5626.   63 ==>                     r = yield self._call(item, *args, **kwargs)
  5627.   64                         result.append(r)
  5628.   65                     except tornado.gen.Return as e:
  5629.   66                         result.append(e.value)
  5630.   67                     except Exception:
  5631.   68                         error.append(sys.exc_info())
  5632.   69                     finally:
  5633. Variables:
  5634.                args = (13, 'get_cdp_neighbors', {}, None)
  5635.                self = <noc.core.service.rpc.RPCProxy object at 0x7ff19f713390>
  5636.              kwargs = {}
  5637.                item = 'script'
  5638.              result = []
  5639.               error =
  5640. [(<type 'exceptions.TypeError'>,
  5641.  TypeError('unsupported type for timedelta seconds component: datetime.timedelta',),
  5642.  <traceback object at 0x7ff19f5464d0>)]
  5643.                  ev = <threading._Event object at 0x7ff19f7136d0>
  5644. ------------------------------------------------------------------------
  5645. File: core/service/rpc.py (Line: 78)
  5646. Function: sync_wrapper
  5647.   71    
  5648.   72                 ev = threading.Event()
  5649.   73                 result = []
  5650.   74                 error = []
  5651.   75                 self._service.ioloop.add_callback(_call)
  5652.   76                 ev.wait()
  5653.   77                 if error:
  5654.   78 ==>                 six.reraise(*error[0])
  5655.   79                 else:
  5656.   80                     return result[0]
  5657.   81    
  5658.   82             if item.startswith("_"):
  5659.   83                 return self.__dict__[item]
  5660.   84             elif self._sync:
  5661. Variables:
  5662.              kwargs = {}
  5663.                self = <noc.core.service.rpc.RPCProxy object at 0x7ff19f713390>
  5664.                args = (13, 'get_cdp_neighbors', {}, None)
  5665.                item = 'script'
  5666.              result = []
  5667.               error =
  5668. [(<type 'exceptions.TypeError'>,
  5669.  TypeError('unsupported type for timedelta seconds component: datetime.timedelta',),
  5670.  <traceback object at 0x7ff19f5464d0>)]
  5671.                  ev = <threading._Event object at 0x7ff19f7136d0>
  5672.               _call = <function _call at 0x7ff19f54f320>
  5673. ------------------------------------------------------------------------
  5674. File: sa/mtmanager.py (Line: 30)
  5675. Function: run
  5676.   23             """
  5677.    24             Run SA script and wait for result
  5678.    25             """
  5679.   26             if "." in script:
  5680.   27                 # Leave only script name
  5681.   28                 script = script.split(".")[-1]
  5682.   29             return open_sync_rpc("sae", calling_service="MTManager").script(
  5683.   30 ==>             object.id, script, params, timeout
  5684.   31             )
  5685.   32    
  5686.   33    
  5687.   34     # Run single instance
  5688.   35     MTManager = MTManagerImplementation()
  5689. Variables:
  5690.                self = <noc.sa.mtmanager.MTManagerImplementation object at 0x7ff1aa721f10>
  5691.              object = <ManagedObject: DeviceName>
  5692.              params = {}
  5693.             timeout = None
  5694.              script = 'get_cdp_neighbors'
  5695. ------------------------------------------------------------------------
  5696. File: sa/models/managedobject.py (Line: 1172)
  5697. Function: __call__
  5698. 1165     class ScriptsProxy(object):
  5699. 1166         class CallWrapper(object):
  5700. 1167             def __init__(self, obj, name):
  5701. 1168                 self.name = name
  5702. 1169                 self.object = obj
  5703. 1170    
  5704. 1171             def __call__(self, **kwargs):
  5705. 1172 ==>             return MTManager.run(self.object, self.name, kwargs)
  5706. 1173    
  5707. 1174         def __init__(self, obj):
  5708. 1175             self._object = obj
  5709. 1176             self._cache = {}
  5710. 1177    
  5711. 1178         def __getattr__(self, name):
  5712. Variables:
  5713.                self = <noc.sa.models.managedobject.CallWrapper object at 0x7ff19f713b10>
  5714.              kwargs = {}
  5715. ------------------------------------------------------------------------
  5716. File: services/discovery/jobs/box/cdp.py (Line: 25)
  5717. Function: iter_neighbors
  5718.   18         name = "cdp"
  5719.   19         required_script = "get_cdp_neighbors"
  5720.   20         required_capabilities = ["Network | CDP"]
  5721.   21    
  5722.   22         RESERVED_NAMES = set(["Switch", "Router", "MikroTik"])
  5723.   23    
  5724.   24         def iter_neighbors(self, mo):
  5725.   25 ==>         result = mo.scripts.get_cdp_neighbors()
  5726.   26             for n in result["neighbors"]:
  5727.   27                 device_id = n["device_id"]
  5728.   28                 if device_id in self.RESERVED_NAMES and n.get("remote_ip"):
  5729.   29                     device_id = n["remote_ip"]
  5730.   30                 yield (
  5731.   31                     n["local_interface"],
  5732. Variables:
  5733.                  mo = <ManagedObject: DeviceName>
  5734.                self = <noc.services.discovery.jobs.box.cdp.CDPCheck object at 0x7ff19f6ee250>
  5735. ------------------------------------------------------------------------
  5736. File: services/discovery/jobs/base.py (Line: 593)
  5737. Function: handler
  5738.  586         def handler(self):
  5739.  587             self.logger.info("Checking %s topology", self.name)
  5740.  588             # remote object -> [(local, remote), ..]
  5741.  589             candidates = defaultdict(set)
  5742.  590             loops = {}  # first interface, second interface
  5743.  591             problems = {}
  5744.  592             # Check local side
  5745.  593 ==>         for li, ro, ri in self.iter_neighbors(self.object):
  5746.  594                 # Resolve remote object
  5747.  595                 remote_object = self.get_neighbor(ro)
  5748.  596                 if not remote_object:
  5749.  597                     problems[li] = "Remote object '%s' is not found" % str(ro)
  5750.  598                     self.logger.info(
  5751.  599                         "Remote object '%s' is not found. Skipping",
  5752. Variables:
  5753.               loops = {}
  5754.          candidates = defaultdict(<type 'set'>, {})
  5755.                self = <noc.services.discovery.jobs.box.cdp.CDPCheck object at 0x7ff19f6ee250>
  5756.            problems = {}
  5757. ------------------------------------------------------------------------
  5758. File: services/discovery/jobs/base.py (Line: 382)
  5759. Function: run
  5760.  375                                      self.required_script)
  5761.  376                     return
  5762.  377                 # Check required capabilities
  5763.  378                 if not self.has_required_capabilities():
  5764.  379                     return
  5765.  380                 # Run check
  5766.  381                 try:
  5767.  382 ==>                 self.handler()
  5768.  383                 except RPCRemoteError as e:
  5769.  384                     self.logger.error(
  5770.  385                         "RPC Remote error (%s): %s",
  5771.  386                         e.remote_code, e)
  5772.  387                     self.set_problem(
  5773.  388                         alarm_class=self.error_map.get(e.remote_code),
  5774. Variables:
  5775.                self = <noc.services.discovery.jobs.box.cdp.CDPCheck object at 0x7ff19f6ee250>
  5776.                   e =
  5777. TypeError('unsupported type for timedelta seconds component: datetime.timedelta',)
  5778. ------------------------------------------------------------------------
  5779. END OF TRACEBACK
  5780. 2017-07-04 10:34:45.445635 [discovery|box|DeviceName|stp]  Checking stp topology
  5781. 2017-07-04 10:34:45.447470 [discovery|box|DeviceName|stp]  Set path: None
  5782. 2017-07-04 10:34:45.475260 [discovery|box|DeviceName|stp]  UNHANDLED EXCEPTION (2017-07-04 10:34:45.448721)
  5783. BRANCH: feature/microservices TIP: 0db95855ccf8
  5784. PROCESS: ./services/discovery/service.py
  5785. ERROR FINGERPRINT: 63d23b53-e459-5cf6-a8b0-b3cf3621d591
  5786. WORKING DIRECTORY: /opt/noc
  5787. EXCEPTION: <type 'exceptions.TypeError'> unsupported type for timedelta seconds component: datetime.timedelta
  5788. START OF TRACEBACK
  5789. ------------------------------------------------------------------------
  5790. File: core/dcs/base.py (Line: 225)
  5791. Function: resolve
  5792.  218         @tornado.gen.coroutine
  5793.  219         def resolve(self, hint=None, wait=True, timeout=None, full_result=False):
  5794.  220             metrics["dcs.resolver.requests"] += 1
  5795.  221             if wait:
  5796.  222                 # Wait until service catalog populated
  5797.  223                 try:
  5798.  224                     yield self.ready_event.wait(
  5799.  225 ==>                     timeout=datetime.timedelta(seconds=timeout or self.dcs.DEFAULT_SERVICE_RESOLUTION_TIMEOUT)
  5800.  226                     )
  5801.  227                 except tornado.gen.TimeoutError:
  5802.  228                     metrics["dcs.resolver.errors"] += 1
  5803.  229                     raise ResolutionError()
  5804.  230             if not wait and not self.ready_event.is_set():
  5805.  231                 raise ResolutionError()
  5806. Variables:
  5807.                self = <noc.core.dcs.consuldcs.ConsulResolver object at 0x7ff1a4537e90>
  5808.                hint = None
  5809.             timeout = None
  5810.         full_result = False
  5811.                wait = True
  5812. ------------------------------------------------------------------------
  5813. File: lib/python2.7/site-packages/tornado/gen.py (Line: 307)
  5814. Function: wrapper
  5815.  300                     # Inline the first iteration of Runner.run.  This lets us
  5816.  301                     # avoid the cost of creating a Runner when the coroutine
  5817.  302                     # never actually yields, which in turn allows us to
  5818.  303                     # use "optional" coroutines in critical path code without
  5819.  304                     # performance penalty for the synchronous case.
  5820.  305                     try:
  5821.  306                         orig_stack_contexts = stack_context._state.contexts
  5822.  307 ==>                     yielded = next(result)
  5823.  308                         if stack_context._state.contexts is not orig_stack_contexts:
  5824.  309                             yielded = TracebackFuture()
  5825.  310                             yielded.set_exception(
  5826.  311                                 stack_context.StackContextInconsistentError(
  5827.  312                                     'stack_context inconsistency (probably caused '
  5828.  313                                     'by yield within a "with StackContext" block)'))
  5829. Variables:
  5830.                func = <function resolve at 0x7ff1b91302a8>
  5831.                args = (<noc.core.dcs.consuldcs.ConsulResolver object at 0x7ff1a4537e90>,)
  5832.             yielded = None
  5833.    replace_callback = True
  5834.              future = None
  5835.              result = <generator object resolve at 0x7ff19f5b14b0>
  5836. orig_stack_contexts = ((), None)
  5837.              kwargs = {'wait': True, 'full_result': False, 'timeout': None, 'hint': None}
  5838. ------------------------------------------------------------------------
  5839. File: lib/python2.7/site-packages/tornado/concurrent.py (Line: 238)
  5840. Function: result
  5841.  231             before the `Future` is done, so the ``timeout`` is never used.
  5842.  232             """
  5843.   233             self._clear_tb_log()
  5844.   234             if self._result is not None:
  5845.   235                 return self._result
  5846.   236             if self._exc_info is not None:
  5847.   237                 try:
  5848.   238 ==>                 raise_exc_info(self._exc_info)
  5849.   239                 finally:
  5850.   240                     self = None
  5851.   241             self._check_done()
  5852.   242             return self._result
  5853.   243    
  5854.   244         def exception(self, timeout=None):
  5855. Variables:
  5856.                 self = None
  5857.              timeout = None
  5858. ------------------------------------------------------------------------
  5859. File: lib/python2.7/site-packages/tornado/gen.py (Line: 1055)
  5860. Function: run
  5861.  1048                         return
  5862.  1049                     self.future = None
  5863.  1050                     try:
  5864.  1051                         orig_stack_contexts = stack_context._state.contexts
  5865.  1052                         exc_info = None
  5866.  1053    
  5867.  1054                         try:
  5868.  1055 ==>                         value = future.result()
  5869.  1056                         except Exception:
  5870.  1057                             self.had_exception = True
  5871.  1058                             exc_info = sys.exc_info()
  5872.  1059                         future = None
  5873.  1060    
  5874.  1061                         if exc_info is not None:
  5875. Variables:
  5876.                 self = <tornado.gen.Runner object at 0x7ff19f6f4210>
  5877.                value = <noc.core.dcs.consuldcs.ConsulResolver object at 0x7ff1a4537e90>
  5878.              yielded = None
  5879.               future = None
  5880.  orig_stack_contexts = ((), None)
  5881.             exc_info = None
  5882. ------------------------------------------------------------------------
  5883. File: core/dcs/base.py (Line: 114)
  5884. Function: resolve
  5885.   107    
  5886.   108         @tornado.gen.coroutine
  5887.   109         def resolve(self, name, hint=None, wait=True, timeout=None,
  5888.   110                     full_result=False):
  5889.   111             resolver = yield self.get_resolver(name)
  5890.   112             r = yield resolver.resolve(
  5891.   113                 hint=hint, wait=wait, timeout=timeout,
  5892.   114 ==>             full_result=full_result
  5893.   115             )
  5894.   116             raise tornado.gen.Return(r)
  5895.   117    
  5896.   118         @tornado.gen.coroutine
  5897.   119         def expire_resolvers(self):
  5898.   120             with self.resolvers_lock:
  5899. Variables:
  5900.                 name = 'sae'
  5901.                 hint = None
  5902.                 self = <noc.core.dcs.consuldcs.ConsulDCS object at 0x7ff1ae99a150>
  5903.             resolver = <noc.core.dcs.consuldcs.ConsulResolver object at 0x7ff1a4537e90>
  5904.          full_result = False
  5905.              timeout = None
  5906.                 wait = True
  5907. ------------------------------------------------------------------------
  5908. File: lib/python2.7/site-packages/tornado/gen.py (Line: 1063)
  5909. Function: run
  5910.  1056                         except Exception:
  5911.  1057                             self.had_exception = True
  5912.  1058                             exc_info = sys.exc_info()
  5913.  1059                         future = None
  5914.  1060    
  5915.  1061                         if exc_info is not None:
  5916.  1062                             try:
  5917.  1063 ==>                             yielded = self.gen.throw(*exc_info)
  5918.  1064                             finally:
  5919.  1065                                 # Break up a reference to itself
  5920.  1066                                 # for faster GC on CPython.
  5921.  1067                                 exc_info = None
  5922.  1068                         else:
  5923.  1069                             yielded = self.gen.send(value)
  5924. Variables:
  5925.                 self = <tornado.gen.Runner object at 0x7ff19f6f4210>
  5926.                value = <noc.core.dcs.consuldcs.ConsulResolver object at 0x7ff1a4537e90>
  5927.              yielded = None
  5928.               future = None
  5929.  orig_stack_contexts = ((), None)
  5930.             exc_info = None
  5931. ------------------------------------------------------------------------
  5932. File: lib/python2.7/site-packages/tornado/concurrent.py (Line: 238)
  5933. Function: result
  5934.   231             before the `Future` is done, so the ``timeout`` is never used.
  5935.   232             """
  5936.  233             self._clear_tb_log()
  5937.  234             if self._result is not None:
  5938.  235                 return self._result
  5939.  236             if self._exc_info is not None:
  5940.  237                 try:
  5941.  238 ==>                 raise_exc_info(self._exc_info)
  5942.  239                 finally:
  5943.  240                     self = None
  5944.  241             self._check_done()
  5945.  242             return self._result
  5946.  243    
  5947.  244         def exception(self, timeout=None):
  5948. Variables:
  5949.                self = None
  5950.             timeout = None
  5951. ------------------------------------------------------------------------
  5952. File: lib/python2.7/site-packages/tornado/gen.py (Line: 1055)
  5953. Function: run
  5954. 1048                         return
  5955. 1049                     self.future = None
  5956. 1050                     try:
  5957. 1051                         orig_stack_contexts = stack_context._state.contexts
  5958. 1052                         exc_info = None
  5959. 1053    
  5960. 1054                         try:
  5961. 1055 ==>                         value = future.result()
  5962. 1056                         except Exception:
  5963. 1057                             self.had_exception = True
  5964. 1058                             exc_info = sys.exc_info()
  5965. 1059                         future = None
  5966. 1060    
  5967. 1061                         if exc_info is not None:
  5968. Variables:
  5969.            exc_info = None
  5970.                self = <tornado.gen.Runner object at 0x7ff19f6f4610>
  5971.              future = None
  5972. orig_stack_contexts = ((), None)
  5973. ------------------------------------------------------------------------
  5974. File: core/service/rpc.py (Line: 148)
  5975. Function: _call
  5976.  141             # Get services
  5977.  142             response = None
  5978.  143             for t in self._service.iter_rpc_retry_timeout():
  5979.  144                 # Resolve service against service catalog
  5980.  145                 if self._hints:
  5981.  146                     svc = random.choice(self._hints)
  5982.  147                 else:
  5983.  148 ==>                 svc = yield self._service.dcs.resolve(self._service_name)
  5984.  149                 response = yield make_call(
  5985.  150                     "http://%s/api/%s/" % (svc, self._api),
  5986.  151                     body
  5987.  152                 )
  5988.  153                 if response:
  5989.  154                     break
  5990. Variables:
  5991.                body = '{"params":[13,"get_spanning_tree",{},null],"method":"script","id":0}'
  5992.                self = <noc.core.service.rpc.RPCProxy object at 0x7ff19f6f46d0>
  5993.                args = (13, 'get_spanning_tree', {}, None)
  5994.                  t0 = 1499153685.446104
  5995.            response = None
  5996.                 tid = 0
  5997.                   t = 0.1
  5998.              kwargs = {}
  5999.                 msg =
  6000. {'id': 0, 'method': 'script', 'params': [13, 'get_spanning_tree', {}, None]}
  6001.              method = 'script'
  6002.           make_call = <function make_call at 0x7ff19f37f410>
  6003.           is_notify = False
  6004. ------------------------------------------------------------------------
  6005. File: lib/python2.7/site-packages/tornado/gen.py (Line: 1063)
  6006. Function: run
  6007. 1056                         except Exception:
  6008. 1057                             self.had_exception = True
  6009. 1058                             exc_info = sys.exc_info()
  6010. 1059                         future = None
  6011. 1060    
  6012. 1061                         if exc_info is not None:
  6013. 1062                             try:
  6014. 1063 ==>                             yielded = self.gen.throw(*exc_info)
  6015. 1064                             finally:
  6016. 1065                                 # Break up a reference to itself
  6017. 1066                                 # for faster GC on CPython.
  6018. 1067                                 exc_info = None
  6019. 1068                         else:
  6020. 1069                             yielded = self.gen.send(value)
  6021. Variables:
  6022.            exc_info = None
  6023.                self = <tornado.gen.Runner object at 0x7ff19f6f4610>
  6024.              future = None
  6025. orig_stack_contexts = ((), None)
  6026. ------------------------------------------------------------------------
  6027. File: lib/python2.7/site-packages/tornado/concurrent.py (Line: 238)
  6028. Function: result
  6029.  231             before the `Future` is done, so the ``timeout`` is never used.
  6030.  232             """
  6031.   233             self._clear_tb_log()
  6032.   234             if self._result is not None:
  6033.   235                 return self._result
  6034.   236             if self._exc_info is not None:
  6035.   237                 try:
  6036.   238 ==>                 raise_exc_info(self._exc_info)
  6037.   239                 finally:
  6038.   240                     self = None
  6039.   241             self._check_done()
  6040.   242             return self._result
  6041.   243    
  6042.   244         def exception(self, timeout=None):
  6043. Variables:
  6044.                 self = None
  6045.              timeout = None
  6046. ------------------------------------------------------------------------
  6047. File: lib/python2.7/site-packages/tornado/gen.py (Line: 1055)
  6048. Function: run
  6049.  1048                         return
  6050.  1049                     self.future = None
  6051.  1050                     try:
  6052.  1051                         orig_stack_contexts = stack_context._state.contexts
  6053.  1052                         exc_info = None
  6054.  1053    
  6055.  1054                         try:
  6056.  1055 ==>                         value = future.result()
  6057.  1056                         except Exception:
  6058.  1057                             self.had_exception = True
  6059.  1058                             exc_info = sys.exc_info()
  6060.  1059                         future = None
  6061.  1060    
  6062.  1061                         if exc_info is not None:
  6063. Variables:
  6064.             exc_info = None
  6065.                 self = <tornado.gen.Runner object at 0x7ff19f6f43d0>
  6066.               future = None
  6067.                    e = StopIteration()
  6068.  orig_stack_contexts = ((), None)
  6069. ------------------------------------------------------------------------
  6070. File: core/service/rpc.py (Line: 63)
  6071. Function: _call
  6072.    56                 result = yield self._call(item, *args, **kwargs)
  6073.    57                 raise tornado.gen.Return(result)
  6074.    58    
  6075.    59             def sync_wrapper(*args, **kwargs):
  6076.    60                 @tornado.gen.coroutine
  6077.    61                 def _call():
  6078.    62                     try:
  6079.    63 ==>                     r = yield self._call(item, *args, **kwargs)
  6080.    64                         result.append(r)
  6081.    65                     except tornado.gen.Return as e:
  6082.    66                         result.append(e.value)
  6083.    67                     except Exception:
  6084.    68                         error.append(sys.exc_info())
  6085.    69                     finally:
  6086. Variables:
  6087.                 args = (13, 'get_spanning_tree', {}, None)
  6088.                 self = <noc.core.service.rpc.RPCProxy object at 0x7ff19f6f46d0>
  6089.               kwargs = {}
  6090.                 item = 'script'
  6091.               result = []
  6092.                error =
  6093. [(<type 'exceptions.TypeError'>,
  6094.   TypeError('unsupported type for timedelta seconds component: datetime.timedelta',),
  6095.   <traceback object at 0x7ff1a8554998>)]
  6096.                   ev = <threading._Event object at 0x7ff19f6ee250>
  6097. ------------------------------------------------------------------------
  6098. File: core/service/rpc.py (Line: 78)
  6099. Function: sync_wrapper
  6100.    71    
  6101.    72                 ev = threading.Event()
  6102.    73                 result = []
  6103.    74                 error = []
  6104.    75                 self._service.ioloop.add_callback(_call)
  6105.    76                 ev.wait()
  6106.    77                 if error:
  6107.    78 ==>                 six.reraise(*error[0])
  6108.    79                 else:
  6109.    80                     return result[0]
  6110.    81    
  6111.    82             if item.startswith("_"):
  6112.    83                 return self.__dict__[item]
  6113.    84             elif self._sync:
  6114. Variables:
  6115.               kwargs = {}
  6116.                 self = <noc.core.service.rpc.RPCProxy object at 0x7ff19f6f46d0>
  6117.                 args = (13, 'get_spanning_tree', {}, None)
  6118.                 item = 'script'
  6119.               result = []
  6120.                error =
  6121. [(<type 'exceptions.TypeError'>,
  6122.   TypeError('unsupported type for timedelta seconds component: datetime.timedelta',),
  6123.   <traceback object at 0x7ff1a8554998>)]
  6124.                   ev = <threading._Event object at 0x7ff19f6ee250>
  6125.                _call = <function _call at 0x7ff19f37f320>
  6126. ------------------------------------------------------------------------
  6127. File: sa/mtmanager.py (Line: 30)
  6128. Function: run
  6129.    23             """
  6130.   24             Run SA script and wait for result
  6131.   25             """
  6132.    26             if "." in script:
  6133.    27                 # Leave only script name
  6134.    28                 script = script.split(".")[-1]
  6135.    29             return open_sync_rpc("sae", calling_service="MTManager").script(
  6136.    30 ==>             object.id, script, params, timeout
  6137.    31             )
  6138.    32    
  6139.    33    
  6140.    34     # Run single instance
  6141.    35     MTManager = MTManagerImplementation()
  6142. Variables:
  6143.                 self = <noc.sa.mtmanager.MTManagerImplementation object at 0x7ff1aa721f10>
  6144.               object = <ManagedObject: DeviceName>
  6145.               params = {}
  6146.              timeout = None
  6147.               script = 'get_spanning_tree'
  6148. ------------------------------------------------------------------------
  6149. File: sa/models/managedobject.py (Line: 1172)
  6150. Function: __call__
  6151.  1165     class ScriptsProxy(object):
  6152.  1166         class CallWrapper(object):
  6153.  1167             def __init__(self, obj, name):
  6154.  1168                 self.name = name
  6155.  1169                 self.object = obj
  6156.  1170    
  6157.  1171             def __call__(self, **kwargs):
  6158.  1172 ==>             return MTManager.run(self.object, self.name, kwargs)
  6159.  1173    
  6160.  1174         def __init__(self, obj):
  6161.  1175             self._object = obj
  6162.  1176             self._cache = {}
  6163.  1177    
  6164.  1178         def __getattr__(self, name):
  6165. Variables:
  6166.                 self = <noc.sa.models.managedobject.CallWrapper object at 0x7ff19ec49b50>
  6167.               kwargs = {}
  6168. ------------------------------------------------------------------------
  6169. File: services/discovery/jobs/box/stp.py (Line: 49)
  6170. Function: get_root_ports
  6171.    42                         )
  6172.    43    
  6173.    44         def get_root_ports(self):
  6174.    45             """
  6175.   46             Returns a dict of
  6176.   47             remote_object_id -> set((local_interface, remote_port_id)
  6177.   48             """
  6178.    49 ==>         result = self.object.scripts.get_spanning_tree()
  6179.    50             roots = defaultdict(set)  # Neighbor -> [(local iface, remote_id)]
  6180.    51             for i in result["instances"]:
  6181.    52                 for iface in i["interfaces"]:
  6182.    53                     if iface["role"] in ("root", "alternate"):
  6183.    54                         roots[iface["designated_bridge_id"]].add((
  6184.    55                             iface["interface"],
  6185. Variables:
  6186.                 self = <noc.services.discovery.jobs.box.stp.STPCheck object at 0x7ff19f6ee110>
  6187. ------------------------------------------------------------------------
  6188. File: services/discovery/jobs/box/stp.py (Line: 25)
  6189. Function: handler
  6190.    18         """
  6191.   19         name = "stp"
  6192.   20         required_script = "get_spanning_tree"
  6193.   21         required_capabilities = ["Network | STP"]
  6194.   22    
  6195.   23         def handler(self):
  6196.   24             self.logger.info("Checking %s topology", self.name)
  6197.   25 ==>         roots = self.get_root_ports()
  6198.   26             for ro in roots:
  6199.   27                 remote_object = self.get_neighbor(ro)
  6200.   28                 if not remote_object:
  6201.   29                     self.logger.debug(
  6202.   30                         "Remote object '%s' is not found. Skipping",
  6203.   31                         ro
  6204. Variables:
  6205.                self = <noc.services.discovery.jobs.box.stp.STPCheck object at 0x7ff19f6ee110>
  6206. ------------------------------------------------------------------------
  6207. File: services/discovery/jobs/base.py (Line: 382)
  6208. Function: run
  6209.  375                                      self.required_script)
  6210.  376                     return
  6211.  377                 # Check required capabilities
  6212.  378                 if not self.has_required_capabilities():
  6213.  379                     return
  6214.  380                 # Run check
  6215.  381                 try:
  6216.  382 ==>                 self.handler()
  6217.  383                 except RPCRemoteError as e:
  6218.  384                     self.logger.error(
  6219.  385                         "RPC Remote error (%s): %s",
  6220.  386                         e.remote_code, e)
  6221.  387                     self.set_problem(
  6222.  388                         alarm_class=self.error_map.get(e.remote_code),
  6223. Variables:
  6224.                self = <noc.services.discovery.jobs.box.stp.STPCheck object at 0x7ff19f6ee110>
  6225.                   e =
  6226. TypeError('unsupported type for timedelta seconds component: datetime.timedelta',)
  6227. ------------------------------------------------------------------------
  6228. END OF TRACEBACK
  6229. 2017-07-04 10:34:45.476734 [discovery|box|DeviceName]  Completed. Status: SUCCESS (474.53ms)
  6230. 2017-07-04 10:34:45.476945 [discovery|box|DeviceName]  Timings: profile = 178.07ms, version = 32.70ms, caps = 25.43ms, interface = 22.24ms, id = 22.32ms, config = 22.68ms, asset = 22.56ms, vlan = 22.08ms, lacp = 30.41ms, udld = 0.23ms, lldp = 24.14ms, cdp = 23.32ms, stp = 31.03ms
  6231. 2017-07-04 10:34:45.477331 [discovery|box|DeviceName]  Updating alarm statuses
  6232. 2017-07-04 10:34:45.503490 [discovery|box|DeviceName]  Opening umbrella alarm 595b45154a5e68ae813df106 (Discovery | Job | Box)
  6233. 2017-07-04 10:34:45.504572 [discovery|box|DeviceName]  Create detail alarm to path
  6234. 2017-07-04 10:34:45.509372 [discovery|box|DeviceName]  Opening detail alarm 595b45154a5e68ae813df107  (Discovery | Error | Unhandled Exception)
  6235. 2017-07-04 10:34:45.509557 [discovery|box|DeviceName]  Create detail alarm to path
  6236. 2017-07-04 10:34:45.513257 [discovery|box|DeviceName]  Opening detail alarm 595b45154a5e68ae813df108  (Discovery | Error | Unhandled Exception)
  6237. 2017-07-04 10:34:45.513441 [discovery|box|DeviceName]  Create detail alarm to path
  6238. 2017-07-04 10:34:45.517081 [discovery|box|DeviceName]  Opening detail alarm 595b45154a5e68ae813df109  (Discovery | Error | Unhandled Exception)
  6239. 2017-07-04 10:34:45.517264 [discovery|box|DeviceName]  Create detail alarm to path
  6240. 2017-07-04 10:34:45.520934 [discovery|box|DeviceName]  Opening detail alarm 595b45154a5e68ae813df10a  (Discovery | Error | Unhandled Exception)
  6241. 2017-07-04 10:34:45.521120 [discovery|box|DeviceName]  Create detail alarm to path
  6242. 2017-07-04 10:34:45.524780 [discovery|box|DeviceName]  Opening detail alarm 595b45154a5e68ae813df10b  (Discovery | Error | Unhandled Exception)
  6243. 2017-07-04 10:34:45.524963 [discovery|box|DeviceName]  Create detail alarm to path
  6244. 2017-07-04 10:34:45.529155 [discovery|box|DeviceName]  Opening detail alarm 595b45154a5e68ae813df10c  (Discovery | Error | Unhandled Exception)
  6245. 2017-07-04 10:34:45.529341 [discovery|box|DeviceName]  Create detail alarm to path
  6246. 2017-07-04 10:34:45.533059 [discovery|box|DeviceName]  Opening detail alarm 595b45154a5e68ae813df10d  (Discovery | Error | Unhandled Exception)
  6247. 2017-07-04 10:34:45.533244 [discovery|box|DeviceName]  Create detail alarm to path
  6248. 2017-07-04 10:34:45.536940 [discovery|box|DeviceName]  Opening detail alarm 595b45154a5e68ae813df10e  (Discovery | Error | Unhandled Exception)
  6249. 2017-07-04 10:34:45.537124 [discovery|box|DeviceName]  Create detail alarm to path
  6250. 2017-07-04 10:34:45.540802 [discovery|box|DeviceName]  Opening detail alarm 595b45154a5e68ae813df10f  (Discovery | Error | Unhandled Exception)
  6251. 2017-07-04 10:34:45.540985 [discovery|box|DeviceName]  Create detail alarm to path
  6252. 2017-07-04 10:34:45.544612 [discovery|box|DeviceName]  Opening detail alarm 595b45154a5e68ae813df110  (Discovery | Error | Unhandled Exception)
  6253. 2017-07-04 10:34:45.544801 [discovery|box|DeviceName]  Create detail alarm to path
  6254. 2017-07-04 10:34:45.548670 [discovery|box|DeviceName]  Opening detail alarm 595b45154a5e68ae813df111  (Discovery | Error | Unhandled Exception)
  6255. 2017-07-04 10:34:45.548855 [discovery|box|DeviceName]  Create detail alarm to path
  6256. 2017-07-04 10:34:45.552488 [discovery|box|DeviceName]  Opening detail alarm 595b45154a5e68ae813df112  (Discovery | Error | Unhandled Exception)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement