Header Only - DO NOT REMOVE - Extreme Networks

ezspantree crashes when I run it


I'm finally setting up my first EXOS switch, and while I think I have configured it with a single STP domain in MSTP with all VLANs and ports in it, I decided to enable ezspantree.py to be sure. However, when I run it, I get the following crash:
* jblockx.143 # run script ezspantree.py start
Spanning Tree Easy Setup
- Configures spanning tree s0 mode to MSTP/CIST
- Scans all VLANs
if a VLAN is not connected to spanning tree, it is added to s0
if a VLAN is already connected to spanning tree s0, it is updated
VLANs connected to spanning tree(s) other than s0 are not affected
- Starts a VLAN monitoring process for any new VLANS
newly created VLANS are automatically added to spanning tree s0

Do you wish to proceed? [y/N] y
Traceback (most recent call last):
File "/exos/tools/lib/python2.7/site-packages/./ezspantree.py", line 896, in
File "/exos/tools/lib/python2.7/site-packages/./ezspantree.py", line 289, in __call__
File "/exos/tools/lib/python2.7/site-packages/./ezspantree.py", line 405, in start_ezspantree
File "/exos/tools/lib/python2.7/site-packages/./ezspantree.py", line 454, in start_process
File "/exos/tools/lib/python2.7/site-packages/./ezspantree.py", line 412, in is_mstp_configured
TypeError: 'NoneType' object is not iterable

[/code]I tried to look at the source but it's some sort of binary.

Also is there a good way to test that STP is working? I tried plugging a cable into two ports on the same VLAN, but couldn't work out if it did anything.

7 replies

This is using the built-in version of the script in 22.4.1.4. And for STP logging I enabled these:
configure log filter DefaultFilter add events STP.State.Topology configure log filter DefaultFilter add events STP.State.PortState configure log filter DefaultFilter add events STP.State.PortRole [/code]
James A wrote:

This is using the built-in version of the script in 22.4.1.4. And for STP logging I enabled these:
configure log filter DefaultFilter add events STP.State.Topology configure log filter DefaultFilter add events STP.State.PortState configure log filter DefaultFilter add events STP.State.PortRole [/code]

When I run the script on a fresh switch, just upgraded to 22.4.1.4, which hasn't had any STP configuration, then it runs fine.
Userlevel 5
ezspantree is failing when it is trying to find 's0'. It was developed with the assumption that it would do the work of managing spanning tree participation.

Since you've configured spanning tree on your EXOS switch already, there is something about the configuration that isn't compatible with ezspantree.

if it's possible to reset the switch back to defaults
unconfig switch[/code]then
run script ezspantree.py start[/code]it will take care of converting everything over to MSTP and add any new vlans as they are added to the switch.

run script ezspantree.py show [/code]will tell you if it is running or not.
Dave Hammers wrote:

ezspantree is failing when it is trying to find 's0'. It was developed with the assumption that it would do the work of managing spanning tree participation.

Since you've configured spanning tree on your EXOS switch already, there is something about the configuration that isn't compatible with ezspantree.

if it's possible to reset the switch back to defaults
unconfig switch[/code]then
run script ezspantree.py start[/code]it will take care of converting everything over to MSTP and add any new vlans as they are added to the switch.

run script ezspantree.py show [/code]will tell you if it is running or not.

Hmm, I ran it again with -d and this time it worked. But then on another already-configured switch it failed in a different spot, then I ran it again and it worked:
fblockx.104 # run script ezspantree.py -d start
DEBUG:MainThread:ezspantree:start_ezspantree.392:: Called
DEBUG:MainThread:ezspantree:json_clicmd.190:: debug cfgmgr show one epm.epmpcb name=ezspantree
DEBUG:MainThread:ezspantree:is_process_running.576:: Process is not running
Spanning Tree Easy Setup
- Configures spanning tree s0 mode to MSTP/CIST
- Scans all VLANs
if a VLAN is not connected to spanning tree, it is added to s0
if a VLAN is already connected to spanning tree s0, it is updated
VLANs connected to spanning tree(s) other than s0 are not affected
- Starts a VLAN monitoring process for any new VLANS
newly created VLANS are automatically added to spanning tree s0

Do you wish to proceed? [y/N] y
DEBUG:MainThread:ezspantree:start_process.448:: Called
DEBUG:MainThread:ezspantree:json_clicmd.190:: debug cfgmgr show one stp.stp_domain stpd_name=s0
STP s0 is already configured for MSTP
Enabling STP s0
DEBUG:MainThread:ezspantree:exsh_clicmd.322:: command=enable stpd
DEBUG:MainThread:ezspantree:exsh_clicmd.322:: command=enable stpd s0
DEBUG:MainThread:ezspantree:json_clicmd.190:: debug cfgmgr show one epm.epmpcb name=ezspantree
DEBUG:MainThread:ezspantree:is_process_running.576:: Process is not running
DEBUG:MainThread:ezspantree:exsh_clicmd.322:: command=create process ezspantree python-module ezspantree start on-demand -- -d
ezspantree started
DEBUG:MainThread:ezspantree:exsh_clicmd.322:: command=start process ezspantree
DEBUG:MainThread:ezspantree:exsh_clicmd.322:: command=delete process ezspantree
DEBUG:MainThread:ezspantree:exsh_clicmd.322:: command=create process ezspantree python-module ezspantree start auto -- -d
DEBUG:MainThread:ezspantree:add_vlans_to_stp_at_startup.501:: Called
Scanning all VLANs
VLANs not connected to STP will be automatically added to s0

DEBUG:MainThread:ezspantree:build_vlan_stp_db.206:: Called
DEBUG:MainThread:ezspantree:json_clicmd.190:: debug cfgmgr show next stp.stp_domain_enable stpd_name=None
DEBUG:MainThread:ezspantree:json_clicmd.199:: JSON format error
Traceback (most recent call last):
File "/exos/tools/lib/python2.7/site-packages/./ezspantree.py", line 896, in
File "/exos/tools/lib/python2.7/site-packages/./ezspantree.py", line 289, in __call__
File "/exos/tools/lib/python2.7/site-packages/./ezspantree.py", line 406, in start_ezspantree
File "/exos/tools/lib/python2.7/site-packages/./ezspantree.py", line 510, in add_vlans_to_stp_at_startup
File "/exos/tools/lib/python2.7/site-packages/./ezspantree.py", line 217, in build_vlan_stp_db
TypeError: 'NoneType' object is not iterable
fblockx.105 # run script ezspantree.py -d start
DEBUG:MainThread:ezspantree:start_ezspantree.392:: Called
DEBUG:MainThread:ezspantree:json_clicmd.190:: debug cfgmgr show one epm.epmpcb name=ezspantree
DEBUG:MainThread:ezspantree:is_process_running.573:: Process is running
ezspantree is already running
Do you wish to restart the MSTP/CIST configuration? [y/N] y
Spanning Tree Easy Setup
- Configures spanning tree s0 mode to MSTP/CIST
- Scans all VLANs
if a VLAN is not connected to spanning tree, it is added to s0
if a VLAN is already connected to spanning tree s0, it is updated
VLANs connected to spanning tree(s) other than s0 are not affected
- Starts a VLAN monitoring process for any new VLANS
newly created VLANS are automatically added to spanning tree s0

Do you wish to proceed? [y/N] y
DEBUG:MainThread:ezspantree:start_process.448:: Called
DEBUG:MainThread:ezspantree:json_clicmd.190:: debug cfgmgr show one stp.stp_domain stpd_name=s0
STP s0 is already configured for MSTP
Enabling STP s0
DEBUG:MainThread:ezspantree:exsh_clicmd.322:: command=enable stpd
DEBUG:MainThread:ezspantree:exsh_clicmd.322:: command=enable stpd s0
DEBUG:MainThread:ezspantree:json_clicmd.190:: debug cfgmgr show one epm.epmpcb name=ezspantree
DEBUG:MainThread:ezspantree:is_process_running.573:: Process is running
DEBUG:MainThread:ezspantree:exsh_clicmd.322:: command=restart process ezspantree
ezspantree restarted
DEBUG:MainThread:ezspantree:add_vlans_to_stp_at_startup.501:: Called
Scanning all VLANs
VLANs not connected to STP will be automatically added to s0

DEBUG:MainThread:ezspantree:build_vlan_stp_db.206:: Called
DEBUG:MainThread:ezspantree:json_clicmd.190:: debug cfgmgr show next stp.stp_domain_enable stpd_name=None
DEBUG:MainThread:ezspantree:json_clicmd.190:: debug cfgmgr show next stp.stp_vlan_stats stpd_name=s0 search_dir=1 vlan_name=None
.DEBUG:MainThread:ezspantree:json_clicmd.190:: debug cfgmgr show next stp.stp_vlan_stats stpd_name=s0 search_dir=2 vlan_name=None
DEBUG:MainThread:ezspantree:json_clicmd.190:: debug cfgmgr show next stp.stp_vlan_stats stpd_name=s0 search_dir=3 vlan_name=None
.DEBUG:MainThread:ezspantree:json_clicmd.190:: debug cfgmgr show next stp.stp_vlan_stats stpd_name=s0 search_dir=1 vlan_name=None
.DEBUG:MainThread:ezspantree:json_clicmd.190:: debug cfgmgr show next stp.stp_vlan_stats stpd_name=s0 search_dir=2 vlan_name=None
DEBUG:MainThread:ezspantree:json_clicmd.190:: debug cfgmgr show next stp.stp_vlan_stats stpd_name=s0 search_dir=3 vlan_name=None
.DEBUG:MainThread:ezspantree:build_vlan_stp_db.235:: {u'iPad': u's0', u'Guest': u's0', u'Default': u's0', u'VOIP_Phones': u's0', u'Student_laptops': u's0', u'Wireless': u's0', u'AV': u's0', u'Boarders': u's0', u'Staff': u's0'}
DEBUG:MainThread:ezspantree:build_vlan_db.580:: Called
DEBUG:MainThread:ezspantree:json_clicmd.190:: debug cfgmgr show next vlan.vlanMap vlanList=None
DEBUG:MainThread:ezspantree:build_vlan_db.590:: [u'Default', u'Student_laptops', u'Boarders', u'Guest', u'Staff', u'AV', u'iPad', u'Wireless', u'VOIP_Phones']
DEBUG:MainThread:ezspantree:exsh_clicmd.322:: command=config stpd s0 add vlan Default ports all
DEBUG:MainThread:ezspantree:exsh_clicmd.322:: command=enable stpd s0 auto-bind vlan Default
DEBUG:MainThread:ezspantree:exsh_clicmd.322:: command=config stpd s0 add vlan Student_laptops ports all
DEBUG:MainThread:ezspantree:exsh_clicmd.322:: command=enable stpd s0 auto-bind vlan Student_laptops
DEBUG:MainThread:ezspantree:exsh_clicmd.322:: command=config stpd s0 add vlan Boarders ports all
DEBUG:MainThread:ezspantree:exsh_clicmd.322:: command=enable stpd s0 auto-bind vlan Boarders
DEBUG:MainThread:ezspantree:exsh_clicmd.322:: command=config stpd s0 add vlan Guest ports all
DEBUG:MainThread:ezspantree:exsh_clicmd.322:: command=enable stpd s0 auto-bind vlan Guest
DEBUG:MainThread:ezspantree:exsh_clicmd.322:: command=config stpd s0 add vlan Staff ports all
DEBUG:MainThread:ezspantree:exsh_clicmd.322:: command=enable stpd s0 auto-bind vlan Staff
DEBUG:MainThread:ezspantree:exsh_clicmd.322:: command=config stpd s0 add vlan AV ports all
DEBUG:MainThread:ezspantree:exsh_clicmd.322:: command=enable stpd s0 auto-bind vlan AV
DEBUG:MainThread:ezspantree:exsh_clicmd.322:: command=config stpd s0 add vlan iPad ports all
DEBUG:MainThread:ezspantree:exsh_clicmd.322:: command=enable stpd s0 auto-bind vlan iPad
DEBUG:MainThread:ezspantree:exsh_clicmd.322:: command=config stpd s0 add vlan Wireless ports all
DEBUG:MainThread:ezspantree:exsh_clicmd.322:: command=enable stpd s0 auto-bind vlan Wireless
DEBUG:MainThread:ezspantree:exsh_clicmd.322:: command=config stpd s0 add vlan VOIP_Phones ports all
DEBUG:MainThread:ezspantree:exsh_clicmd.322:: command=enable stpd s0 auto-bind vlan VOIP_Phones

DEBUG:MainThread:ezspantree:exsh_clicmd.322:: command=save
[/code]It didn't change my configuration, so at least I had it right before, which is good to know.
Userlevel 5
Dave Hammers wrote:

ezspantree is failing when it is trying to find 's0'. It was developed with the assumption that it would do the work of managing spanning tree participation.

Since you've configured spanning tree on your EXOS switch already, there is something about the configuration that isn't compatible with ezspantree.

if it's possible to reset the switch back to defaults
unconfig switch[/code]then
run script ezspantree.py start[/code]it will take care of converting everything over to MSTP and add any new vlans as they are added to the switch.

run script ezspantree.py show [/code]will tell you if it is running or not.

I'll have to look into what's going on. Thanks for posting the debug
Userlevel 5
Dave Hammers wrote:

ezspantree is failing when it is trying to find 's0'. It was developed with the assumption that it would do the work of managing spanning tree participation.

Since you've configured spanning tree on your EXOS switch already, there is something about the configuration that isn't compatible with ezspantree.

if it's possible to reset the switch back to defaults
unconfig switch[/code]then
run script ezspantree.py start[/code]it will take care of converting everything over to MSTP and add any new vlans as they are added to the switch.

run script ezspantree.py show [/code]will tell you if it is running or not.

Could I ask what switch model was running ezspantree.py when it crashed?
X620, X450-G2, X870 ...?
Dave Hammers wrote:

ezspantree is failing when it is trying to find 's0'. It was developed with the assumption that it would do the work of managing spanning tree participation.

Since you've configured spanning tree on your EXOS switch already, there is something about the configuration that isn't compatible with ezspantree.

if it's possible to reset the switch back to defaults
unconfig switch[/code]then
run script ezspantree.py start[/code]it will take care of converting everything over to MSTP and add any new vlans as they are added to the switch.

run script ezspantree.py show [/code]will tell you if it is running or not.

X440-G2. I did a bit more testing, and running start then stop then start will have an error, but running start twice will work the second time.

Reply