Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: test_bfd_multihop test fails #16219

Open
AntonHryshchuk opened this issue Dec 24, 2024 · 0 comments
Open

[Bug]: test_bfd_multihop test fails #16219

AntonHryshchuk opened this issue Dec 24, 2024 · 0 comments

Comments

@AntonHryshchuk
Copy link
Contributor

Issue Description

Test bfd/test_bfd.py::test_bfd_multihop failed

topo: t1-lag-c224o8
SKU: Mellanox-SN5600-C224O8

Test create bfd session, cleaning the counters, waiting 10 seconds and checking the counters.
I think, we have some unexpected traffic in the setup during the test.
I checked the counters by cmd "watch show queue counters Ethernet147" and saw that they increased before bfd session.
Need to check if the topo supports this test.

Results you see

Traceback from the test:

request = <FixtureRequest for <Function test_bfd_multihop[ipv6]>>, rand_selected_dut = <MultiAsicSonicHost mtvr-moose-14>
ptfhost = <tests.common.devices.ptf.PTFHost object at 0x7fba038fdb20>
tbinfo = {'comment': 'Mellanox MTR testbed', 'conf-name': 'mtvr-moose-14-t1-lag-c224o8', 'duts': ['mtvr-moose-14'], 'duts_map': {'mtvr-moose-14': 0}, ...}
toggle_all_simulator_ports_to_rand_selected_tor_m = None, ipv6 = True

    @pytest.mark.parametrize('ipv6', [False, True], ids=['ipv4', 'ipv6'])
    def test_bfd_multihop(request, rand_selected_dut, ptfhost, tbinfo,
                          toggle_all_simulator_ports_to_rand_selected_tor_m, ipv6):    # noqa F811
        duthost = rand_selected_dut
    
        bfd_session_cnt = int(request.config.getoption('--num_sessions'))
        loopback_addr, ptf_intf, nexthop_ip, neighbor_addrs, dut_intf = get_neighbors_multihop(duthost, tbinfo, ipv6,
                                                                                               count=bfd_session_cnt)
        try:
            cmd_buffer = ""
            for neighbor in neighbor_addrs:
                cmd_buffer += 'sudo ip route add {} via {} ;'.format(neighbor, nexthop_ip)
            duthost.shell(cmd_buffer, module_ignore_errors=True)
    
            create_bfd_sessions_multihop(ptfhost, duthost, loopback_addr, ptf_intf, neighbor_addrs)
    
            duthost.shell("sonic-clear queuecounters")
            # sleep for 10 seconds to check queue counters
            time.sleep(10)
>           verify_bfd_queue_counters(duthost, dut_intf)

bfd_session_cnt = 5
cmd_buffer = 'sudo ip route delete 3000:3000:1::3000 via FC00::7E ;sudo ip route delete 3000:3000:2::3000 via FC00::7E ;sudo ip route delete 3000:3000:3::3000 via FC00::7E ;sudo ip route delete 3000:3000:4::3000 via FC00::7E ;'
dut_intf   = 'Ethernet147'
duthost    = <MultiAsicSonicHost mtvr-moose-14>
ipv6       = True
loopback_addr = 'fc00:1::32'
neighbor   = '3000:3000:4::3000'
neighbor_addrs = ['3000:3000:1::3000', '3000:3000:2::3000', '3000:3000:3::3000', '3000:3000:4::3000']
nexthop_ip = 'FC00::7E'
ptf_intf   = 63
ptfhost    = <tests.common.devices.ptf.PTFHost object at 0x7fba038fdb20>
rand_selected_dut = <MultiAsicSonicHost mtvr-moose-14>
request    = <FixtureRequest for <Function test_bfd_multihop[ipv6]>>
tbinfo     = {'comment': 'Mellanox MTR testbed', 'conf-name': 'mtvr-moose-14-t1-lag-c224o8', 'duts': ['mtvr-moose-14'], 'duts_map': {'mtvr-moose-14': 0}, ...}
toggle_all_simulator_ports_to_rand_selected_tor_m = None

bfd/test_bfd.py:491: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

duthost = <MultiAsicSonicHost mtvr-moose-14>, dut_intf = 'Ethernet147'

    def verify_bfd_queue_counters(duthost, dut_intf):
        queue_output = duthost.shell("show queue counters {}".format(dut_intf))
        logger.debug("Queue output: {}".format(queue_output['stdout']))
    
        for queue_val in range(0, 7):
            queue_pkt_count, _ = get_egress_queue_count(duthost, dut_intf, int(queue_val))
            logger.debug("Interface {}, Queue {}, counter {}".format(dut_intf, queue_val, queue_pkt_count))
            if queue_pkt_count != 0:
>               pytest.fail('Queue {} count is not zero, BFD packets might use this'.format(queue_val))
E               Failed: Queue 6 count is not zero, BFD packets might use this

_          = 902970
dut_intf   = 'Ethernet147'
duthost    = <MultiAsicSonicHost mtvr-moose-14>
queue_output = {'changed': True, 'stdout': 'Last cached time was 2024-12-16T13:11:18.153869\nEthernet147 Last cached time was 2024-12...        52            4,674            0           N/A'], 'stderr_lines': [], '_ansible_no_log': None, 'failed': False}
queue_pkt_count = 10033
queue_val  = 6

bfd/test_bfd.py:380: Failed

Results you expected to see

test passed

Is it platform specific

generic

Relevant log output

No response

Output of show version

No response

Attach files (if any)

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant