Merge swss and syncd into single service#334
Conversation
|
removed non related message
|
There was a problem hiding this comment.
what if we do ExecStartPre=/usr/bin/syncd.sh start?
what's the difference between your current solution?
There was a problem hiding this comment.
As I said in a comment, if we do syncd.sh start in ExecStartPre, systemd will wait until this process finishes and will never reach ExecStart
There was a problem hiding this comment.
if you start first script in background, there is no way to get error code in bad situations.
In reply to: 103107923 [](ancestors = 103107923)
There was a problem hiding this comment.
@qiluo-msft, is there any way to resolve this? do you have any suggestion?
|
what is the linux kernel course? must be very interesting. 👍 |
Current implementation of swss and syncd causes a lot of problems in terms of dependencies and synchronization. Instead of handling them in separate services, we now start and stop them both as a single entity. Signed-off-by: marian-pritsak <marianp@mellanox.com>
|
Changed logic to return in case any of dockers exits with corresponding exit code |
|
@marian-pritsak One more suggestion: if there are multiple iterations in the same pull request, please try your best to keep old commits that are reviewed, so all the discussion context will be kept. |
…platforms (sonic-net#334) * Unified QoS config for Mellanox 27xx platforms * Add WRED settings for lossless queues (Mellanox 27xx platforms) Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>
* Suppress FDB events if notifier queue exceeds limit * Revert space change * Address review comments * Fix a build check * Updated comments, changed to NOTICE and log every 1000 events * Updated dropped count using a 32 bit counter
…tomatically (#16654) #### Why I did it src/sonic-linux-kernel ``` * 9534615 - (HEAD -> 202211, origin/202211) arm64: ac5: Fix watchdog timeleft (#334) (5 days ago) [pavannaregundi] * 70c4df8 - [marvell-arm64]: Add support for 98DX35xx and 98CX85xx platform (#311) (6 days ago) [pavannaregundi] * aab079e - [Mellanox] Upstream kernel patches with HW-MGMT 7.0030.1011 (#327) (4 weeks ago) [Kebo Liu] ``` #### How I did it #### How to verify it #### Description for the changelog
Watchdog timeleft returns unexpected huge value for first read, followed by correct expected values. Unexpected huge value reappears after few minutes. Issue is resolved by updating the existing hardware workaround to read WCV_HI along with WCV_LO. Signed-off-by: Pradeep Turaga Shakthi <pturagashakt@marvell.com> Co-authored-by: Saikrishna Arcot <sarcot@microsoft.com>
Apply community PR : sonic-net/sonic-buildimage#14293 Detail: sonic-net/sonic-buildimage#14292 as4630-54npe already merge(at commit id: 4be14f0) the PRs below: sonic-net/sonic-buildimage#13241 sonic-net/sonic-buildimage#13288 sonic-net/sonic-buildimage#15002 sonic-net/sonic-buildimage#13685 sonic-net/sonic-buildimage#14475 sonic-net/sonic-buildimage#14993 sonic-net/sonic-buildimage#14919 sonic-net/sonic-buildimage#15461 sonic-net/sonic-buildimage#16114 sonic-net/sonic-buildimage#334
[Nokia-IXR7250E][Devicedata] Update HW Lane for Inband and Rec ports …
Apply community PR : sonic-net/sonic-buildimage#14293 Detail: sonic-net/sonic-buildimage#14292 as4630-54npe already merge(at commit id: 4be14f0) the PRs below: sonic-net/sonic-buildimage#13241 sonic-net/sonic-buildimage#13288 sonic-net/sonic-buildimage#15002 sonic-net/sonic-buildimage#13685 sonic-net/sonic-buildimage#14475 sonic-net/sonic-buildimage#14993 sonic-net/sonic-buildimage#14919 sonic-net/sonic-buildimage#15461 sonic-net/sonic-buildimage#16114 sonic-net/sonic-buildimage#334
Apply community PR : sonic-net/sonic-buildimage#14293 Detail: sonic-net/sonic-buildimage#14292 as4630-54npe already merge(at commit id: 4be14f0) the PRs below: sonic-net/sonic-buildimage#13241 sonic-net/sonic-buildimage#13288 sonic-net/sonic-buildimage#15002 sonic-net/sonic-buildimage#13685 sonic-net/sonic-buildimage#14475 sonic-net/sonic-buildimage#14993 sonic-net/sonic-buildimage#14919 sonic-net/sonic-buildimage#15461 sonic-net/sonic-buildimage#16114 sonic-net/sonic-buildimage#334
Apply community PR : sonic-net/sonic-buildimage#14293 Detail: sonic-net/sonic-buildimage#14292 as4630-54npe already merge(at commit id: 4be14f0) the PRs below: sonic-net/sonic-buildimage#13241 sonic-net/sonic-buildimage#13288 sonic-net/sonic-buildimage#15002 sonic-net/sonic-buildimage#13685 sonic-net/sonic-buildimage#14475 sonic-net/sonic-buildimage#14993 sonic-net/sonic-buildimage#14919 sonic-net/sonic-buildimage#15461 sonic-net/sonic-buildimage#16114 sonic-net/sonic-buildimage#334
Apply community PR : sonic-net/sonic-buildimage#14293 Detail: sonic-net/sonic-buildimage#14292 as4630-54npe already merge(at commit id: 4be14f0) the PRs below: sonic-net/sonic-buildimage#13241 sonic-net/sonic-buildimage#13288 sonic-net/sonic-buildimage#15002 sonic-net/sonic-buildimage#13685 sonic-net/sonic-buildimage#14475 sonic-net/sonic-buildimage#14993 sonic-net/sonic-buildimage#14919 sonic-net/sonic-buildimage#15461 sonic-net/sonic-buildimage#16114 sonic-net/sonic-buildimage#334
Apply community PR : sonic-net/sonic-buildimage#14293 Detail: sonic-net/sonic-buildimage#14292 as4630-54npe already merge(at commit id: 4be14f0) the PRs below: sonic-net/sonic-buildimage#13241 sonic-net/sonic-buildimage#13288 sonic-net/sonic-buildimage#15002 sonic-net/sonic-buildimage#13685 sonic-net/sonic-buildimage#14475 sonic-net/sonic-buildimage#14993 sonic-net/sonic-buildimage#14919 sonic-net/sonic-buildimage#15461 sonic-net/sonic-buildimage#16114 sonic-net/sonic-buildimage#334
…utomatically (sonic-net#24942) #### Why I did it src/sonic-host-services ``` * abb627d - (HEAD -> master, origin/master, origin/HEAD) Ignore invalid output from docker stats command (sonic-net#334) (21 hours ago) [Junchao-Mellanox] ``` #### How I did it #### How to verify it #### Description for the changelog
Why I did this
We found some error in syslog:
2025 Dec 10 22:42:06.221428 sonic ERR memory_threshold_check: Failed to parse memory usage for "{'CPU%': '--', 'MEM%': '--', 'MEM_BYTES': '0', 'MEM_LIMIT_BYTES': '0', 'NAME': '--', 'PIDS': '--'}": could not convert string to float: '--'
2025 Dec 10 22:42:06.221527 sonic ERR memory_threshold_check: Failure occurred could not convert string to float: '--'
The error is statistical. The flow is as below:
procdockerstatsd calls "docker stats" command periodically, parse the output and store to STATE DB
memory_threshold_check which is called by monit service, handles the data in STATE DB and check the memory usage
After reviewing sonic code and docker code, I found that sonic would never generate a data with NAME=--; while docker might do so. Docker might generate such invalid output in a flow like this:
user issues "docker stats -a --no-stream --format json" command
docker CLI sends a command to docker engine for all existing containers: container a, b, c and so on
3. other user removes container a
docker engine starts to handle the command and find container a is no longer there, so it returns empty stats data
docker CLI finds the stats data for docker a in empty and fill the data with "--"
For detailed docker code, please check:
https://github.com/docker/cli/blob/93fa57bbcd08f2f5be7f6cf22f4273a2b5a49e71/cli/command/container/formatter_stats.go#L25
https://github.com/docker/cli/blob/93fa57bbcd08f2f5be7f6cf22f4273a2b5a49e71/cli/command/container/formatter_stats.go#L169
This PR is to fix the issue
How I did this
procdockerstatsd should check the command output and ignore invalid value:
if the name is empty of "--", ignore the output
log a warning message to syslog
How I test this
Manual test
…utomatically (sonic-net#24942) #### Why I did it src/sonic-host-services ``` * abb627d - (HEAD -> master, origin/master, origin/HEAD) Ignore invalid output from docker stats command (sonic-net#334) (21 hours ago) [Junchao-Mellanox] ``` #### How I did it #### How to verify it #### Description for the changelog Signed-off-by: Feng Pan <fenpan@microsoft.com>
…utomatically (#26218) #### Why I did it src/sonic-host-services ``` * 96c7afb - (HEAD -> 202511, origin/202511) procdockerstatsd-rs: use ASCII hyphen for invalid container name (#346) (#358) (71 minutes ago) [Priyansh] * c05226a - [202511][cherry-pick] Ignore invalid output from docker stats command (#334) (#356) (3 hours ago) [Priyansh] ``` #### How I did it #### How to verify it #### Description for the changelog
…utomatically (#24942) #### Why I did it src/sonic-host-services ``` * abb627d - (HEAD -> master, origin/master, origin/HEAD) Ignore invalid output from docker stats command (#334) (21 hours ago) [Junchao-Mellanox] ``` #### How I did it #### How to verify it #### Description for the changelog Signed-off-by: dprital <drorp@nvidia.com>
Current implementation of swss and syncd causes a lot
of problems in terms of dependencies and synchronization.
Instead of handling them in separate services, we now
start and stop them both as a single entity.
Signed-off-by: marian-pritsak marianp@mellanox.com