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

Issuing DEL command to remove APPL_DB:PORT_TABLE #17065

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions files/scripts/swss.sh
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@ start() {
# 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*'"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think xcvrd should subscribe to STATE_DB instead of APP_DB. This should not be done here, IMO

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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']},
    ]

Copy link
Contributor Author

@mihirpat1 mihirpat1 Dec 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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.

$SONIC_DB_CLI APPL_DB FLUSHDB
$SONIC_DB_CLI ASIC_DB FLUSHDB
$SONIC_DB_CLI COUNTERS_DB FLUSHDB
Expand Down