flush VRF_OBJECT_TABLE table on state db when swss start #11509
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Why I did it
1.set vrf and binf interface
sudo config vlan add 2000
sudo config vrf add Vrf1
sudo config interface vrf bind Vlan2000 Vrf1
sudo config interface ip add Vlan2000 10.0.0.66/31
2.check state db
127.0.0.1:6379[6]> keys VRF
1) "VRF_TABLE|Vrf1"
2) "VRF_OBJECT_TABLE|Vrf1"
3.config reload
config reload -y
2.check state db , and the VRF_OBJECT_TABLE still exist
127.0.0.1:6379[6]> keys VRF
1) "VRF_OBJECT_TABLE|Vrf1"
127.0.0.1:6379[6]>
How I did it
flush VRF_OBJECT_TABLE table on state db when swss start
How to verify it
1.set vrf and binf interface
sudo config vlan add 2000
sudo config vrf add Vrf1
sudo config interface vrf bind Vlan2000 Vrf1
sudo config interface ip add Vlan2000 10.0.0.66/31
2.check state db
127.0.0.1:6379[6]> keys VRF
1) "VRF_TABLE|Vrf1"
2) "VRF_OBJECT_TABLE|Vrf1"
3.config reload
config reload -y
2.check state db , and the VRF_OBJECT_TABLE not exist
root@as9726-32d-6:/home/admin# redis-cli
127.0.0.1:6379> select 6
OK
127.0.0.1:6379[6]> keys VRF
(empty array)
127.0.0.1:6379[6]>
Which release branch to backport (provide reason below if selected)