NXOS 9.3(5) - C9332C "show spanning-tree detail" parser error
See original GitHub issueHi,
Getting this error:
Missing keys: [['rapid_pvst', 'vlans', 1, 'interfaces', 'Port-channel1', 'timers'], ['rapid_pvst', 'vlans', 50, 'interfaces', 'Port-channel1', 'timers'], ['rapid_pvst', 'vlans', 51, 'interfaces', 'Port-channel1', 'timers'], << Ommited a ton of similar output >> ]]
File "/opt/genie/poc/basic.py", line 88, in learn_stp
abc = dev.parse('show spanning-tree detail')
File "/opt/genie/poc/basic.py", line 354, in <module>
aetest.main()
here’s a sample of “show spanning-tree detail” on that host:
VLAN0001 is executing the rstp compatible Spanning Tree protocol
Bridge Identifier has priority 0, sysid 1, address aaaa.bbbb.cccc
Configured hello time 2, max age 20, forward delay 15
We are the root of the spanning tree
Topology change flag not set, detected flag not set
Number of topology changes 0 last change occurred 162:37:09 ago
Times: hold 1, topology change 35, notification 2
hello 2, max age 20, forward delay 15
Timers: hello 0, topology change 0, notification 0
Port 4096 (port-channel1, vPC Peer-link) of VLAN0001 is root forwarding
Port path cost 100, Port priority 128, Port Identifier 128.4096
Designated root has priority 1, address aaaa.bbbb.cccc
Designated bridge has priority 0, address aaaa.bbbb.cccc
Designated port id is 128.4096, designated path cost 0
Timers: message age -38, forward delay 0, hold 0
Number of transitions to forwarding state: 1
The port type is network
Link type is point-to-point by default
BPDU: sent 292401, received 292410
This host is a Secondary host in a VPC. Perhaps negative timer values are to blame?
It’s still occurring after i ran a “pyats version update”.
[root@localhost poc]# pyats version check
You are currently running pyATS version: 20.8
Python: 3.6.8 [64bit]
Package Version
---------------------------- -------
genie 20.8
genie.libs.clean 20.8.1
genie.libs.conf 20.8
genie.libs.filetransferutils 20.8
genie.libs.health 20.8
genie.libs.ops 20.8
genie.libs.parser 20.8
genie.libs.robot 20.8
genie.libs.sdk 20.8.2
genie.telemetry 20.8
genie.trafficgen 20.8
pyats 20.8
pyats.aereport 20.8
pyats.aetest 20.8
pyats.async 20.8
pyats.connections 20.8
pyats.contrib 20.8
pyats.datastructures 20.8
pyats.easypy 20.8
pyats.kleenex 20.8.1
pyats.log 20.8
pyats.reporter 20.8
pyats.results 20.8
pyats.robot 20.8
pyats.tcl 20.8
pyats.topology 20.8
pyats.utils 20.8
unicon 20.8.1
unicon.plugins 20.8.1
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
Cisco Nexus 9000 Series NX-OS Release Notes, Release 9.3(3)
This document describes the features, issues, and exceptions of Cisco NX-OS Release 9.3(3) software for use on Cisco Nexus 9000 Series switches.
Read more >Monitoring and Troubleshooting Nexus 9000 (standalone ...
by NX-OS. E.g., EOBCPortLoopback detect runtime hardware errors, memory errors, hardware degradation, software faults, and resource exhaustion and more.
Read more >Install NX-OS software and RCFs - Product documentation
The cluster must be fully functioning (there should be no errors in the logs or similar issues). You must have checked or set...
Read more >NEXUS NX-OS: Useful Commands, CLI Scripting, Hints & Tips ...
Learn how to filter show command outputs, efficiently use include | begin | exclude search operators, Turn pagination on/off, redirect output to files,...
Read more >Cisco Nexus 9332C and 9364C Fixed Spine Switches
2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public Information. Page 1 of 10. Data Sheet. Cisco Nexus 9332C...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi Lukeod,
Thanks for the PR, I also submitted the fix on my end, I will update you as soon as the changes are released.
Thank you, Abdurahman
Hi lukeod,
The issue is actually related to the negative timers, good catch. The regex patterns weren’t considering them so only a small fix is needed. The regex saved as p14 on line 632 in the file
nxos/show_spanning_tree.py
can be updated for themessage_age
captured group. Simply adding a\-?
before\d+
will consider the scenario where the timer is negative. I made the fix on my end and the code will be under review shortly, then I will be able to merge. I can also release a beta for your since our next update will be released in a couple of weeks. We also encourage pull requests which can get merged right away if approved. Let me know if you will make the changes and someone can review the PR right away. Thanks!Abdurahman