Skip to content

test_neighbor_mac.py failed on sonic-vpp #1662

@yue-fred-gao

Description

@yue-fred-gao

test_neighbor_mac.py failed due to a race condition in setting IP on Ethernet0. This is because in response to removing Ethernet0 from PortChannel, sonic-vpp needed to update all the affected routes which took a long time. In the end, setting IP on Ethernet0 happened before the interface was removed from the PortChannel. At the end, the IP on Ethernet0 was not set successfully so ping failed.

Below is sairedis.rec to manifest the out of order sequence.
Here is Ethernet0 added as LAG member.

2025-10-01.23:38:45.325507|c|SAI_OBJECT_TYPE_LAG_MEMBER:oid:0x1b0000000005ba|SAI_LAG_MEMBER_ATTR_LAG_ID=oid:0x20000000005b2|SAI_LAG_MEMBER_ATTR_PORT_ID=oid:0x100000
0000030|SAI_LAG_MEMBER_ATTR_EGRESS_DISABLE=true|SAI_LAG_MEMBER_ATTR_INGRESS_DISABLE=true
2025-10-01.23:38:45.456866|s|SAI_OBJECT_TYPE_LAG_MEMBER:oid:0x1b0000000005ba|SAI_LAG_MEMBER_ATTR_EGRESS_DISABLE=true
2025-10-01.23:38:45.457593|s|SAI_OBJECT_TYPE_LAG_MEMBER:oid:0x1b0000000005ba|SAI_LAG_MEMBER_ATTR_INGRESS_DISABLE=true

Here is creating router interface for Ethernet0 and set IP address

2025-10-01.23:43:47.059575|c|SAI_OBJECT_TYPE_ROUTER_INTERFACE:oid:0x60000000006d9|SAI_ROUTER_INTERFACE_ATTR_VIRTUAL_ROUTER_ID=oid:0x3000000000002|SAI_ROUTER_INTERFA
CE_ATTR_SRC_MAC_ADDRESS=22:5D:A7:7E:B7:8E|SAI_ROUTER_INTERFACE_ATTR_TYPE=SAI_ROUTER_INTERFACE_TYPE_PORT|SAI_ROUTER_INTERFACE_ATTR_PORT_ID=oid:0x1000000000030|SAI_RO
UTER_INTERFACE_ATTR_MTU=9100|SAI_ROUTER_INTERFACE_ATTR_NAT_ZONE_ID=0
2025-10-01.23:43:47.070258|c|SAI_OBJECT_TYPE_ROUTE_ENTRY:{"dest":"20.0.0.1/32","switch_id":"oid:0x21000000000000","vr":"oid:0x3000000000002"}|SAI_ROUTE_ENTRY_ATTR_P
ACKET_ACTION=SAI_PACKET_ACTION_FORWARD|SAI_ROUTE_ENTRY_ATTR_NEXT_HOP_ID=oid:0x1000000000001
2025-10-01.23:43:47.089149|C|SAI_OBJECT_TYPE_ROUTE_ENTRY||{"dest":"20.0.0.0/24","switch_id":"oid:0x21000000000000","vr":"oid:0x3000000000002"}|SAI_ROUTE_ENTRY_ATTR_
NEXT_HOP_ID=oid:0x60000000006d9

Here is the removal of Ethernet0 from LAG
2025-10-01.23:43:47.128653|r|SAI_OBJECT_TYPE_LAG_MEMBER:oid:0x1b0000000005ba

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions