Reapply "We should check service enabled instead exists (#24754)" (#24794)#25037
Reapply "We should check service enabled instead exists (#24754)" (#24794)#25037qiluo-msft merged 3 commits intosonic-net:masterfrom
Conversation
)" (sonic-net#24794) This reverts commit 75c4234.
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
files/scripts/swss.sh
Outdated
| PORTS_PRESENT=$? | ||
|
|
||
| if [[ $PORTS_PRESENT == 0 ]] && [[ $(check_service_exists teamd) == "true" ]]; then | ||
| if [[ $PORTS_PRESENT == 0 ]] && [[ $(check_service_enabled teamd) == "true" ]]; then |
There was a problem hiding this comment.
teamd is a per-ASIC container, meaning in a multi-ASIC setup, it will need to check teamd@0, teamd@1, etc.
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
Pull request overview
This pull request reapplies a change that was previously introduced to check if systemd services are enabled rather than just checking if they exist. The change refactors the check_service_exists() function to check_service_enabled() and updates the implementation to use systemctl is-enabled instead of systemctl list-units.
Changes:
- Renamed
check_service_exists()function tocheck_service_enabled() - Changed implementation from checking service existence using
systemctl list-unitsto checking if service is enabled usingsystemctl is-enabled - Updated function calls to use the new function name at lines 601 and 622
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Cherry-pick PR to 202511: #25123 |
|
@qiluo-msft cherry pick PR didn't pass PR checker. Please check!!! |
1 similar comment
|
@qiluo-msft cherry pick PR didn't pass PR checker. Please check!!! |
)" (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>
…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>
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)