sonic-net / sonic-buildimage

Scripts which perform an installable binary image build for SONiC
Other
741 stars 1.43k forks source link

[FDB][Arista] FDB_TABLE in STATE_DB incorrect after deleting vlan on 720DT-48S #13102

Open yaqiangz opened 1 year ago

yaqiangz commented 1 year ago

Description

After deleting members of Vlan1000 and this vlan, FDB_TABLE still has interfaces in vlan1000.

Steps to reproduce the issue:

  1. Remove all members of vlan1000 sudo config vlan member del 1000 Ethernet0 sudo config vlan member del 1000 Ethernet1 ...
  2. Remove vlan1000 sudo config vlan del 1000
  3. Add new vlan and member sudo config vlan add 226 sudo config interface ip add Vlan226 192.168.8.1/30 sudo config vlan member add -u 226 Ethernet24
  4. ping 192.168.8.1 from peer interface of Ethernet24 in ptf to adding fdb info.
  5. clear fdb table sudo sonic-clear fdb all
  6. View fdb table show mac sonic-db-cli STATE_DB keys *FDB*

Describe the results you received:

  1. Result of show mac (as expected):
    No.    Vlan    MacAddress    Port    Type
    -----  ------  ------------  ------  ------
    Total number of entries 0
  2. Result of sonic-db-cli STATE_DB keys *FDB* (not as expected):
    FDB_TABLE|Vlan1000:10:70:fd:b6:13:07
    FDB_TABLE|Vlan226:10:70:fd:b6:13:18
    FDB_TABLE|Vlan1000:10:70:fd:b6:13:01
    FDB_TABLE|Vlan1000:10:70:fd:b6:13:03
    FDB_TABLE|Vlan1000:10:70:fd:b6:13:04
    FDB_TABLE|Vlan1000:10:70:fd:b6:13:22
    FDB_TABLE|Vlan1000:10:70:fd:b6:13:15
    FDB_TABLE|Vlan1000:10:70:fd:b6:13:0a
    FDB_TABLE|Vlan1000:10:70:fd:b6:13:17
    FDB_TABLE|Vlan1000:10:70:fd:b6:13:19
    FDB_TABLE|Vlan1000:10:70:fd:b6:13:06
    FDB_TABLE|Vlan1000:10:70:fd:b6:13:2d
    FDB_TABLE|Vlan1000:10:70:fd:b6:13:1a
    FDB_TABLE|Vlan1000:10:70:fd:b6:13:2a
    FDB_TABLE|Vlan1000:10:70:fd:b6:13:0c
    FDB_TABLE|Vlan1000:10:70:fd:b6:13:0f
    FDB_TABLE|Vlan1000:10:70:fd:b6:13:23
    FDB_TABLE|Vlan1000:10:70:fd:b6:13:0d
    FDB_TABLE|Vlan1000:10:70:fd:b6:13:11
    FDB_TABLE|Vlan1000:10:70:fd:b6:13:13
    FDB_TABLE|Vlan1000:10:70:fd:b6:13:20
    FDB_TABLE|Vlan1000:10:70:fd:b6:13:0e
    FDB_TABLE|Vlan1000:10:70:fd:b6:13:26
    FDB_TABLE|Vlan1000:10:70:fd:b6:13:1d
    FDB_TABLE|Vlan1000:10:70:fd:b6:13:05
    FDB_TABLE|Vlan1000:10:70:fd:b6:13:1b
    FDB_TABLE|Vlan1000:10:70:fd:b6:13:00
    FDB_TABLE|Vlan1000:10:70:fd:b6:13:28
    FDB_TABLE|Vlan1000:10:70:fd:b6:13:09
    FDB_TABLE|Vlan1000:10:70:fd:b6:13:0b
    FDB_TABLE|Vlan1000:10:70:fd:b6:13:2b
    FDB_TABLE|Vlan1000:10:70:fd:b6:13:2c
    FDB_TABLE|Vlan1000:10:70:fd:b6:13:16
    FDB_TABLE|Vlan1000:10:70:fd:b6:13:10
    FDB_TABLE|Vlan1000:10:70:fd:b6:13:21
    FDB_TABLE|Vlan1000:10:70:fd:b6:13:1c
    FDB_TABLE|Vlan1000:10:70:fd:b6:13:27
    FDB_TABLE|Vlan1000:10:70:fd:b6:13:25
    FDB_TABLE|Vlan1000:10:70:fd:b6:13:08
    FDB_TABLE|Vlan1000:10:70:fd:b6:13:24
    FDB_TABLE|Vlan1000:10:70:fd:b6:13:18
    FDB_TABLE|Vlan1000:10:70:fd:b6:13:14
    FDB_TABLE|Vlan1000:10:70:fd:b6:13:1f
    FDB_TABLE|Vlan1000:10:70:fd:b6:13:1e
    FDB_TABLE|Vlan1000:10:70:fd:b6:13:12
    FDB_TABLE|Vlan1000:10:70:fd:b6:13:29
    FDB_TABLE|Vlan1000:10:70:fd:b6:13:02

Describe the results you expected:

After flushing fdb table, information of deleted vlan1000 should not be displayed in in FDB_TABLE of STATE_DB.

Output of show version:

SONiC Software Version: SONiC.20220531.11
Distribution: Debian 11.5
Kernel: 5.10.0-18-2-amd64
Build commit: 4fea843b60
Build date: Fri Dec  2 17:29:10 UTC 2022
Built by: cloudtest@934c23b4c000005

Platform: x86_64-arista_720dt_48s
HwSKU: Arista-720DT-48S
ASIC: broadcom
ASIC Count: 1
Serial Number: WTW22180032
Model Number: CCS-720DT-48S
Hardware Revision: 02.00
Uptime: 06:28:15 up 23:51,  1 user,  load average: 0.18, 0.20, 0.22
Date: Mon 19 Dec 2022 06:28:15

Output of show techsupport:

(paste your output here or download and attach the file here )

Additional information you deem important (e.g. issue happens only occasionally):

anilkpan commented 1 year ago

Vlan deletion is not processed in OA until all mac on the Vlan are removed. There seems to be a mismatch in ref count. @yaqiangz, can you please provide the techsupport for me to investigate further?

yaqiangz commented 1 year ago

Vlan deletion is not processed in OA until all mac on the Vlan are removed. There seems to be a mismatch in ref count. @yaqiangz, can you please provide the techsupport for me to investigate further?

@anilkpan, it is not hard to reproduce the error by following steps I mentioned, could you please follow that to reproduce, maybe it is more helpful for trouble shooting.