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

Delete TRSNCEIVER tables while config reload #3680

Merged

Conversation

noaOrMlnx
Copy link
Collaborator

What I did

Removed TRANSCEIVER tables while config reload / load minigraph is executed.
This code adds the option to reserve TRANSCEIVER_INFO table if xcvrd is being restarted. - https://github.com/sonic-net/sonic-platform-daemons/blob/0cb36447ebfda390d999df6516beac4c17315a7b/sonic-xcvrd/xcvrd/xcvrd.py#L2199

The fix introduced here comes to fix the issue that the table remains also after config reload / load minigraph, which may cause config DB and TRANSCEIVER_INFO table have different ports keys.

How I did it

Update config reload command to delete TRANSCEIVER tables: ["TRANSCEIVER_INFO", "TRANSCEIVER_STATUS", "TRANSCEIVER_PM", "TRANSCEIVER_FIRMWARE_INFO", "TRANSCEIVER_DOM_SENSOR", "TRANSCEIVER_DOM_THRESHOLD"]

How to verify it

Execute config reload and make sure TRANSCEIVER tables are deleted

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

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

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@noaOrMlnx noaOrMlnx force-pushed the delete_transceiver_tables_reload branch from 6620dc2 to 44c650d Compare December 16, 2024 09:13
@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@dprital
Copy link
Collaborator

dprital commented Dec 17, 2024

@prgeor , Can you please review ?

noaOrMlnx pushed a commit to noaOrMlnx/sonic-utilities that referenced this pull request Dec 23, 2024
@bingwang-ms bingwang-ms merged commit 80d4698 into sonic-net:master Jan 6, 2025
7 checks passed
@bingwang-ms
Copy link
Contributor

@noaOrMlnx Will skip this PR for 202405 branch as it's considered as not a must-have fix. Please let me know for any concern. Thanks

vvolam pushed a commit to vvolam/sonic-utilities that referenced this pull request Jan 8, 2025
* Delete TRANSCEIVER tables while config reload
@kperumalbfn
Copy link
Contributor

@dprital @noaOrMlnx Is this required only for breakout ports?

@noaOrMlnx
Copy link
Collaborator Author

@kperumalbfn This change is required to any system which doesn't contain all ports.
Most cases, it will happen because of split to 8 on certain systems. This split demands deleting the neighbor port.
If we delete the neighbor port and then config reload, some tables can remain in Config DB, which will later cause xcvrd (inside pmon) to crash searching for non-existing tables.
The above changes solve the issue

@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202411: #3726

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

Successfully merging this pull request may close these issues.

6 participants