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

[bgp] test_bgp_speaker_announce_routes_v6 fails #8097

Closed
theasianpianist opened this issue Jul 7, 2021 · 1 comment · Fixed by sonic-net/sonic-mgmt#3852
Closed

[bgp] test_bgp_speaker_announce_routes_v6 fails #8097

theasianpianist opened this issue Jul 7, 2021 · 1 comment · Fixed by sonic-net/sonic-mgmt#3852
Assignees
Labels
Dual ToR Platform ♊ Issues found on dual ToR platforms Issue for 202012

Comments

@theasianpianist
Copy link
Contributor

common_setup_teardown = (u'10.64.246.139', {'deployment_id': u'1', 'dhcp_servers': [u'192.0.0.1', u'192.0.0.2', u'192.0.0.3', u'192.0.0.4', u'....4/21')], [IPNetwork('fc02:1000::2/64'), IPNetwork('fc02:1000::3/64'), IPNetwork('fc02:1000::4/64')], u'Vlan1000', ...)
tbinfo = {'auto_recover': 'True', 'comment': 'hellogemini', 'conf-name': 'vms17-dual-t0-7050-1', 'duts': ['str2-7050cx3-acs-06', 'str2-7050cx3-acs-07'], ...}
duthosts = <tests.common.devices.duthosts.DutHosts object at 0x7fb445859110>
rand_one_dut_hostname = 'str2-7050cx3-acs-07'
ptfhost = <tests.common.devices.ptf.PTFHost object at 0x7fb43f136290>
ipv4 = False, ipv6 = True, mtu = 1514, vlan_mac = u'00:aa:bb:cc:dd:ee'

    @pytest.mark.parametrize("ipv4, ipv6, mtu", [pytest.param(False, True, 1514)])
    def test_bgp_speaker_announce_routes_v6(common_setup_teardown, tbinfo, duthosts, rand_one_dut_hostname, ptfhost, ipv4, ipv6, mtu, vlan_mac):
        """Setup bgp speaker on T0 topology and verify routes advertised by bgp speaker is received by T0 TOR
    
        """
        duthost = duthosts[rand_one_dut_hostname]
        nexthops = common_setup_teardown[4]
>       bgp_speaker_announce_routes_common(common_setup_teardown, tbinfo, duthost, ptfhost, ipv4, ipv6, mtu, "v6", "fc00:10::/64", nexthops, vlan_mac)

common_setup_teardown = (u'10.64.246.139', {'deployment_id': u'1', 'dhcp_servers': [u'192.0.0.1', u'192.0.0.2', u'192.0.0.3', u'192.0.0.4', u'....4/21')], [IPNetwork('fc02:1000::2/64'), IPNetwork('fc02:1000::3/64'), IPNetwork('fc02:1000::4/64')], u'Vlan1000', ...)
duthost    = <MultiAsicSonicHost> str2-7050cx3-acs-07
duthosts   = <tests.common.devices.duthosts.DutHosts object at 0x7fb445859110>
ipv4       = False
ipv6       = True
mtu        = 1514
nexthops   = [IPNetwork('fc02:1000::2/64'), IPNetwork('fc02:1000::3/64'), IPNetwork('fc02:1000::4/64')]
ptfhost    = <tests.common.devices.ptf.PTFHost object at 0x7fb43f136290>
rand_one_dut_hostname = 'str2-7050cx3-acs-07'
tbinfo     = {'auto_recover': 'True', 'comment': 'hellogemini', 'conf-name': 'vms17-dual-t0-7050-1', 'duts': ['str2-7050cx3-acs-06', 'str2-7050cx3-acs-07'], ...}
vlan_mac   = u'00:aa:bb:cc:dd:ee'

bgp/test_bgp_speaker.py:332: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

common_setup_teardown = (u'10.64.246.139', {'deployment_id': u'1', 'dhcp_servers': [u'192.0.0.1', u'192.0.0.2', u'192.0.0.3', u'192.0.0.4', u'....4/21')], [IPNetwork('fc02:1000::2/64'), IPNetwork('fc02:1000::3/64'), IPNetwork('fc02:1000::4/64')], u'Vlan1000', ...)
tbinfo = {'auto_recover': 'True', 'comment': 'hellogemini', 'conf-name': 'vms17-dual-t0-7050-1', 'duts': ['str2-7050cx3-acs-06', 'str2-7050cx3-acs-07'], ...}
duthost = <MultiAsicSonicHost> str2-7050cx3-acs-07
ptfhost = <tests.common.devices.ptf.PTFHost object at 0x7fb43f136290>
ipv4 = False, ipv6 = True, mtu = 1514, family = 'v6', prefix = 'fc00:10::/64'
nexthop_ips = [IPNetwork('fc02:1000::2/64'), IPNetwork('fc02:1000::3/64'), IPNetwork('fc02:1000::4/64')]
vlan_mac = u'00:aa:bb:cc:dd:ee'

    def bgp_speaker_announce_routes_common(common_setup_teardown,
                                           tbinfo, duthost, ptfhost, ipv4, ipv6, mtu,
                                           family, prefix, nexthop_ips, vlan_mac):
        """Setup bgp speaker on T0 topology and verify routes advertised by bgp speaker is received by T0 TOR
    
        """
        ptfip, mg_facts, interface_facts, vlan_ips, _, vlan_if_name, speaker_ips, port_num, http_ready = common_setup_teardown
        assert http_ready
    
        logger.info("announce route")
        peer_range = mg_facts['minigraph_bgp_peers_with_range'][0]['ip_range'][0]
        lo_addr = mg_facts['minigraph_lo_interfaces'][0]['addr']
    
        logger.info("Announce ip%s prefixes over ipv4 bgp sessions" % family)
        announce_route(ptfip, lo_addr, prefix, nexthop_ips[1].ip, port_num[0])
        announce_route(ptfip, lo_addr, prefix, nexthop_ips[2].ip, port_num[1])
        announce_route(ptfip, lo_addr, peer_range, vlan_ips[0].ip, port_num[2])
    
        logger.info("Wait some time to make sure routes announced to dynamic bgp neighbors")
        time.sleep(30)
    
        logger.info("Verify accepted prefixes of the dynamic neighbors are correct")
        bgp_facts = duthost.bgp_facts()['ansible_facts']
        for ip in speaker_ips:
>           assert bgp_facts['bgp_neighbors'][str(ip.ip)]['accepted prefixes'] == 1
E           AssertionError

_          = [IPNetwork('fc02:1000::2/64'), IPNetwork('fc02:1000::3/64'), IPNetwork('fc02:1000::4/64')]
bgp_facts  = {'bgp_neighbors': {'10.0.1.57': {'accepted prefixes': 2, 'admin': u'up', 'capabilities': {'peer restart timer': 300}, ...nnections dropped': 6, ...}, ...}, 'bgp_statistics': {'ipv4': 7, 'ipv4_admin_down': 0, 'ipv4_idle': 0, 'ipv6': 4, ...}}
common_setup_teardown = (u'10.64.246.139', {'deployment_id': u'1', 'dhcp_servers': [u'192.0.0.1', u'192.0.0.2', u'192.0.0.3', u'192.0.0.4', u'....4/21')], [IPNetwork('fc02:1000::2/64'), IPNetwork('fc02:1000::3/64'), IPNetwork('fc02:1000::4/64')], u'Vlan1000', ...)
duthost    = <MultiAsicSonicHost> str2-7050cx3-acs-07
family     = 'v6'
http_ready = True
interface_facts = {'ansible_interface_facts': {'Bridge': {'active': True, 'device': u'Bridge', 'id': u'8000.d4aff74daf18', 'interfaces':...e80::d6af:f7ff:fe4d:af18', u'fc00:1::39', u'fe80::8c90:61ff:fee4:aac6', ...]}, 'ansible_interface_link_down_ports': []}
ip         = IPNetwork('10.255.0.1/25')
ipv4       = False
ipv6       = True
lo_addr    = u'10.1.0.33'
mg_facts   = {'deployment_id': u'1', 'dhcp_servers': [u'192.0.0.1', u'192.0.0.2', u'192.0.0.3', u'192.0.0.4', u'192.0.0.5', u'192.0...16/28', u'10.3.149.170/31', u'40.122.216.24', u'13.91.48.226', ...], 'inventory_hostname': u'str2-7050cx3-acs-07', ...}
mtu        = 1514
nexthop_ips = [IPNetwork('fc02:1000::2/64'), IPNetwork('fc02:1000::3/64'), IPNetwork('fc02:1000::4/64')]
peer_range = u'10.255.0.0/25'
port_num   = [7000, 8000, 9000]
prefix     = 'fc00:10::/64'
ptfhost    = <tests.common.devices.ptf.PTFHost object at 0x7fb43f136290>
ptfip      = u'10.64.246.139'
speaker_ips = [IPNetwork('10.255.0.1/25'), IPNetwork('10.255.0.2/25'), IPNetwork('192.168.0.2/21')]
tbinfo     = {'auto_recover': 'True', 'comment': 'hellogemini', 'conf-name': 'vms17-dual-t0-7050-1', 'duts': ['str2-7050cx3-acs-06', 'str2-7050cx3-acs-07'], ...}
vlan_if_name = u'Vlan1000'
vlan_ips   = [IPNetwork('192.168.0.2/21'), IPNetwork('192.168.0.3/21'), IPNetwork('192.168.0.4/21')]
vlan_mac   = u'00:aa:bb:cc:dd:ee'

bgp/test_bgp_speaker.py:254: AssertionError
@theasianpianist
Copy link
Contributor Author

this test should be skipped based on topology name for all dual ToR topologies

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dual ToR Platform ♊ Issues found on dual ToR platforms Issue for 202012
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants