-
Notifications
You must be signed in to change notification settings - Fork 1.8k
[ssw] clean up DPU_APPL_DB and DPU_STATE_DB for DPU swss restart or DPU reboot #25187
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -408,6 +408,20 @@ start() { | |||||||||||||||||||||||||||||||||||||||||
| $SONIC_DB_CLI RESTAPI_DB FLUSHDB | ||||||||||||||||||||||||||||||||||||||||||
| clean_up_tables STATE_DB "'PORT_TABLE*', 'MGMT_PORT_TABLE*', 'VLAN_TABLE*', 'VLAN_MEMBER_TABLE*', 'LAG_TABLE*', 'LAG_MEMBER_TABLE*', 'INTERFACE_TABLE*', 'MIRROR_SESSION*', 'VRF_TABLE*', 'FDB_TABLE*', 'FG_ROUTE_TABLE*', 'BUFFER_POOL*', 'BUFFER_PROFILE*', 'MUX_CABLE_TABLE*', 'ADVERTISE_NETWORK_TABLE*', 'VXLAN_TUNNEL_TABLE*', 'VNET_ROUTE*', 'MACSEC_PORT_TABLE*', 'MACSEC_INGRESS_SA_TABLE*', 'MACSEC_EGRESS_SA_TABLE*', 'MACSEC_INGRESS_SC_TABLE*', 'MACSEC_EGRESS_SC_TABLE*', 'VRF_OBJECT_TABLE*', 'VNET_MONITOR_TABLE*', 'BFD_SESSION_TABLE*', 'SYSTEM_NEIGH_TABLE*', 'FABRIC_PORT_TABLE*', 'TUNNEL_DECAP_TABLE*', 'TUNNEL_DECAP_TERM_TABLE*', 'HIGH_FREQUENCY_TELEMETRY_SESSION_TABLE*' " | ||||||||||||||||||||||||||||||||||||||||||
| $SONIC_DB_CLI APPL_STATE_DB FLUSHDB | ||||||||||||||||||||||||||||||||||||||||||
| # Flush DPU remote databases (DPU device only) | ||||||||||||||||||||||||||||||||||||||||||
| # Only run if this is a DPU device (type=SmartSwitchDPU or switch_type=dpu) | ||||||||||||||||||||||||||||||||||||||||||
| DEVICE_TYPE=`$SONIC_DB_CLI CONFIG_DB hget "DEVICE_METADATA|localhost" type` | ||||||||||||||||||||||||||||||||||||||||||
| SWITCH_TYPE=`$SONIC_DB_CLI CONFIG_DB hget "DEVICE_METADATA|localhost" switch_type` | ||||||||||||||||||||||||||||||||||||||||||
| if [[ x"${DEVICE_TYPE}" == x"SmartSwitchDPU" || x"${SWITCH_TYPE}" == x"dpu" ]]; then | ||||||||||||||||||||||||||||||||||||||||||
| # Check if DPU_APPL_DB remote database is reachable | ||||||||||||||||||||||||||||||||||||||||||
| if $SONIC_DB_CLI DPU_APPL_DB PING >/dev/null 2>&1; then | ||||||||||||||||||||||||||||||||||||||||||
| debug "Flushing DPU remote databases (DPU_APPL_DB, DPU_STATE_DB, DPU_APPL_STATE_DB, DPU_COUNTERS_DB) ..." | ||||||||||||||||||||||||||||||||||||||||||
| $SONIC_DB_CLI DPU_APPL_DB FLUSHDB | ||||||||||||||||||||||||||||||||||||||||||
| $SONIC_DB_CLI DPU_STATE_DB FLUSHDB | ||||||||||||||||||||||||||||||||||||||||||
| $SONIC_DB_CLI DPU_APPL_STATE_DB FLUSHDB | ||||||||||||||||||||||||||||||||||||||||||
| $SONIC_DB_CLI DPU_COUNTERS_DB FLUSHDB | ||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+419
to
+422
|
||||||||||||||||||||||||||||||||||||||||||
| $SONIC_DB_CLI DPU_APPL_DB FLUSHDB | |
| $SONIC_DB_CLI DPU_STATE_DB FLUSHDB | |
| $SONIC_DB_CLI DPU_APPL_STATE_DB FLUSHDB | |
| $SONIC_DB_CLI DPU_COUNTERS_DB FLUSHDB | |
| if ! $SONIC_DB_CLI DPU_APPL_DB FLUSHDB; then | |
| debug "Failed to flush DPU_APPL_DB via FLUSHDB" | |
| exit 1 | |
| fi | |
| if ! $SONIC_DB_CLI DPU_STATE_DB FLUSHDB; then | |
| debug "Failed to flush DPU_STATE_DB via FLUSHDB" | |
| exit 1 | |
| fi | |
| if ! $SONIC_DB_CLI DPU_APPL_STATE_DB FLUSHDB; then | |
| debug "Failed to flush DPU_APPL_STATE_DB via FLUSHDB" | |
| exit 1 | |
| fi | |
| if ! $SONIC_DB_CLI DPU_COUNTERS_DB FLUSHDB; then | |
| debug "Failed to flush DPU_COUNTERS_DB via FLUSHDB" | |
| exit 1 | |
| fi |
Uh oh!
There was an error while loading. Please reload this page.