swss.sh should check service enabled instead exists#24754
Merged
qiluo-msft merged 1 commit intosonic-net:masterfrom Dec 8, 2025
Merged
swss.sh should check service enabled instead exists#24754qiluo-msft merged 1 commit intosonic-net:masterfrom
qiluo-msft merged 1 commit intosonic-net:masterfrom
Conversation
Collaborator
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a bug where the swss service was attempting to wait on teamd even when the teamd feature was disabled. The root cause was that the helper function was checking for service existence rather than checking if the service was enabled.
Key Changes:
- Renamed
check_service_exists()tocheck_service_enabled()to better reflect its purpose - Changed implementation from
systemctl list-unitstosystemctl is-enabledto check service enablement status - Updated all call sites (radv and teamd dependency checks) to use the new function
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
saiarcot895
approved these changes
Dec 5, 2025
lizhijianrd
approved these changes
Dec 8, 2025
stephenxs
approved these changes
Dec 8, 2025
kewei-arista
pushed a commit
to kewei-arista/sonic-buildimage
that referenced
this pull request
Dec 8, 2025
Why I did it If teamd feature is disabled, sudo config feature state teamd disabled swss service should not wait on team container at all. Currently there is a process python3 /usr/bin/docker-wait-any -s swss -d syncd teamd However, a thread inside /usr/bin/docker-wait-any is actually crashed, and the behavior is same as ignoring teamd. It still keep the whole system working. The root fix should check service enabled instead exists, so it will not wait-any on teamd at all. After this PR, python3 /usr/bin/docker-wait-any -s swss -d syncd Work item tracking Microsoft ADO (number only): Fixing Bug: dockers flapping on SONiC fan out switch due to behavior change in docker-wait-any-rs compared to docker-wait-any when the docker does not exist sonic-net#24730
12 tasks
xwjiang-ms
added a commit
to xwjiang-ms/sonic-buildimage
that referenced
this pull request
Dec 10, 2025
…)" This reverts commit d3b5194. Signed-off-by: xiaweijiang <xiaweijiang@microsoft.com>
StormLiangMS
pushed a commit
that referenced
this pull request
Dec 10, 2025
hdwhdw
pushed a commit
to hdwhdw/sonic-buildimage
that referenced
this pull request
Dec 18, 2025
Why I did it If teamd feature is disabled, sudo config feature state teamd disabled swss service should not wait on team container at all. Currently there is a process python3 /usr/bin/docker-wait-any -s swss -d syncd teamd However, a thread inside /usr/bin/docker-wait-any is actually crashed, and the behavior is same as ignoring teamd. It still keep the whole system working. The root fix should check service enabled instead exists, so it will not wait-any on teamd at all. After this PR, python3 /usr/bin/docker-wait-any -s swss -d syncd Work item tracking Microsoft ADO (number only): Fixing Bug: dockers flapping on SONiC fan out switch due to behavior change in docker-wait-any-rs compared to docker-wait-any when the docker does not exist sonic-net#24730 Signed-off-by: Dawei Huang <daweihuang@microsoft.com>
hdwhdw
pushed a commit
to hdwhdw/sonic-buildimage
that referenced
this pull request
Dec 18, 2025
…)" (sonic-net#24794) Reverts sonic-net#24754 since it's causing pc/test_po_cleanup.py and autorestart/test_container_autorestart.py failure on multi-asic t1 pc/test_po_cleanup.py: Signed-off-by: Dawei Huang <daweihuang@microsoft.com>
xwjiang-ms
pushed a commit
to xwjiang-ms/sonic-buildimage
that referenced
this pull request
Dec 22, 2025
Why I did it If teamd feature is disabled, sudo config feature state teamd disabled swss service should not wait on team container at all. Currently there is a process python3 /usr/bin/docker-wait-any -s swss -d syncd teamd However, a thread inside /usr/bin/docker-wait-any is actually crashed, and the behavior is same as ignoring teamd. It still keep the whole system working. The root fix should check service enabled instead exists, so it will not wait-any on teamd at all. After this PR, python3 /usr/bin/docker-wait-any -s swss -d syncd Work item tracking Microsoft ADO (number only): Fixing Bug: dockers flapping on SONiC fan out switch due to behavior change in docker-wait-any-rs compared to docker-wait-any when the docker does not exist sonic-net#24730 Signed-off-by: xiaweijiang <xiaweijiang@microsoft.com>
xwjiang-ms
added a commit
to xwjiang-ms/sonic-buildimage
that referenced
this pull request
Dec 22, 2025
…)" (sonic-net#24794) Reverts sonic-net#24754 since it's causing pc/test_po_cleanup.py and autorestart/test_container_autorestart.py failure on multi-asic t1 pc/test_po_cleanup.py: Signed-off-by: xiaweijiang <xiaweijiang@microsoft.com>
qiluo-msft
added a commit
to qiluo-msft/sonic-buildimage
that referenced
this pull request
Jan 13, 2026
)" (sonic-net#24794) This reverts commit 75c4234.
qiluo-msft
added a commit
that referenced
this pull request
Jan 18, 2026
…4794) (#25037) #### Why I did it If teamd feature is disabled, ``` sudo config feature state teamd disabled ``` swss service should not wait on team container at all. Currently there is a process ``` python3 /usr/bin/docker-wait-any -s swss -d syncd teamd ``` However, a thread inside /usr/bin/docker-wait-any is actually crashed, and the behavior is same as ignoring teamd. It still keep the whole system working. The root fix should check service enabled instead exists, so it will not wait-any on teamd at all. After this PR, ``` python3 /usr/bin/docker-wait-any -s swss -d syncd ``` ##### Work item tracking - Microsoft ADO **(number only)**: - Fixing #24730
mssonicbld
added a commit
to mssonicbld/sonic-buildimage
that referenced
this pull request
Jan 19, 2026
)" (sonic-net#24794) #### Why I did it If teamd feature is disabled, ``` sudo config feature state teamd disabled ``` swss service should not wait on team container at all. Currently there is a process ``` python3 /usr/bin/docker-wait-any -s swss -d syncd teamd ``` However, a thread inside /usr/bin/docker-wait-any is actually crashed, and the behavior is same as ignoring teamd. It still keep the whole system working. The root fix should check service enabled instead exists, so it will not wait-any on teamd at all. After this PR, ``` python3 /usr/bin/docker-wait-any -s swss -d syncd ``` ##### Work item tracking - Microsoft ADO **(number only)**: - Fixing sonic-net#24730 #### How I did it #### How to verify it <!-- If PR needs to be backported, then the PR must be tested against the base branch and the earliest backport release branch and provide tested image version on these two branches. For example, if the PR is requested for master, 202211 and 202012, then the requester needs to provide test results on master and 202012. --> #### Which release branch to backport (provide reason below if selected) <!-- - Note we only backport fixes to a release branch, *not* features! - Please also provide a reason for the backporting below. - e.g. - [x] 202006 --> - [ ] 202205 - [ ] 202211 - [ ] 202305 - [ ] 202311 - [ ] 202405 - [ ] 202411 - [ ] 202505 #### Tested branch (Please provide the tested image version) <!-- - Please provide tested image version - e.g. - [x] 20201231.100 --> - [ ] <!-- image version 1 --> - [ ] <!-- image version 2 --> #### Description for the changelog <!-- Write a short (one line) summary that describes the changes in this pull request for inclusion in the changelog: --> <!-- Ensure to add label/tag for the feature raised. example - PR#2174 under sonic-utilities repo. where, Generic Config and Update feature has been labelled as GCU. --> #### Link to config_db schema for YANG module changes <!-- Provide a link to config_db schema for the table for which YANG model is defined Link should point to correct section on https://github.com/Azure/sonic-buildimage/blob/master/src/sonic-yang-models/doc/Configuration.md --> #### A picture of a cute animal (not mandatory but encouraged)
jasonbridges
pushed a commit
to jasonbridges/sonic-buildimage
that referenced
this pull request
Jan 22, 2026
Why I did it If teamd feature is disabled, sudo config feature state teamd disabled swss service should not wait on team container at all. Currently there is a process python3 /usr/bin/docker-wait-any -s swss -d syncd teamd However, a thread inside /usr/bin/docker-wait-any is actually crashed, and the behavior is same as ignoring teamd. It still keep the whole system working. The root fix should check service enabled instead exists, so it will not wait-any on teamd at all. After this PR, python3 /usr/bin/docker-wait-any -s swss -d syncd Work item tracking Microsoft ADO (number only): Fixing Bug: dockers flapping on SONiC fan out switch due to behavior change in docker-wait-any-rs compared to docker-wait-any when the docker does not exist sonic-net#24730
jasonbridges
pushed a commit
to jasonbridges/sonic-buildimage
that referenced
this pull request
Jan 22, 2026
…)" (sonic-net#24794) Reverts sonic-net#24754 since it's causing pc/test_po_cleanup.py and autorestart/test_container_autorestart.py failure on multi-asic t1 pc/test_po_cleanup.py:
mssonicbld
added a commit
that referenced
this pull request
Feb 1, 2026
…4794) (#25123) #### Why I did it If teamd feature is disabled, ``` sudo config feature state teamd disabled ``` swss service should not wait on team container at all. Currently there is a process ``` python3 /usr/bin/docker-wait-any -s swss -d syncd teamd ``` However, a thread inside /usr/bin/docker-wait-any is actually crashed, and the behavior is same as ignoring teamd. It still keep the whole system working. The root fix should check service enabled instead exists, so it will not wait-any on teamd at all. After this PR, ``` python3 /usr/bin/docker-wait-any -s swss -d syncd ``` ##### Work item tracking - Microsoft ADO **(number only)**: - Fixing #24730 #### How I did it #### How to verify it <!-- If PR needs to be backported, then the PR must be tested against the base branch and the earliest backport release branch and provide tested image version on these two branches. For example, if the PR is requested for master, 202211 and 202012, then the requester needs to provide test results on master and 202012. --> #### Which release branch to backport (provide reason below if selected) <!-- - Note we only backport fixes to a release branch, *not* features! - Please also provide a reason for the backporting below. - e.g. - [x] 202006 --> - [ ] 202205 - [ ] 202211 - [ ] 202305 - [ ] 202311 - [ ] 202405 - [ ] 202411 - [ ] 202505 #### Tested branch (Please provide the tested image version) <!-- - Please provide tested image version - e.g. - [x] 20201231.100 --> - [ ] <!-- image version 1 --> - [ ] <!-- image version 2 --> #### Description for the changelog <!-- Write a short (one line) summary that describes the changes in this pull request for inclusion in the changelog: --> <!-- Ensure to add label/tag for the feature raised. example - PR#2174 under sonic-utilities repo. where, Generic Config and Update feature has been labelled as GCU. --> #### Link to config_db schema for YANG module changes <!-- Provide a link to config_db schema for the table for which YANG model is defined Link should point to correct section on https://github.com/Azure/sonic-buildimage/blob/master/src/sonic-yang-models/doc/Configuration.md --> #### A picture of a cute animal (not mandatory but encouraged)
FengPan-Frank
pushed a commit
to FengPan-Frank/sonic-buildimage
that referenced
this pull request
Mar 6, 2026
Why I did it If teamd feature is disabled, sudo config feature state teamd disabled swss service should not wait on team container at all. Currently there is a process python3 /usr/bin/docker-wait-any -s swss -d syncd teamd However, a thread inside /usr/bin/docker-wait-any is actually crashed, and the behavior is same as ignoring teamd. It still keep the whole system working. The root fix should check service enabled instead exists, so it will not wait-any on teamd at all. After this PR, python3 /usr/bin/docker-wait-any -s swss -d syncd Work item tracking Microsoft ADO (number only): Fixing Bug: dockers flapping on SONiC fan out switch due to behavior change in docker-wait-any-rs compared to docker-wait-any when the docker does not exist sonic-net#24730 Signed-off-by: Feng Pan <fenpan@microsoft.com>
FengPan-Frank
pushed a commit
to FengPan-Frank/sonic-buildimage
that referenced
this pull request
Mar 6, 2026
…)" (sonic-net#24794) Reverts sonic-net#24754 since it's causing pc/test_po_cleanup.py and autorestart/test_container_autorestart.py failure on multi-asic t1 pc/test_po_cleanup.py: Signed-off-by: Feng Pan <fenpan@microsoft.com>
FengPan-Frank
pushed a commit
to FengPan-Frank/sonic-buildimage
that referenced
this pull request
Mar 6, 2026
)" (sonic-net#24794) (sonic-net#25037) #### Why I did it If teamd feature is disabled, ``` sudo config feature state teamd disabled ``` swss service should not wait on team container at all. Currently there is a process ``` python3 /usr/bin/docker-wait-any -s swss -d syncd teamd ``` However, a thread inside /usr/bin/docker-wait-any is actually crashed, and the behavior is same as ignoring teamd. It still keep the whole system working. The root fix should check service enabled instead exists, so it will not wait-any on teamd at all. After this PR, ``` python3 /usr/bin/docker-wait-any -s swss -d syncd ``` ##### Work item tracking - Microsoft ADO **(number only)**: - Fixing sonic-net#24730 Signed-off-by: Feng Pan <fenpan@microsoft.com>
dprital
pushed a commit
that referenced
this pull request
Mar 19, 2026
…4794) (#25037) #### Why I did it If teamd feature is disabled, ``` sudo config feature state teamd disabled ``` swss service should not wait on team container at all. Currently there is a process ``` python3 /usr/bin/docker-wait-any -s swss -d syncd teamd ``` However, a thread inside /usr/bin/docker-wait-any is actually crashed, and the behavior is same as ignoring teamd. It still keep the whole system working. The root fix should check service enabled instead exists, so it will not wait-any on teamd at all. After this PR, ``` python3 /usr/bin/docker-wait-any -s swss -d syncd ``` ##### Work item tracking - Microsoft ADO **(number only)**: - Fixing #24730 Signed-off-by: dprital <drorp@nvidia.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why I did it
If teamd feature is disabled,
swss service should not wait on team container at all. Currently there is a process
However, a thread inside /usr/bin/docker-wait-any is actually crashed, and the behavior is same as ignoring teamd. It still keep the whole system working.
The root fix should check service enabled instead exists, so it will not wait-any on teamd at all. After this PR,
Work item tracking
How I did it
How to verify it
Which release branch to backport (provide reason below if selected)
Tested branch (Please provide the tested image version)
Description for the changelog
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)