Issuing DEL command to remove APPL_DB:PORT_TABLE#17065
Issuing DEL command to remove APPL_DB:PORT_TABLE#17065mihirpat1 wants to merge 2 commits intosonic-net:masterfrom
Conversation
|
@prgeor @shyam77git @jaganbal-a - It will be great if you can help in reviewing this. |
| # Don't flush DB during warm boot | ||
| if [[ x"$WARM_BOOT" != x"true" ]]; then | ||
| debug "Flushing APP, ASIC, COUNTER, CONFIG, and partial STATE databases ..." | ||
| clean_up_tables APPL_DB "'PORT_TABLE:Ethernet*'" |
There was a problem hiding this comment.
I think xcvrd should subscribe to STATE_DB instead of APP_DB. This should not be done here, IMO
There was a problem hiding this comment.
@mihirpat1 i see Xcvrd subscribing to these tables. What am I missing?
port_tbl_map = [
{'CONFIG_DB': swsscommon.CFG_PORT_TABLE_NAME},
{'STATE_DB': 'TRANSCEIVER_INFO'},
{'STATE_DB': 'PORT_TABLE', 'FILTER': ['host_tx_ready']},
]
There was a problem hiding this comment.
@prsunny - XCVRD already subscribes to APPL_DB. With this change, I am changing the way to delete entries from APPL_DB. Am I missing something here?
https://github.com/sonic-net/sonic-platform-daemons/blob/502c0b6622008363cb1ed6d1b7c85b4093997093/sonic-xcvrd/xcvrd/xcvrd.py#L1173
Also, as @prgeor mentioned, XCVRD already subscribes to STATE_DB as well.
|
Closing this PR since I am now using STATE_DB instead of APPL_DB for killing xcvrd during OA crash scenario. |
Why I did it
This change is needed to issue a "DEL" command to remove the APPL_DB:PORT_TABLE. The current approach of issuing FLUSH command to remove the DB doesn't allow xcvrd to subscribe and act on PORT_TABLE deletion event.
The change set is part of implementation of the HLD OA crash handling to reinitialize port through xcvrd
Work item tracking
24264739
How I did it
Calling clean_up_tables function to issue "DEL" command for removing APPL_DB:PORT_TABLE.
How to verify it
Please refer to sonic-net/sonic-platform-daemons#403 for the test results.
Which release branch to backport (provide reason below if selected)
Tested branch (Please provide the tested image version)
Description for the changelog
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)