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

[teamsyncd] Update "oper_status" of LAG_TABLE in state_db (#3192) #3195

Merged
merged 1 commit into from
Jun 25, 2024

Conversation

super-jiying
Copy link
Contributor

@super-jiying super-jiying commented Jun 12, 2024

What I did

Fix for #3192

How I did it

In teamSync::addLag method, update lag "oper_status" status in state_db.

    bool lag_update = true;
    /* Return when the team instance has already been tracked */
    if (m_teamSelectables.find(lagName) != m_teamSelectables.end())
    {
        auto tsync = m_teamSelectables[lagName];
        if (tsync->admin_state == admin_state && tsync->oper_state == oper_state && tsync->mtu == mtu)
            return;
        tsync->admin_state = admin_state;
        tsync->oper_state = oper_state;
        tsync->mtu = mtu;
        lag_update = false;
    }

    FieldValueTuple s("state", "ok");
    fvVector.push_back(s);
    if (m_warmstart)
    {
        m_stateLagTablePreserved[lagName] = fvVector;
    }
    else
    {
        m_stateLagTable.set(lagName, fvVector);
    }

How to verify it

Manual Testing

@prsunny
Copy link
Collaborator

prsunny commented Jun 21, 2024

@judyjoseph , @saiarcot895 , could you folks review?

@prsunny prsunny requested a review from saiarcot895 June 21, 2024 18:42
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.

4 participants