Details
Description
./noc debug-script get_spanning_tree qtech2800-scool_1-baz
qtech2800-scool_1-baz#show version QSW-2800-28T-AC Device, Compiled on Dec 10 16:28:39 2012 sysLocation Russia, Moscow, Novozavodskaya st 18, bld 1 CPU Mac 00:1f:ce:a2:14:0c Vlan MAC 00:1f:ce:a2:14:0b SoftWare Version 6.3.100.15 BootRom Version 7.1.3 HardWare Version 1.0.2 CPLD Version 1.2 Device serial number Q5000310314 Copyright (C) 2012 by QTECH LLC All rights reserved Last reboot is cold reset. Uptime is 0 weeks, 2 days, 0 hours, 18 minutes qtech2800-scool_1-baz#show spanning-tree -- RSTP Bridge Config Info -- Standard : IEEE 802.1w Bridge MAC : 00:1f:ce:a2:14:0c Bridge Times : Max Age 20, Hello Time 2, Forward Delay 15 Force Version: 2 ############################################################# Self Bridge Id : 32768.00:1f:ce:a2:14:0c Root Id : this switch Ext.RootPathCost : 0 Root Port ID : 0 PortName ID ExtRPC State Role DsgBridge DsgPort -------------- -------- --------- --- ---- ------------------ ------- Ethernet1/25 128.025 0 FWD DSGN 32768.001fcea2140c 128.025 qtech2800-scool_1-baz#
2015-06-08 11:17:33,529 [TELNET: 10.64.108.150] submit('show spanning-tree', bulk_lines=None, streaming=False) 2015-06-08 11:17:33,547 [TELNET: 10.64.108.150] on_read: 'show spanning-tree\r\n\r\n -- RSTP Bridge Config Info --\r\n\r\nStandard : IEEE 802.1w\r\nBridge MAC : 00:1f:ce:a2:14:0c\r\nBridge Times : Max Age 20, Hello Time 2, Forward Delay 15\r\nForce Version: 2\r\n\r\n#############################################################\r\nSelf Bridge Id : 32768.00:1f:ce:a2:14:0c\r\nRoot Id : this switch\r\nExt.RootPathCost : 0\r\nRoot Port ID : 0\r\n\r\n PortName ID ExtRPC State Role DsgBridge DsgPort\r\n-------------- -------- --------- --- ---- ------------------ -------\r\n Ethernet1/25 128.025 0 FWD DSGN 32768.001fcea2140c 128.025\r\nqtech2800-scool_1-baz#' 2015-06-08 11:17:33,547 [TELNET: 10.64.108.150] Starting synchronous FSM check 2015-06-08 11:17:33,547 [TELNET: 10.64.108.150] match '^\S+#' 2015-06-08 11:17:33,548 [TELNET: 10.64.108.150] Starting synchronous FSM check 2015-06-08 11:17:33,548 [TELNET: 10.64.108.150] event(PROMPT) 2015-06-08 11:17:33,562 cli(show spanning-tree) returns: ===[ show spanning-tree ]=============================================== '\n -- RSTP Bridge Config Info --\n\nStandard : IEEE 802.1w\nBridge MAC : 00:1f:ce:a2:14:0c\nBridge Times : Max Age 20, Hello Time 2, Forward Delay 15\nForce Version: 2\n\n#############################################################\nSelf Bridge Id : 32768.00:1f:ce:a2:14:0c\nRoot Id : this switch\nExt.RootPathCost : 0\nRoot Port ID : 0\n\n PortName ID ExtRPC State Role DsgBridge DsgPort\n-------------- -------- --------- --- ---- ------------------ -------\n Ethernet1/25 128.025 0 FWD DSGN 32768.001fcea2140c 128.025\n' ======================================================================== 2015-06-08 11:17:33,562 Unhandled exception 2015-06-08 11:17:33,571 Script traceback: <type 'exceptions.UnboundLocalError'> local variable 'bridge_id' referenced before assignment START OF TRACEBACK ------------------------------------------------------------------------ File: sa/profiles/Qtech/QSW2800/get_spanning_tree.py (Line: 104) Function: execute 97 "point_to_point": True, # temp 98 "edge": False # temp 99 }] 100 continue 101 102 r["instances"] += [{ 103 "id": inst_id if r["mode"] == "MSTP" else 0, 104 ==> "bridge_id": bridge_id, 105 "bridge_priority": bridge_priority, 106 "root_id": root_id, 107 "root_priority": root_priority, 108 "interfaces": ifaces, 109 "vlans": "1-4095" 110 }] Variables: cmd = '\n -- RSTP Bridge Config Info --\n\nStandard : IEEE 802.1w\nBridge MAC : 00:1f:ce:a2:14:0c\nBridge Times : Max Age 20, Hello Time 2, Forward Delay 15\nForce Version: 2\n\n#############################################################\nSelf Bridge Id : 32768.00:1f:ce:a2:14:0c\nRoot Id : this switch\nExt.RootPathCost : 0\nRoot Port ID : 0\n\n PortName ID ExtRPC State Role DsgBridge DsgPort\n-------------- -------- --------- --- ---- ------------------ -------\n Ethernet1/25 128.025 0 FWD DSGN 32768.001fcea2140c 128.025\n' self = <Script(Thread-2, started daemon 140255662200576)> r = {'instances': [], 'mode': 'None'} l = '' match = None ------------------------------------------------------------------------ File: sa/script/script.py (Line: 463) Function: guarded_run 456 return result 457 except KeyError: 458 self.logger.debug("Not in call cache: %r, %r", 459 self.name, self.kwargs) 460 pass 461 # Calling script body 462 self._thread_id = thread.get_ident() 463 ==> result = self.execute(**self.kwargs) 464 # Enforce interface result checking 465 for i in self.implements: 466 result = i.script_clean_result(self.profile, result) 467 # Cache result when required 468 if self.cache and self.parent is not None: 469 self.logger.debug( Variables: i = <noc.sa.interfaces.igetspanningtree.IGetSpanningTree object at 0x3525090> self = <Script(Thread-2, started daemon 140255662200576)> t0 = 1433751452.2344451 ------------------------------------------------------------------------ File: sa/script/script.py (Line: 490) Function: run 483 484 def run(self): 485 """Script thread worker method""" 486 self.logger.debug("Running") 487 result = None 488 try: 489 with self.cancelable(): 490 ==> result = self.guarded_run() 491 except self.TimeOutError: 492 self.logger.error("Timed out") 493 self.e_timeout = True 494 except CancelledError: 495 self.logger.error("Cancelled") 496 self.e_cancel = True Variables: self = <Script(Thread-2, started daemon 140255662200576)> r = ["<type 'exceptions.UnboundLocalError'>", "local variable 'bridge_id' referenced before assignment"] result = None v = UnboundLocalError("local variable 'bridge_id' referenced before assignment",) tb = <traceback object at 0x4774c20> t = <type 'exceptions.UnboundLocalError'> ------------------------------------------------------------------------ END OF TRACEBACK 2015-06-08 11:17:33,572 Closing 2015-06-08 11:17:33,572 Requesting call: <bound method CLITelnetSocket.close of <CLITelnetSocket(0x476d550, 10.64.108.150:23, connected)>>(*(), **{'flush': True}) 2015-06-08 11:17:34,549 Tick 2015-06-08 11:17:34,549 Calling delayed <bound method CLITelnetSocket.close of <CLITelnetSocket(0x476d550, 10.64.108.150:23, connected)>>(*(), **{'flush': True}) 2015-06-08 11:17:34,550 [CLITelnetSocket 10.64.108.150:23] Closing socket
Attachments
Issue Links
- relates to
-
NOC-1502 QSW commands неправильно обрабатывает more в 7.х.х ветке
- Resolved