Skip to content

[show] Fail to show interface status after creating portchannel if portchannel members don't speed information. - #601

Closed
chenkelly wants to merge 1 commit into
sonic-net:masterfrom
chenkelly:consider_port_no_speed_info_case
Closed

chenkelly wants to merge 1 commit into
sonic-net:masterfrom
chenkelly:consider_port_no_speed_info_case

Conversation

@chenkelly

Copy link
Copy Markdown

- What I did
The port may not have speed information, we should consider this case when we calculate portchannel speed.
- How I did it
If all portchannel members don't speed information, display N/A

- How to verify it

root@sonic:~# show interfaces status
  Interface    Lanes    Speed    MTU      Alias    Vlan    Oper    Admin            Type    Asym PFC
-----------  -------  -------  -----  ---------  ------  ------  -------  --------------  ----------
  Ethernet0       13      N/A   9100   tenGigE0  routed      up       up  SFP/SFP+/SFP28         N/A
  Ethernet1       14      N/A   9100   tenGigE1  routed      up       up  SFP/SFP+/SFP28         N/A
... 

root@sonic:~# config portchannel add PortChannel1
root@sonic:~# config portchannel member add PortChannel1 Ethernet0
root@sonic:~# config portchannel member add PortChannel1 Ethernet1

- Previous command output (if the output of a command-line utility has changed)

root@sonic:~# show interfaces status
Traceback (most recent call last):
File "/usr/bin/intfutil", line 424, in <module>
main(sys.argv[1:])
File "/usr/bin/intfutil", line 417, in main
interface_stat = IntfStatus(intf_name)
File "/usr/bin/intfutil", line 345, in _init_
self.portchannel_speed_dict = po_speed_dict(self.po_int_dict, self.appl_db)
File "/usr/bin/intfutil", line 231, in po_speed_dict
interface_speed = '{}G'.format(interface_speed[:-3])
TypeError: 'NoneType' object has no attribute '_getitem_'

- New command output (if the output of a command-line utility has changed)

root@sonic:~# show interfaces status
   Interface    Lanes    Speed    MTU      Alias          Vlan    Oper    Admin            Type    Asym PFC
------------  -------  -------  -----  ---------  ------------  ------  -------  --------------  ----------
   Ethernet0       13      N/A   9100   tenGigE0  PortChannel1      up       up  SFP/SFP+/SFP28         N/A
   Ethernet1       14      N/A   9100   tenGigE1  PortChannel1      up       up  SFP/SFP+/SFP28         N/A
......
PortChannel1      N/A      N/A   9100        N/A        routed      up       up             N/A         N/A

Signed-off-by: kelly_chen@edge-core.com

@chenkelly

Copy link
Copy Markdown
Author

retest this please

1 similar comment
@chenkelly

Copy link
Copy Markdown
Author

retest this please

@chenkelly

Copy link
Copy Markdown
Author

@lguohan Could you help to review this modification? Please guide us how to add test case. Thanks very much.

@github-actions

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had any activity for 365 days. It will be closed in 14 days if no further activity occurs.

If this PR is still relevant, please leave a comment or push a new commit — this will reset the inactivity timer.

Important: before this PR can be merged it must be rebased onto the latest master. After a year of inactivity it is almost certainly out of date and will not build or merge cleanly against the current tree. Please rebase, resolve any conflicts, and force-push so CI can re-run against current master; a PR that cannot be rebased cleanly will not be merged.

If you believe this PR should remain open regardless of activity, add the never-stale label.

Thank you for your contribution to SONiC!

@github-actions github-actions Bot added the stale label Sep 25, 2026
@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown

This pull request has been closed due to inactivity (no updates in over 1 year). If you would like to continue this work, please re-open the PR or submit a new one rebased onto the latest master.

Thank you for your contribution to SONiC!

@github-actions github-actions Bot closed this Oct 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant