Skip to content

table cleanup VNET_MONITOR, BFD_SESSION, ROUTE_TUNNEL#14992

Merged
prsunny merged 1 commit intosonic-net:masterfrom
siqbal1986:vnet_monitor_table_cleanup_master
Jun 5, 2023
Merged

table cleanup VNET_MONITOR, BFD_SESSION, ROUTE_TUNNEL#14992
prsunny merged 1 commit intosonic-net:masterfrom
siqbal1986:vnet_monitor_table_cleanup_master

Conversation

@siqbal1986
Copy link
Contributor

The 3 tables in state DB need to be cleaned up after SWSS restart for have consistat state.

Why I did it

Failing to clean up these tables causes an inconsistent state.

Work item tracking
  • Microsoft ADO (number only):
    21695894

How I did it

added 3 tables in clean up script.

How to verify it

add a vnet route with monitoring. bring up the monitors. restart the swss. readd the route. THe route should not become active.

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205
  • 202211

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)

… the list

of tables to be cleaned up after swss restart.
@siqbal1986 siqbal1986 requested a review from lguohan as a code owner May 9, 2023 18:32
$SONIC_DB_CLI GB_COUNTERS_DB FLUSHDB
$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*', 'MACSEC_PORT_TABLE*', 'MACSEC_INGRESS_SA_TABLE*', 'MACSEC_EGRESS_SA_TABLE*', 'MACSEC_INGRESS_SC_TABLE*', 'MACSEC_EGRESS_SC_TABLE*', 'VRF_OBJECT_TABLE*'"
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*', '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*', 'VNET_ROUTE_TUNNEL_TABLE*'"
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add ADVERTISE_NETWORK_TABLE to clean-up list. Else we may see unexpected advertisements.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

its already present.

@siqbal1986
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Commenter does not have sufficient privileges for PR 14992 in repo sonic-net/sonic-buildimage

@siqbal1986
Copy link
Contributor Author

/azpw run Azure.sonic-buildimage 

@mssonicbld
Copy link
Collaborator

/AzurePipelines run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@siqbal1986
Copy link
Contributor Author

/azpw run Azure.sonic-buildimage

@mssonicbld
Copy link
Collaborator

/AzurePipelines run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@siqbal1986
Copy link
Contributor Author

/azpw run Azure.sonic-buildimage

@mssonicbld
Copy link
Collaborator

/AzurePipelines run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@siqbal1986
Copy link
Contributor Author

/azpw run Azure.sonic-buildimage

@mssonicbld
Copy link
Collaborator

/AzurePipelines run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@prsunny
Copy link
Contributor

prsunny commented Jun 5, 2023

@siqbal1986 , do you've a PR for 202012?

mssonicbld pushed a commit to mssonicbld/sonic-buildimage that referenced this pull request Jun 15, 2023
… the list (sonic-net#14992)

* The 3 tables in state DB need to be cleaned up after SWSS restart for have consistant state.
@mssonicbld
Copy link
Collaborator

@siqbal1986 PR conflicts with 202205 branch

@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202211: #15490

siqbal1986 added a commit to siqbal1986/sonic-buildimage that referenced this pull request Jun 15, 2023
mssonicbld pushed a commit that referenced this pull request Jun 16, 2023
… the list (#14992)

* The 3 tables in state DB need to be cleaned up after SWSS restart for have consistant state.
yxieca pushed a commit that referenced this pull request Jun 16, 2023
Why I did it
CP of orignal PR #14992 which failed automatic CP.

Work item tracking
Microsoft ADO (number only):21695894
sonic-otn pushed a commit to sonic-otn/sonic-buildimage that referenced this pull request Sep 20, 2023
… the list (sonic-net#14992)

* The 3 tables in state DB need to be cleaned up after SWSS restart for have consistant state.
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.

4 participants