Is it platform specific
generic
Importance or Severity
Critical
Description of the bug
test_disk_exhaustion.py::test_disk_exhaustion is not updated to IPv6 only topology
Steps to Reproduce
run test_disk_exhaustion.py::test_disk_exhaustion on IPv6 only topology
Actual Behavior and Expected Behavior
when running the test on v6 only an err is raised "IndexError: list index out of range" when running peer_ip_ifaces_pair = [(pair[0], mg_facts["minigraph_portchannels"][pair[1]]["members"]) for pair in peer_ip_pc_pair]
this is because peer_ip_pc_pair is an empty list.
peer_ip_pc_pair is an empty list because it defiend pnly for v4:
peer_ip_pc_pair = [(pc["peer_addr"], pc["attachto"]) for pc in mg_facts["minigraph_portchannel_interfaces"]
if ipaddress.ip_address(pc['peer_addr']).version == 4]
The test shuold be adjust to v6 as well
Relevant log output
def construct_packet_and_get_params(duthost, ptfadapter, tbinfo):
"""
Construct data packet and get related params
"""
mg_facts = duthost.get_extended_minigraph_facts(tbinfo)
is_backend_topo = 'backend' in tbinfo['topo']['name']
# generate peer_ip and port channel pair, be like:[("10.0.0.57", "PortChannel0001")]
peer_ip_pc_pair = [(pc["peer_addr"], pc["attachto"]) for pc in mg_facts["minigraph_portchannel_interfaces"]
if
ipaddress.ip_address(pc['peer_addr']).version == 4]
pc_ports_map = {pair[1]: mg_facts["minigraph_portchannels"][pair[1]]["members"] for pair in
peer_ip_pc_pair}
if is_backend_topo:
# generate peer_ip and subinterfaces pair ex. [("10.0.0.57", ["Ethernet48.10"])]
peer_ip_ifaces_pair = [(subintf_info["peer_addr"], [subintf_info["attachto"]]) for subintf_info in
mg_facts["minigraph_vlan_sub_interfaces"]
if ipaddress.ip_address(subintf_info['peer_addr']).version == 4]
elif len(mg_facts["minigraph_interfaces"]) >= 2:
# generate peer_ip and interfaces pair,
# be like:[("10.0.0.57", ["Ethernet48"])]
peer_ip_ifaces_pair = [(intf["peer_addr"], [intf["attachto"]]) for intf in mg_facts["minigraph_interfaces"]
if
ipaddress.ip_address(intf['peer_addr']).version == 4]
else:
# generate peer_ip and interfaces(port channel members) pair,
# be like:[("10.0.0.57", ["Ethernet48", "Ethernet52"])]
peer_ip_ifaces_pair = [(pair[0], mg_facts["minigraph_portchannels"][pair[1]]["members"]) for pair in
peer_ip_pc_pair]
# use first port of first peer_ip_ifaces pair as input port
# all ports in second peer_ip_ifaces pair will be output/forward port
> ptf_port_idx = mg_facts["minigraph_ptf_indices"][peer_ip_ifaces_pair[0][1][0].split(".")[0]]
E IndexError: list index out of range
is_backend_topo = False
mg_facts = {'deployment_id': '1', 'dhcp_servers': [], 'dhcpv6_servers': [], 'forced_mgmt_routes': ['10.75.0.0/16', '10.213.0.0/16', '10.215.0.0/16', '10.9.0.0/16', '10.212.0.0/16', '10.245.0.0/16', ...], ...}
pc_ports_map = {}
peer_ip_ifaces_pair = []
Output of show version
Attach files (if any)
No response
Is it platform specific
generic
Importance or Severity
Critical
Description of the bug
test_disk_exhaustion.py::test_disk_exhaustion is not updated to IPv6 only topology
Steps to Reproduce
run test_disk_exhaustion.py::test_disk_exhaustion on IPv6 only topology
Actual Behavior and Expected Behavior
when running the test on v6 only an err is raised "IndexError: list index out of range" when running
peer_ip_ifaces_pair = [(pair[0], mg_facts["minigraph_portchannels"][pair[1]]["members"]) for pair in peer_ip_pc_pair]this is because
peer_ip_pc_pairis an empty list.peer_ip_pc_pairis an empty list because it defiend pnly for v4:The test shuold be adjust to v6 as well
Relevant log output
def construct_packet_and_get_params(duthost, ptfadapter, tbinfo): """ Construct data packet and get related params """ mg_facts = duthost.get_extended_minigraph_facts(tbinfo) is_backend_topo = 'backend' in tbinfo['topo']['name'] # generate peer_ip and port channel pair, be like:[("10.0.0.57", "PortChannel0001")] peer_ip_pc_pair = [(pc["peer_addr"], pc["attachto"]) for pc in mg_facts["minigraph_portchannel_interfaces"] if ipaddress.ip_address(pc['peer_addr']).version == 4] pc_ports_map = {pair[1]: mg_facts["minigraph_portchannels"][pair[1]]["members"] for pair in peer_ip_pc_pair} if is_backend_topo: # generate peer_ip and subinterfaces pair ex. [("10.0.0.57", ["Ethernet48.10"])] peer_ip_ifaces_pair = [(subintf_info["peer_addr"], [subintf_info["attachto"]]) for subintf_info in mg_facts["minigraph_vlan_sub_interfaces"] if ipaddress.ip_address(subintf_info['peer_addr']).version == 4] elif len(mg_facts["minigraph_interfaces"]) >= 2: # generate peer_ip and interfaces pair, # be like:[("10.0.0.57", ["Ethernet48"])] peer_ip_ifaces_pair = [(intf["peer_addr"], [intf["attachto"]]) for intf in mg_facts["minigraph_interfaces"] if ipaddress.ip_address(intf['peer_addr']).version == 4] else: # generate peer_ip and interfaces(port channel members) pair, # be like:[("10.0.0.57", ["Ethernet48", "Ethernet52"])] peer_ip_ifaces_pair = [(pair[0], mg_facts["minigraph_portchannels"][pair[1]]["members"]) for pair in peer_ip_pc_pair] # use first port of first peer_ip_ifaces pair as input port # all ports in second peer_ip_ifaces pair will be output/forward port > ptf_port_idx = mg_facts["minigraph_ptf_indices"][peer_ip_ifaces_pair[0][1][0].split(".")[0]] E IndexError: list index out of range is_backend_topo = False mg_facts = {'deployment_id': '1', 'dhcp_servers': [], 'dhcpv6_servers': [], 'forced_mgmt_routes': ['10.75.0.0/16', '10.213.0.0/16', '10.215.0.0/16', '10.9.0.0/16', '10.212.0.0/16', '10.245.0.0/16', ...], ...} pc_ports_map = {} peer_ip_ifaces_pair = []Output of
show versionAttach files (if any)
No response