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

[warm-restart] Fix teamd container warm restart issue #1810

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kuanyu99
Copy link

What I did

Fix the warm restart function of the teamd container

Why I did it

Originally, after stopping the teamd container, it will try to temove the LAG ports. When orchagent receive the modification, it will encounter error for removing the LAG ports because there are AclTable on them.

The error will be like:

May 11 02:06:16.633270 as7816-64x NOTICE swss#orchagent: :- removeLagMember: Remove member Ethernet112 from LAG PortChannel0001 lid:2000000000b10 lmid:1b000000000b14
May 11 02:06:16.634260 as7816-64x ERR swss#orchagent: :- removeLag: Failed to remove ref count 3 LAG PortChannel0001
May 11 02:06:16.634260 as7816-64x ERR swss#orchagent: :- removeLag: Failed to remove ref count 3 LAG PortChannel0002
May 11 02:06:16.634260 as7816-64x ERR swss#orchagent: :- removeLag: Failed to remove ref count 3 LAG PortChannel0003
May 11 02:06:16.634260 as7816-64x ERR swss#orchagent: :- removeLag: Failed to remove ref count 3 LAG PortChannel0004

How I verified it

  1. Enable the warm-restart flag by sudo config warm_restart enable teamd
  2. Restart the teamd container by sudo systemctl restart teamd
  3. Check the syslog and make sure no "removeLag" orchagent error

Details if related

  • Check the WARM_RESTART_ENABLE_TABLE for teamd when stopping the teamsyncd.
    If the teamd warm restart is enabled, skip cleaning the LAG resource

* Check the WARM_RESTART_ENABLE_TABLE for teamd when stopping the teamsyncd.
  If the teamd warm restart is enabled, skip cleaning the LAG resource
@kuanyu99 kuanyu99 requested a review from prsunny as a code owner June 29, 2021 02:33
@kuanyu99
Copy link
Author

/azp run

@azure-pipelines
Copy link

Commenter does not have sufficient privileges for PR 1810 in repo Azure/sonic-swss

@prsunny prsunny requested a review from judyjoseph July 17, 2021 01:06
@kuanyu99
Copy link
Author

kuanyu99 commented Oct 6, 2021

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

EdenGri pushed a commit to EdenGri/sonic-swss that referenced this pull request Feb 28, 2022
…db (sonic-net#1810)

With switch to swsscommon, the get operations return NULL ('') if there
are no entries in any table. But the existing code for handling counters
values in the case of absence of entries assumes that the get operations
return 'None', which was the case with swsssdk. This was causing
problem.

For PG_WATERMARK_STAT_COUNTER SAI does not support
SAI_INGRESS_PRIORITY_GROUP_STAT_XOFF_ROOM_WATERMARK_BYTES and
SAI_INGRESS_PRIORITY_GROUP_STAT_SHARED_WATERMARK_BYTES. So there are no
objects in the counters db. With swsscommon, in the absence of objects,
an empty string ('') is returned instead of 'None'. The code expecting
'None' tries to converts the empty string to integer and throws error.
This is fixed by adding check for empty string in addition to 'None'.

Signed-off-by: vedganes <vedavinayagam.ganesan@nokia.com>
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