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

chassis: 'show interface portchannel' shows internal portchannels included #14459

Closed
anamehra opened this issue Mar 29, 2023 · 2 comments · Fixed by #14479
Closed

chassis: 'show interface portchannel' shows internal portchannels included #14459

anamehra opened this issue Mar 29, 2023 · 2 comments · Fixed by #14479
Assignees
Labels
Chassis 🤖 Modular chassis support MSFT Triaged this issue has been triaged

Comments

@anamehra
Copy link
Contributor

Description

'show interface portchannel' is supposed to display only external portchannels.
'-d all' option is used to display all.

But looks like after #13660 change,
the CLI shows all port channels including the back plane ones without '-d all' option.

Steps to reproduce the issue:

Describe the results you received:

command included internal port channels with back port members.

root@sfd-t2-lc0:/home/admin# show interfaces  portchannel                                            
Flags: A - active, I - inactive, Up - up, Dw - Down, N/A - not available,                            
       S - selected, D - deselected, * - not synced                                                  
  No.  Team Dev         Protocol     Ports                                                           
-----  ---------------  -----------  ------------------------------------                            
   **01  PortChannel01    LACP(A)(Dw)  Ethernet-BP232(D) Ethernet-BP236(D)                             
   02  PortChannel02    LACP(A)(Up)  Ethernet-BP244(S) Ethernet-BP240(S)**                                                       
  102  PortChannel102   LACP(A)(Up)  Ethernet0(S) Ethernet8(S)                                       
  104  PortChannel104   LACP(A)(Up)  Ethernet24(S) Ethernet16(S)                                     

Describe the results you expected:

command should not included internal port channels with back port members.

root@sfd-t2-lc0:/home/admin# show interfaces  portchannel                                            
Flags: A - active, I - inactive, Up - up, Dw - Down, N/A - not available,                            
       S - selected, D - deselected, * - not synced                                                  
  No.  Team Dev         Protocol     Ports                                                           
-----  ---------------  -----------  ------------------------------------                                                                          
  102  PortChannel102   LACP(A)(Up)  Ethernet0(S) Ethernet8(S)                                       
  104  PortChannel104   LACP(A)(Up)  Ethernet24(S) Ethernet16(S)                                     

Output of show version:

(paste your output here)

Output of show techsupport:

(paste your output here or download and attach the file here )

Additional information you deem important (e.g. issue happens only occasionally):

saiarcot895 added a commit to saiarcot895/sonic-buildimage that referenced this issue Mar 31, 2023
In `show interface portchannel` and `show ip route`, backend port
channels and routes were being displayed. This is due to changes in sonic-net#13660.
Fix these issues by switching to reading from PORTCHANNEL_MEMBERS table
instead.

Fixes sonic-net#14459.

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
@saiarcot895 saiarcot895 self-assigned this Mar 31, 2023
@vmittal-msft vmittal-msft added Triaged this issue has been triaged MSFT Chassis 🤖 Modular chassis support labels Apr 12, 2023
@anamehra
Copy link
Contributor Author

There is a bug in sonic_py_common/multi_asic.py is_port_channel_internal function.
The function use PORTCHANNEL table to get member port and then test if member ports are internal.
With the new change in portchannel db, members is not an entry in PORTCHANNEL table in config db and thus the function always returns false and all portchannels are included in external list.

The fix is to use PORTCHANNEL_MEMBER table. I am testing a fix.

We can mark this issue dup of #14436

@anamehra
Copy link
Contributor Author

realized, there is a PR already in process for this. That should fix #14436 as well.

rlhui pushed a commit that referenced this issue Apr 15, 2023
* Fix backend port channels and routes being displayed
In `show interface portchannel` and `show ip route`, backend port
channels and routes were being displayed. This is due to changes in #13660.
Fix these issues by switching to reading from PORTCHANNEL_MEMBERS table
instead.
Fixes #14459.
* Replace table name with constant

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
mssonicbld pushed a commit to mssonicbld/sonic-buildimage that referenced this issue Apr 19, 2023
* Fix backend port channels and routes being displayed
In `show interface portchannel` and `show ip route`, backend port
channels and routes were being displayed. This is due to changes in sonic-net#13660.
Fix these issues by switching to reading from PORTCHANNEL_MEMBERS table
instead.
Fixes sonic-net#14459.
* Replace table name with constant

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Chassis 🤖 Modular chassis support MSFT Triaged this issue has been triaged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants