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

sailibthrift is reading data from port_map.ini instead of config_db.json #14706

Closed
rraghav-cisco opened this issue Apr 18, 2023 · 5 comments · Fixed by opencomputeproject/SAI#1814 or #15831
Assignees
Labels
MSFT P0 Priority of the issue Triaged this issue has been triaged

Comments

@rraghav-cisco
Copy link

We encountered an issue where the sai-thrift library in syncd-rpc container in the SONiC image is reading the port information(lanes, speed) etc from the port_config.ini instead of the /etc/sonic/config_db.json. My understanding is that config_db.json is the place to read this information once it has been created and saved.

When the issue happens, the sai thrift call returns an empty value for port OID. I have attached the packet trace during this call.

Steps done:
We configured the port speeds and lanes for 8 ports (Ethernet96 to Ethernet152) from 400G to 100G. This was done in config_db.json, and then config-reload or reboot. The port_config.ini was not changed. This caused the following issue:

The below is the syslog that appears that time:
Apr 13 03:10:44.818545 chu-dut INFO syncd#/supervisord: message repeated 2 times: [ dshell_client [03:10:44] {/usr/bin/dshell_client.py:1676} INFO - sai_thrift_get_port_id_by_front_port]
Apr 13 03:10:44.818545 chu-dut INFO syncd#/supervisord: dshell_client [03:10:44] {/usr/bin/dshell_client.py:1676} INFO - Didn't find port
Apr 13 03:10:44.819073 chu-dut INFO syncd#/supervisord: dshell_client [03:10:44] {/usr/bin/dshell_client.py:1676} INFO - sai_thrift_get_port_id_by_front_port

This causes qos/test_qos.py::TestQosSai::testQosSaiSharedReservationSize to fail. The sai-port-id from the DUT is 0 for Ethernet96(one of the new 100G ports). You can see that Ethernet0 is returning a valid port ID, but Ethernet96 is returning 0. This is causing the script to fail.
root@chu-dut:/home/cisco# show int stat | grep "96 "
Ethernet96 1536,1537,1538,1539 100G 9100 rs etp12 PortChannel102 up up QSFP28 or later off
Ethernet196 260,261,262,263 100G 9100 N/A etp24b routed up down QSFP-DD Double Density 8X Pluggable Transceiver off

(Pdb) client.sai_thrift_get_port_id_by_front_port("Ethernet96")
0
(Pdb) client.sai_thrift_get_port_id_by_front_port("Ethernet0")
72057594037927956
(Pdb)
This issue is happening in all the new 100G ports:
(Pdb) for i in range(96,153,8): client.sai_thrift_get_port_id_by_front_port("Ethernet"+str(i))
0
0
0
0
0
0
0
0
(Pdb) client.sai_thrift_get_port_id_by_front_port("Ethernet160") <<< Normal port.
72057594037927980
(Pdb)

@rraghav-cisco
Copy link
Author

Valid port ID for Ethernet0:
Screenshot 2023-04-18 at 10 43 35 AM
Screenshot 2023-04-18 at 10 43 58 AM
Invalid port ID for Ethernet96
Screenshot 2023-04-18 at 10 44 33 AM
Screenshot 2023-04-18 at 10 44 48 AM

@anamehra
Copy link
Contributor

Hi @abdosi , raised this issue for saithrift lib causing qos test case failure when using minigraph as port_config.ini is used to validate the link.

@neethajohn
Copy link
Contributor

@rraghav-cisco , @abdosi , can you provide more context?

@neethajohn neethajohn added Triaged this issue has been triaged MSFT labels Apr 26, 2023
@neethajohn
Copy link
Contributor

@neethajohn to sync with @Gfrom2016 to understand this issue

@rlhui rlhui added the P0 Priority of the issue label May 3, 2023
abdosi added a commit to abdosi/SAI that referenced this issue Jun 22, 2023
sonic-net/sonic-buildimage#14706
Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
@abdosi
Copy link
Contributor

abdosi commented Jun 22, 2023

@Gfrom2016 have fixed this. Please check.
cc @neethajohn / @vmittal-msft / @anamehra /@rraghav-cisco for viz.

abdosi added a commit to opencomputeproject/SAI that referenced this issue Jul 3, 2023
abdosi added a commit to abdosi/SAI that referenced this issue Jul 12, 2023
sonic-net/sonic-buildimage#14706
Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
abdosi added a commit to abdosi/sonic-sairedis that referenced this issue Jul 13, 2023
Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
abdosi added a commit to sonic-net/sonic-sairedis that referenced this issue Jul 13, 2023
…e#14706 (#1265)

Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
abdosi added a commit to abdosi/sonic-buildimage that referenced this issue Jul 13, 2023
56aee6c0dfc4705584764edd35b7b2977bb762eb (HEAD -> 202205, origin/202205) [202205] Advance SAI submodule to fix issue sonic-net#14706 (sonic-net#1265)

Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
@abdosi abdosi linked a pull request Jul 13, 2023 that will close this issue
yxieca pushed a commit that referenced this issue Jul 14, 2023
…tically (#15833)

src/sonic-sairedis

* 56aee6c - (HEAD -> 202205, origin/202205) [202205] Advance SAI submodule to fix issue #14706 (#1265) (10 hours ago) [abdosi]
yxieca pushed a commit that referenced this issue Jul 20, 2023
56aee6c0dfc4705584764edd35b7b2977bb762eb (HEAD -> 202205, origin/202205) [202205] Advance SAI submodule to fix issue #14706 (#1265)

Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
abdosi added a commit to abdosi/SAI that referenced this issue Feb 15, 2024
sonic-net/sonic-buildimage#14706
Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
abdosi added a commit to opencomputeproject/SAI that referenced this issue Feb 15, 2024
Cherry-pick of Master PR: #1814 in v1.12 so that it can be used in 202305 branch of sonic-sairedis. Fixes the issue: sonic-net/sonic-buildimage#14706
abdosi added a commit to abdosi/SAI that referenced this issue Feb 16, 2024
sonic-net/sonic-buildimage#14706
Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
abdosi added a commit to opencomputeproject/SAI that referenced this issue Feb 16, 2024
Cherry-pick of Master PR: #1814 in v1.12 so that it can be used in 202305 branch of sonic-sairedis. Fixes the issue: sonic-net/sonic-buildimage#14706
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
MSFT P0 Priority of the issue Triaged this issue has been triaged
Projects
Status: Done
6 participants