-
Notifications
You must be signed in to change notification settings - Fork 1.8k
syslog changes Multi NPU platforms #4738
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
Changes from 2 commits
a4a10a7
795b2b0
3616a5f
16c6b3d
1deb8a0
b760de0
222489d
84aa4b5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -228,6 +228,10 @@ start() { | |
| done | ||
| fi | ||
| {%- endif %} | ||
| # single NPU systems and container running on the host network continue to use the json-file as log-driver | ||
| {%- if '--log-driver=json-file' in docker_image_run_opt or '--log-driver' not in docker_image_run_opt %} | ||
| LOG_OPTS="--log-opt max-size=2M --log-opt max-file=5" | ||
| {%- endif %} | ||
| else | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No need to change this line #Closed
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed in latest commit |
||
| # This part of code is applicable for Multi-ASIC platforms. Here we mount the namespace specific | ||
| # redis directory into the docker running in that namespace. Below eg: is for namespace "asic1" | ||
|
|
@@ -238,7 +242,9 @@ start() { | |
| redis_dir=`echo $redis_dir_list | cut -d " " -f $id` | ||
| REDIS_MNT=" -v $redis_dir:$redis_dir:rw " | ||
| fi | ||
|
|
||
| # Containers in the docker network will use the syslog-driver as log-driver. This is mainly applicable for Multi NPU system | ||
| LOG_OPTS="--log-driver=syslog --log-opt syslog-address=udp://127.0.0.1:514 --log-opt syslog-format=rfc5424 \ | ||
|
||
| --log-opt syslog-facility=daemon --log-opt tag={{docker_container_name}}$DEV" | ||
| {%- if docker_container_name == "database" %} | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No need to change this line #Closed
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed in latest commit |
||
| NET="bridge" | ||
| {%- else %} | ||
|
|
@@ -262,9 +268,7 @@ start() { | |
| {%- if install_debug_image == "y" %} | ||
| -v /src:/src:ro -v /debug:/debug:rw \ | ||
| {%- endif %} | ||
| {%- if '--log-driver=json-file' in docker_image_run_opt or '--log-driver' not in docker_image_run_opt %} | ||
| --log-opt max-size=2M --log-opt max-file=5 \ | ||
| {%- endif %} | ||
| $LOG_OPTS \ | ||
| {%- if sonic_asic_platform == "mellanox" %} | ||
| {%- if docker_container_name == "syncd" %} | ||
| -v /var/log/mellanox/sniffer:/var/log/mellanox/sniffer:rw \ | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The different behavior of single NPU vs multiple NPU is confusing and complex deign.
What about moving all use cases to log-driver, or all use cases to json-file as before? #Closed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to use json-file for all cases