[DPU] [HA] Add support for Flow API #4218
Build #20260331.52 had test failures
Details
- Failed: 34 (0.40%)
- Passed: 8,430 (98.41%)
- Other: 102 (1.19%)
- Total: 8,566
- 62041 of 80323 lines covered (77.24%)
Annotations
Check failure on line 231123 in Build log
azure-pipelines / Azure.sonic-swss
Build log #L231123
Bash exited with code '123'.
Check failure on line 16552 in Build log
azure-pipelines / Azure.sonic-swss
Build log #L16552
Bash exited with code '123'.
Check failure on line 1 in test_multi_nexthop
azure-pipelines / Azure.sonic-swss
test_multi_nexthop
AssertionError: Operation timed out after 20.0 seconds with result None
Raw output
self = <test_mux_prefixroute.TestMuxTunnel object at 0x79e151f76cb0>
dvs = <conftest.DockerVirtualSwitch object at 0x79e151faf160>
dvs_route = <dvslib.dvs_route.DVSRoute object at 0x79e151ffe6b0>
intf_fdb_map = {'Ethernet0': '00:00:00:00:11:11', 'Ethernet4': 'aa:ad:79:4c:01:1f', 'Ethernet8': 'fa:ac:01:d6:60:b8'}
neighbor_cleanup = None, testlog = None
setup = ('oid:0x1400000000061d', 'oid:0x1400000000061e', 'oid:0x1400000000061f', 'oid:0x14000000000620')
def test_multi_nexthop(self, dvs, dvs_route, intf_fdb_map, neighbor_cleanup, testlog, setup):
appdb = swsscommon.DBConnector(swsscommon.APPL_DB, dvs.redis_sock, 0)
asicdb = dvs.get_asic_db()
macs = [intf_fdb_map["Ethernet0"], intf_fdb_map["Ethernet4"]]
new_mac = intf_fdb_map["Ethernet8"]
> self.create_and_test_multi_nexthop_routes(dvs, dvs_route, appdb, macs, new_mac, asicdb)
test_mux_prefixroute.py:1906:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test_mux_prefixroute.py:1083: in create_and_test_multi_nexthop_routes
self.multi_nexthop_test_create(appdb, asicdb, dvs, dvs_route, route_ipv4, mux_ports, ipv4_nexthops)
test_mux_prefixroute.py:808: in multi_nexthop_test_create
self.multi_nexthop_check(asicdb, dvs_route, route, nexthops, states, non_mux_nexthop)
test_mux_prefixroute.py:780: in multi_nexthop_check
if state == ACTIVE and self.check_route_nexthop(dvs_route, asicdb, rt, nexthops[i]):
test_mux_prefixroute.py:299: in check_route_nexthop
route_key = dvs_route.check_asicdb_route_entries([route])
dvslib/dvs_route.py:16: in check_asicdb_route_entries
wait_for_result(_access_function)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
polling_function = <function DVSRoute.check_asicdb_route_entries.<locals>._access_function at 0x79e151e5a560>
polling_config = PollingConfig(polling_interval=0.01, timeout=20.0, strict=True)
failure_message = None
def wait_for_result(
polling_function: Callable[[], Tuple[bool, Any]],
polling_config: PollingConfig = PollingConfig(),
failure_message: str = None,
) -> Tuple[bool, Any]:
"""Run `polling_function` periodically using the specified `polling_config`.
Args:
polling_function: The function being polled. The function cannot take any arguments and
must return a status which indicates if the function was succesful or not, as well as
some return value.
polling_config: The parameters to use to poll the polling function.
failure_message: The message to print if the call times out. This will only take effect
if the PollingConfig is set to strict.
Returns:
If the polling function succeeds, then this method will return True and the output of the
polling function.
If it does not succeed within the provided timeout, it will return False and whatever the
output of the polling function was on the final attempt.
"""
for _ in range(polling_config.iterations()):
status, result = polling_function()
if status:
return (True, result)
time.sleep(polling_config.polling_interval)
if polling_config.strict:
message = failure_message or f"Operation timed out after {polling_config.timeout} seconds with result {result}"
> assert False, message
E AssertionError: Operation timed out after 20.0 seconds with result None
dvslib/dvs_common.py:60: AssertionError
Check failure on line 1 in test_acl
azure-pipelines / Azure.sonic-swss
test_acl
AssertionError: Unexpected number of keys: expected=0, received=1 (('oid:0x80000000009e9',)), table="ASIC_STATE:SAI_OBJECT_TYPE_ACL_ENTRY"
Raw output
self = <test_mux_prefixroute.TestMuxTunnel object at 0x79e151f765f0>
dvs = <conftest.DockerVirtualSwitch object at 0x79e151faf160>
dvs_acl = <dvslib.dvs_acl.DVSAcl object at 0x79e151e02950>, testlog = None
def test_acl(self, dvs, dvs_acl, testlog):
""" test acl and mux state change """
appdb = swsscommon.DBConnector(swsscommon.APPL_DB, dvs.redis_sock, 0)
try:
> self.create_and_test_acl(appdb, dvs_acl)
test_mux_prefixroute.py:1914:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test_mux_prefixroute.py:1242: in create_and_test_acl
dvs_acl.verify_no_acl_rules()
dvslib/dvs_acl.py:498: in verify_no_acl_rules
keys = self.asic_db.wait_for_n_keys("ASIC_STATE:SAI_OBJECT_TYPE_ACL_ENTRY", num_keys)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <dvslib.dvs_database.DVSDatabase object at 0x79e152025990>
table_name = 'ASIC_STATE:SAI_OBJECT_TYPE_ACL_ENTRY', num_keys = 0
wait_at_least_n_keys = False
polling_config = PollingConfig(polling_interval=0.01, timeout=20.0, strict=True)
failure_message = None
def wait_for_n_keys(
self,
table_name: str,
num_keys: int,
wait_at_least_n_keys: bool = False,
polling_config: PollingConfig = PollingConfig(),
failure_message: str = None,
) -> List[str]:
"""Wait for the specified number of keys to exist in the table.
Args:
table_name: The name of the table from which to fetch the keys.
num_keys: The expected number of keys to retrieve from the table.
polling_config: The parameters to use to poll the db.
failure_message: The message to print if the call times out. This will only take effect
if the PollingConfig is set to strict.
Returns:
The keys stored in the table. If no keys are found, then an empty List is returned.
"""
def access_function():
keys = self.get_keys(table_name)
if wait_at_least_n_keys:
return (len(keys) >= num_keys, keys)
else:
return (len(keys) == num_keys, keys)
status, result = wait_for_result(
access_function, self._disable_strict_polling(polling_config)
)
if not status:
message = failure_message or (
f"Unexpected number of keys: expected={num_keys}, received={len(result)} "
f'({result}), table="{table_name}"'
)
> assert not polling_config.strict, message
E AssertionError: Unexpected number of keys: expected=0, received=1 (('oid:0x80000000009e9',)), table="ASIC_STATE:SAI_OBJECT_TYPE_ACL_ENTRY"
dvslib/dvs_database.py:424: AssertionError
During handling of the above exception, another exception occurred:
self = <test_mux_prefixroute.TestMuxTunnel object at 0x79e151f765f0>
dvs = <conftest.DockerVirtualSwitch object at 0x79e151faf160>
dvs_acl = <dvslib.dvs_acl.DVSAcl object at 0x79e151e02950>, testlog = None
def test_acl(self, dvs, dvs_acl, testlog):
""" test acl and mux state change """
appdb = swsscommon.DBConnector(swsscommon.APPL_DB, dvs.redis_sock, 0)
try:
self.create_and_test_acl(appdb, dvs_acl)
finally:
self.set_mux_state(appdb, "Ethernet0", "active")
self.set_mux_state(appdb, "Ethernet4", "active")
self.set_mux_state(appdb, "Ethernet8", "active")
> dvs_acl.verify_no_acl_rules()
test_mux_prefixroute.py:1919:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
dvslib/dvs_acl.py:498: in verify_no_acl_rules
keys = self.asic_db.wait_for_n_keys("ASIC_STATE:SAI_OBJECT_TYPE_ACL_ENTRY", num_keys)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <dvslib.dvs_database.DVSDatabase object at 0x79e152025990>
table_na
azure-pipelines / Azure.sonic-swss
test_neighbor_miss[active->ping_serv->standby->resolve_entry->delete_entry-IPv6]
AssertionError: Operation timed out after 20.0 seconds with result None
Raw output
self = <test_mux_prefixroute.TestMuxTunnel object at 0x79e151f77160>
dvs = <conftest.DockerVirtualSwitch object at 0x79e151faf160>
dvs_route = <dvslib.dvs_route.DVSRoute object at 0x79e151ffe6b0>
ips_for_test = ['fc02:1000::100', 'fc02:1000::101', 'fc02:1000::102']
neigh_miss_test_sequence = [{'action': 'active', 'result': {'expect_neigh': False, 'expect_route': False, 'real_mac': False}}, {'action': 'ping_s...l_mac': True}}, {'action': 'delete_entry', 'result': {'expect_neigh': False, 'expect_route': False, 'real_mac': True}}]
ip_to_intf_map = {'fc02:1000::100': 'Ethernet0', 'fc02:1000::101': 'Ethernet4', 'fc02:1000::102': 'Ethernet8', 'fc02:1000::200': 'Ethernet0', ...}
intf_fdb_map = {'Ethernet0': '00:00:00:00:11:11', 'Ethernet4': 'aa:ad:79:4c:01:1f', 'Ethernet8': 'fa:ac:01:d6:60:b8'}
neighbor_cleanup = None
setup = ('oid:0x1400000000061d', 'oid:0x1400000000061e', 'oid:0x1400000000061f', 'oid:0x14000000000620')
setup_vlan = None, setup_mux_cable = None, setup_tunnel = None
setup_peer_switch = None, testlog = None
def test_neighbor_miss(
self, dvs, dvs_route, ips_for_test, neigh_miss_test_sequence,
ip_to_intf_map, intf_fdb_map, neighbor_cleanup, setup, setup_vlan,
setup_mux_cable, setup_tunnel, setup_peer_switch, testlog
):
ip = ips_for_test[0]
intf = ip_to_intf_map[ip]
mac = intf_fdb_map[intf]
test_info = {
IP: ip,
INTF: intf,
MAC: mac
}
for step in neigh_miss_test_sequence:
self.execute_action(step[TEST_ACTION], dvs, test_info)
exp_result = step[EXPECTED_RESULT]
print(step)
> self.check_neighbor_state(
dvs, dvs_route, ip,
expect_route=exp_result[EXPECT_ROUTE],
expect_neigh=exp_result[EXPECT_NEIGH],
expected_mac=mac if exp_result[REAL_MAC] else '00:00:00:00:00:00'
)
test_mux_prefixroute.py:1947:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test_mux_prefixroute.py:1591: in check_neighbor_state
dvs_route.check_asicdb_deleted_route_entries([prefix])
dvslib/dvs_route.py:28: in check_asicdb_deleted_route_entries
wait_for_result(_access_function)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
polling_function = <function DVSRoute.check_asicdb_deleted_route_entries.<locals>._access_function at 0x79e151ee9a20>
polling_config = PollingConfig(polling_interval=0.01, timeout=20.0, strict=True)
failure_message = None
def wait_for_result(
polling_function: Callable[[], Tuple[bool, Any]],
polling_config: PollingConfig = PollingConfig(),
failure_message: str = None,
) -> Tuple[bool, Any]:
"""Run `polling_function` periodically using the specified `polling_config`.
Args:
polling_function: The function being polled. The function cannot take any arguments and
must return a status which indicates if the function was succesful or not, as well as
some return value.
polling_config: The parameters to use to poll the polling function.
failure_message: The message to print if the call times out. This will only take effect
if the PollingConfig is set to strict.
Returns:
If the polling function succeeds, then this method will return True and the output of the
polling function.
If it does not succeed within the provided timeout, it will return False and whatever the
output of the polling function was on the final attempt.
"""
for _ in range(polling_config.iterations()):
status, result = polling_function()
if status:
return (True, result)
time.sleep(polling_config.polling_interval)
if polling_config.strict:
message = fail
azure-pipelines / Azure.sonic-swss
test_neighbor_miss[active->ping_serv->standby->resolve_entry->delete_entry-IPv4]
AssertionError: Operation timed out after 20.0 seconds with result None
Raw output
self = <test_mux_prefixroute.TestMuxTunnel object at 0x79e151f75840>
dvs = <conftest.DockerVirtualSwitch object at 0x79e151faf160>
dvs_route = <dvslib.dvs_route.DVSRoute object at 0x79e151ffe6b0>
ips_for_test = ['192.168.0.100', '192.168.0.101', '192.168.0.102']
neigh_miss_test_sequence = [{'action': 'active', 'result': {'expect_neigh': False, 'expect_route': False, 'real_mac': False}}, {'action': 'ping_s...l_mac': True}}, {'action': 'delete_entry', 'result': {'expect_neigh': False, 'expect_route': False, 'real_mac': True}}]
ip_to_intf_map = {'192.168.0.100': 'Ethernet0', '192.168.0.101': 'Ethernet4', '192.168.0.102': 'Ethernet8', '192.168.0.200': 'Ethernet0', ...}
intf_fdb_map = {'Ethernet0': '00:00:00:00:11:11', 'Ethernet4': 'aa:ad:79:4c:01:1f', 'Ethernet8': 'fa:ac:01:d6:60:b8'}
neighbor_cleanup = None
setup = ('oid:0x1400000000061d', 'oid:0x1400000000061e', 'oid:0x1400000000061f', 'oid:0x14000000000620')
setup_vlan = None, setup_mux_cable = None, setup_tunnel = None
setup_peer_switch = None, testlog = None
def test_neighbor_miss(
self, dvs, dvs_route, ips_for_test, neigh_miss_test_sequence,
ip_to_intf_map, intf_fdb_map, neighbor_cleanup, setup, setup_vlan,
setup_mux_cable, setup_tunnel, setup_peer_switch, testlog
):
ip = ips_for_test[0]
intf = ip_to_intf_map[ip]
mac = intf_fdb_map[intf]
test_info = {
IP: ip,
INTF: intf,
MAC: mac
}
for step in neigh_miss_test_sequence:
self.execute_action(step[TEST_ACTION], dvs, test_info)
exp_result = step[EXPECTED_RESULT]
print(step)
> self.check_neighbor_state(
dvs, dvs_route, ip,
expect_route=exp_result[EXPECT_ROUTE],
expect_neigh=exp_result[EXPECT_NEIGH],
expected_mac=mac if exp_result[REAL_MAC] else '00:00:00:00:00:00'
)
test_mux_prefixroute.py:1947:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test_mux_prefixroute.py:1591: in check_neighbor_state
dvs_route.check_asicdb_deleted_route_entries([prefix])
dvslib/dvs_route.py:28: in check_asicdb_deleted_route_entries
wait_for_result(_access_function)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
polling_function = <function DVSRoute.check_asicdb_deleted_route_entries.<locals>._access_function at 0x79e151eeb130>
polling_config = PollingConfig(polling_interval=0.01, timeout=20.0, strict=True)
failure_message = None
def wait_for_result(
polling_function: Callable[[], Tuple[bool, Any]],
polling_config: PollingConfig = PollingConfig(),
failure_message: str = None,
) -> Tuple[bool, Any]:
"""Run `polling_function` periodically using the specified `polling_config`.
Args:
polling_function: The function being polled. The function cannot take any arguments and
must return a status which indicates if the function was succesful or not, as well as
some return value.
polling_config: The parameters to use to poll the polling function.
failure_message: The message to print if the call times out. This will only take effect
if the PollingConfig is set to strict.
Returns:
If the polling function succeeds, then this method will return True and the output of the
polling function.
If it does not succeed within the provided timeout, it will return False and whatever the
output of the polling function was on the final attempt.
"""
for _ in range(polling_config.iterations()):
status, result = polling_function()
if status:
return (True, result)
time.sleep(polling_config.polling_interval)
if polling_config.strict:
message = failure_mes