-
Notifications
You must be signed in to change notification settings - Fork 958
Open
Description
Is it platform specific
generic
Importance or Severity
Critical
Description of the bug
test_bgpmon.py::test_bgpmon is not updated to IPv6 only topology
Steps to Reproduce
run test_bgpmon.py::test_bgpmon on IPv6 only topology
Actual Behavior and Expected Behavior
The function bgpmon_peer_connected(duthost, bgpmon_peer), use bgp_summary for ipv4 only.:
try:
bgp_summary = json.loads(asichost.run_vtysh("-c 'show bgp summary json'")['stdout'])
return **bgp_summary['ipv4Unicast']**['peers'][bgpmon_peer]["state"] == "Established"
except Exception:
logger.info('Unable to get bgp status')
return False
when v6 only this need to be adjust.
Relevant log output
def test_bgpmon(dut_with_default_route, localhost, enum_rand_one_frontend_asic_index,
common_setup_teardown, set_timeout_for_bgpmon, ptfadapter, ptfhost):
"""
Add a bgp monitor on ptf and verify that DUT is attempting to establish connection to it
"""
duthost = dut_with_default_route
asichost = duthost.asic_instance(enum_rand_one_frontend_asic_index)
def bgpmon_peer_connected(duthost, bgpmon_peer):
try:
bgp_summary = json.loads(asichost.run_vtysh("-c 'show bgp summary json'")['stdout'])
return bgp_summary['ipv4Unicast']['peers'][bgpmon_peer]["state"] == "Established"
except Exception:
logger.info('Unable to get bgp status')
return False
local_addr, peer_addr, peer_ports, asn = common_setup_teardown
exp_packet = build_syn_pkt(local_addr, peer_addr)
# Flush dataplane
ptfadapter.dataplane.flush()
# Load bgp monitor config
logger.info("Setting PTF qlen to 120000")
ptfadapter.dataplane.set_qlen(120000)
logger.info("Configured bgpmon and verifying packet on {}".format(peer_ports))
asichost.write_to_config_db(BGPMON_CONFIG_FILE)
if not wait_until(MAX_TIME_FOR_BGPMON, 5, 0, verify_bgp_monitor_config, duthost, peer_addr):
pytest.fail("BGP monitor config not found in the config db")
log_pre_validation_bgpmon(duthost)
# Verify syn packet on ptf
(rcvd_port_index, rcvd_pkt) = testutils.verify_packet_any_port(test=ptfadapter, pkt=exp_packet,
ports=peer_ports, timeout=BGP_CONNECT_TIMEOUT)
bgp/test_bgpmon.py:166:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.8/dist-packages/ptf/testutils.py:3441: in verify_packet_any_port
test.fail(
device_number = 0
n_timeout = 0.1
pkt = <ptf.mask.Mask object at 0x7f3a2df04b50>
ports = []
result = PollFailure(device=None, port=None, packet=None, time=None)
test = <tests.common.plugins.ptfadapter.ptfadapter.PtfTestAdapter testMethod=runTest>
timeout = 121
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <tests.common.plugins.ptfadapter.ptfadapter.PtfTestAdapter testMethod=runTest>
msg = 'Did not receive expected packet on any of ports [] for device 0.\n========== EXPECTED ==========\nMask:\n\npacket sta... 33 .Y...|.g......63\n0050 B8 A9 68 60 8D A4 ..h`..\n==============================\n'
def fail(self, msg=None):
"""Fail immediately, with the given message."""
> raise self.failureException(msg)
E AssertionError: Did not receive expected packet on any of ports [] for device 0.
E ========== EXPECTED ==========
E Mask:
E
E packet status: OK
E packet:
E 0000 00 01 02 03 04 05 00 06 07 08 09 0A 08 00 45 00 ..............E.
E 0010 00 28 00 01 00 00 40 06 65 AE 0A 01 00 20 0B 00 .(....@.e.... ..
E 0020 00 01 04 D2 00 B3 00 00 00 00 00 00 00 00 50 02 ..............P.
E 0030 20 00 75 3C 00 00 .u<..
E
E packet's mask:
E 0000 00 00 00 00 00 00 00 00 00 00 00 00 FF FF 00 00 ................
E 0010 00 00 00 00 00 00 00 FF 00 00 FF FF FF FF FF FF ................
E 0020 FF FF 00 00 FF FF 00 00 00 00 00 00 00 00 01 FF ................
E 0030 00 00 00 00 00 00 ......
E
E ========== RECEIVED ==========
E 5167 total packets. Displaying most recent 3 packets:
E ------------------------------
E 0000 A2 3D B0 D5 0C FE 50 00 E6 23 EE DA 86 DD 6C 0F .=....P..#....l.
E 0010 A6 F4 00 20 06 01 FC 00 00 00 00 00 00 00 00 00 ... ............
E 0020 00 00 00 00 00 C1 FC 00 00 00 00 00 00 00 00 00 ................
E 0030 00 00 00 00 00 C2 A9 14 00 B3 AB 5E FD C8 FE E7 ...........^....
E 0040 BD A2 80 10 00 7C BC C5 00 00 01 01 08 0A BA 9A .....|..........
E 0050 33 93 03 6C BE E3 3..l..
E ------------------------------
E 0000 0A B3 32 01 F5 FA 50 00 E6 23 EE DA 86 DD 6C 07 ..2...P..#....l.
E 0010 35 0D 00 20 06 01 FC 00 00 00 00 00 00 00 00 00 5.. ............
E 0020 00 00 00 00 05 E1 FC 00 00 00 00 00 00 00 00 00 ................
E 0030 00 00 00 00 05 E2 A2 EA 00 B3 AC 82 02 0C 76 ED ..............v.
E 0040 53 08 80 10 00 7C 27 96 00 00 01 01 08 0A 2A 6C S....|'.......*l
E 0050 5E 5C 6F AC 36 50 ^\o.6P
E ------------------------------
E 0000 6E 57 22 DC 96 BD 50 00 E6 23 EE DA 86 DD 6C 0C nW"...P..#....l.
E 0010 EF CF 00 20 06 01 FC 00 00 00 00 00 00 00 00 00 ... ............
E 0020 00 00 00 00 07 21 FC 00 00 00 00 00 00 00 00 00 .....!..........
E 0030 00 00 00 00 07 22 8C B0 00 B3 13 E9 D5 F3 6D 1A ....."........m.
E 0040 A2 59 80 10 00 7C 04 67 00 00 01 01 08 0A 36 33 .Y...|.g......63
E 0050 B8 A9 68 60 8D A4 ..h`..
E ==============================
msg = 'Did not receive expected packet on any of ports [] for device 0.\n========== EXPECTED ==========\nMask:\n\npacket sta... 33 .Y...|.g......63\n0050 B8 A9 68 60 8D A4 ..h`..\n==============================\n'
self = <tests.common.plugins.ptfadapter.ptfadapter.PtfTestAdapter testMethod=runTest>
Output of show version
Attach files (if any)
No response
Reactions are currently unavailable