Skip to content

Commit 24fc1db

Browse files
zjswhhhyxieca
authored andcommitted
[dualtor][route_check] filter out soc_ipv6 (#2899)
What I did Skip soc_ipv6 when comparing appl_db and asic_db route entries on active-active dualtor. Because it's creating false alarms when tunnel route is added for soc ips. The route is meant to be programmed in asic only. sign-off: Jing Zhang [email protected] How I did it How to verify it Run the updated script on active-active dualtor devices.
1 parent d89d483 commit 24fc1db

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

scripts/route_check.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -495,8 +495,12 @@ def get_soc_ips(config_db):
495495
mux_table = config_db.get_table('MUX_CABLE')
496496
soc_ips = []
497497
for _, mux_entry in mux_table.items():
498-
if mux_entry.get("cable_type", "") == "active-active" and "soc_ipv4" in mux_entry:
499-
soc_ips.append(mux_entry["soc_ipv4"])
498+
if mux_entry.get("cable_type", "") == "active-active":
499+
if "soc_ipv4" in mux_entry and mux_entry["soc_ipv4"]:
500+
soc_ips.append(mux_entry["soc_ipv4"])
501+
502+
if "soc_ipv6" in mux_entry and mux_entry["soc_ipv6"]:
503+
soc_ips.append(mux_entry["soc_ipv6"])
500504

501505
return soc_ips
502506

tests/route_check_test_data.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,7 @@
314314
"server_ipv4": "192.168.0.2/32",
315315
"server_ipv6": "fc02:1000::2/128",
316316
"soc_ipv4": "192.168.0.3/32",
317+
"soc_ipv6": "fc02:1000::3/128",
317318
"state": "auto"
318319
},
319320
}
@@ -328,7 +329,8 @@
328329
RT_ENTRY_TABLE: {
329330
RT_ENTRY_KEY_PREFIX + "192.168.0.2/32" + RT_ENTRY_KEY_SUFFIX: {},
330331
RT_ENTRY_KEY_PREFIX + "fc02:1000::2/128" + RT_ENTRY_KEY_SUFFIX: {},
331-
RT_ENTRY_KEY_PREFIX + "192.168.0.3/32" + RT_ENTRY_KEY_SUFFIX: {}
332+
RT_ENTRY_KEY_PREFIX + "192.168.0.3/32" + RT_ENTRY_KEY_SUFFIX: {},
333+
RT_ENTRY_KEY_PREFIX + "fc02:1000::3/128" + RT_ENTRY_KEY_SUFFIX: {}
332334
}
333335
}
334336
}

0 commit comments

Comments
 (0)