Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI command 'show interface status' returns traceback instead of error's reason #1082

Closed
OleksandrKozodoi opened this issue Aug 28, 2020 · 0 comments · Fixed by #1376
Closed

Comments

@OleksandrKozodoi
Copy link

Description
CLI command 'show interface status' returns python's traceback when it's failed to get interface_speed object (i.e. containers snmp, mgmt-framework, dhcp_relay, radv, syncd, teamd, swss are stopped for some reason)

Steps to reproduce the issue

  1. Stop snmp, mgmt-framework, dhcp_relay, radv, syncd, teamd, swss containers
  2. Execute show interfaces status

Describe the results you received

admin@dut:~$ show interfaces status | grep up                                                                               
Traceback (most recent call last):                                                                                                  
  File "/usr/bin/intfutil", line 535, in <module>                                                                                   
    main(sys.argv[1:])                                                                                                              
  File "/usr/bin/intfutil", line 528, in main                                                                                       
    interface_stat = IntfStatus(intf_name)                                                                                          
  File "/usr/bin/intfutil", line 449, in __init__                                                                                   
    self.portchannel_speed_dict = po_speed_dict(self.po_int_dict, self.appl_db)                                                     
  File "/usr/bin/intfutil", line 275, in po_speed_dict                                                                              
    interface_speed = '{}G'.format(interface_speed[:-3])                                                                            
TypeError: 'NoneType' object has no attribute '__getitem__'  

Describe the results you expected
Corresponding error message by CLI command

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant