Skip to content

Merge swss and syncd into single service#334

Merged
lguohan merged 1 commit intosonic-net:masterfrom
marian-pritsak:master
Mar 1, 2017
Merged

Merge swss and syncd into single service#334
lguohan merged 1 commit intosonic-net:masterfrom
marian-pritsak:master

Conversation

@marian-pritsak
Copy link
Copy Markdown
Collaborator

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

@liatgrozovik
Copy link
Copy Markdown

liatgrozovik commented Feb 24, 2017 via email

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what if we do ExecStartPre=/usr/bin/syncd.sh start?

what's the difference between your current solution?

Copy link
Copy Markdown

@MaryanPritsak MaryanPritsak Feb 26, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you start first script in background, there is no way to get error code in bad situations.


In reply to: 103107923 [](ancestors = 103107923)

Copy link
Copy Markdown
Collaborator

@lguohan lguohan Mar 1, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@qiluo-msft, is there any way to resolve this? do you have any suggestion?

@lguohan
Copy link
Copy Markdown
Collaborator

lguohan commented Feb 25, 2017

what is the linux kernel course? must be very interesting. 👍

Copy link
Copy Markdown
Collaborator

@qiluo-msft qiluo-msft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As comments.

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>
@marian-pritsak
Copy link
Copy Markdown
Collaborator Author

Changed logic to return in case any of dockers exits with corresponding exit code

@qiluo-msft
Copy link
Copy Markdown
Collaborator

@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.

@lguohan lguohan merged commit a877603 into sonic-net:master Mar 1, 2017
madhanmellanox pushed a commit to madhanmellanox/sonic-buildimage that referenced this pull request Mar 23, 2020
…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>
lguohan pushed a commit that referenced this pull request Jun 9, 2020
7c1cce5 2020-05-27 | Fix memory leak in pyext when Selectable is returned to Python (#343)  [pavel-shirshov]
1e8b5ca 2020-04-04 | [table] add hdel operation [Guohan Lu]
50bf741 2020-03-23 | [201811][schema] Add COUNTERS_LAG_NAME_MAP table in COUNTERS_DB (#334) [Joe LeVeque]
dmytroxshevchuk pushed a commit to dmytroxshevchuk/sonic-buildimage that referenced this pull request Aug 31, 2020
* 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
mssonicbld added a commit that referenced this pull request Oct 7, 2023
…tomatically (#16759)

#### Why I did it
src/sonic-linux-kernel
```
* d5232ab - (HEAD -> master, origin/master, origin/HEAD) arm64: ac5: Fix watchdog timeleft (#334) (7 days ago) [pavannaregundi]
```
#### How I did it
#### How to verify it
#### Description for the changelog
mssonicbld added a commit that referenced this pull request Oct 19, 2023
…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
shanshri pushed a commit to shanshri/sonic-buildimage-sonic-net that referenced this pull request Oct 24, 2023
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>
mlok-nokia pushed a commit to mlok-nokia/sonic-buildimage that referenced this pull request Jun 5, 2024
[Nokia-IXR7250E][Devicedata] Update HW Lane for Inband and Rec ports …
mssonicbld added a commit that referenced this pull request Dec 24, 2025
…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
jasonbridges pushed a commit to jasonbridges/sonic-buildimage that referenced this pull request Jan 22, 2026
…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
jianyuewu pushed a commit to jianyuewu/sonic-buildimage that referenced this pull request Feb 10, 2026
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
FengPan-Frank pushed a commit to FengPan-Frank/sonic-buildimage that referenced this pull request Mar 6, 2026
…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>
mssonicbld added a commit that referenced this pull request Mar 17, 2026
…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
dprital pushed a commit that referenced this pull request Mar 19, 2026
…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>
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.

5 participants