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

orchagent would crash, when portsorch failed to remove bridge port #2961

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

inspurSDN
Copy link
Contributor

Root cause:
    Failed to remove bridge port becasue reference count is not 0

Solution:
    1. put DEL task into m_toSync, when portsorch failed to remove bridge port
    2. if port was removed from vlan but m_bridge_port_id is not SAI_NULL_OBJECT_ID,
       portsorch will try to remove bridgeport again until reference count is 0

What I did

Why I did it

How I verified it

Details if related

    Root cause:
        Failed to remove bridge port becasue reference count is not 0

    Solution:
        1. put DEL task into m_toSync, when portsorch failed to remove bridge port
        2. if port was removed from vlan but m_bridge_port_id is not SAI_NULL_OBJECT_ID,
           portsorch will try to remove bridgeport again until reference count is 0
@inspurSDN inspurSDN requested a review from prsunny as a code owner November 16, 2023 08:29
@@ -5437,11 +5455,15 @@ bool PortsOrch::removeBridgePort(Port &port)
{
SWSS_LOG_ERROR("Failed to remove bridge port %s from default 1Q bridge, rv:%d",
port.m_alias.c_str(), status);
#if 0
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We cannot have dead code.

@prsunny
Copy link
Collaborator

prsunny commented Nov 16, 2023

Please add unit tests

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

Successfully merging this pull request may close these issues.

2 participants