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

Portchannel with subinterfaces lead to orchagent crash #4142

Closed
mkovnir opened this issue Feb 12, 2020 · 1 comment
Closed

Portchannel with subinterfaces lead to orchagent crash #4142

mkovnir opened this issue Feb 12, 2020 · 1 comment

Comments

@mkovnir
Copy link

mkovnir commented Feb 12, 2020

Description

Orchagent crash if configuration contain Portchannel in routed mode with subinterfaces.

Steps to reproduce the issue:

  1. Apply the following sample configuration:
{
"VLAN_SUB_INTERFACE": {
        "PortChannel2.21": {  "admin_status": "up" }, 
        "PortChannel2.21|198.18.21.10/30": {}
    }
} 

Describe the results you received:
After configuration apply orchagent crashs and the following errors are appear in syslog:

NOTICE swss#orchagent: :- addSubPort: Sub interface PortChannel2.21 inherits mtu size 9100 from parent port PortChannel2
ERR swss#orchagent: :- meta_generic_validation_objlist: SAI_ROUTER_INTERFACE_ATTR_PORT_ID:SAI_ATTR_VALUE_TYPE_OBJECT_ID object on list [0] is NULL, but not allowed
ERR swss#orchagent: :- addRouterIntfs: Failed to create router interface PortChannel2.21, rv:-5
INFO swss#supervisord: orchagent terminate called after throwing an instance of 'std::runtime_error'
INFO swss#supervisord: orchagent   what():  Failed to create router interface.
INFO swss#supervisor-proc-exit-listener: Process orchagent exited unxepectedly. Terminating supervisor...

Describe the results you expected:
Portchannel with subinterfaces should be created, same as Ethernet with subinterfaces.

@wendani
Copy link
Contributor

wendani commented Mar 29, 2020

Thanks for reporting the issue. I just noticed your post.
I believe the problem is here: https://github.com/Azure/sonic-swss/blob/master/orchagent/portsorch.cpp#L617

When adding the parent port oid, we did not check the type of the parent port, whether it is of type PORT (physical port) or LAG (port channel). This should cause the sairedis metadata validation to fail.

When the parent port is LAG, we should use m_lag_id not m_port_id, which is 0 (SAI_NULL_OBJECT_ID) in the LAG Port object case.

@wendani wendani removed their assignment Mar 29, 2020
lguohan pushed a commit to sonic-net/sonic-swss that referenced this issue Apr 3, 2020
…ort is LAG (#1235)

Fix to sonic-net/sonic-buildimage#4142

Add vs test on lag sub interface based on unconventional lag naming "PortChannel1.20" to fit the interface name within 15 characters

Signed-off-by: Wenda Ni [email protected]
@lguohan lguohan closed this as completed Apr 3, 2020
abdosi pushed a commit to sonic-net/sonic-swss that referenced this issue Apr 19, 2020
…ort is LAG (#1235)

Fix to sonic-net/sonic-buildimage#4142

Add vs test on lag sub interface based on unconventional lag naming "PortChannel1.20" to fit the interface name within 15 characters

Signed-off-by: Wenda Ni [email protected]
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

3 participants