Skip to content

Commit

Permalink
[docker-base]: Rate limit priority INFO and lower in syslog (#5666)
Browse files Browse the repository at this point in the history
There is currently a bug where messages from swss with priority lower than the current log level are still being counted against the syslog rate limiting threshhold. This leads to rate-limiting in syslog when the rate-limiting conditions have not been met, which causes several sonic-mgmt tests to fail since they are dependent on LogAnalyzer. It also omits potentially useful information from the syslog. Only rate-limiting messages of level INFO and lower allows these tests to pass successfully.

Signed-off-by: Lawrence Lee <lawlee@microsoft.com>
  • Loading branch information
theasianpianist authored Oct 20, 2020
1 parent 38bd6be commit 207587d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion dockers/docker-base-buster/etc/rsyslog.conf
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@
$ModLoad imuxsock # provides support for local system logging

#
# Set a rate limit on messages from the container
# Set a rate limit on messages from the container of priority INFO or lower (level 6 and above)
#
$SystemLogRateLimitInterval 300
$SystemLogRateLimitBurst 20000
$SystemLogRateLimitSeverity 6

#$ModLoad imklog # provides kernel logging support
#$ModLoad immark # provides --MARK-- message capability
Expand Down
3 changes: 2 additions & 1 deletion dockers/docker-base-stretch/etc/rsyslog.conf
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@
$ModLoad imuxsock # provides support for local system logging

#
# Set a rate limit on messages from the container
# Set a rate limit on messages from the container of priority INFO or lower (level 6 and above)
#
$SystemLogRateLimitInterval 300
$SystemLogRateLimitBurst 20000
$SystemLogRateLimitSeverity 6

#$ModLoad imklog # provides kernel logging support
#$ModLoad immark # provides --MARK-- message capability
Expand Down
3 changes: 2 additions & 1 deletion dockers/docker-base/etc/rsyslog.conf
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@
$ModLoad imuxsock # provides support for local system logging

#
# Set a rate limit on messages from the container
# Set a rate limit on messages from the container of priority INFO or lower (level 6 and above)
#
$SystemLogRateLimitInterval 300
$SystemLogRateLimitBurst 20000
$SystemLogRateLimitSeverity 6

#$ModLoad imklog # provides kernel logging support
#$ModLoad immark # provides --MARK-- message capability
Expand Down
3 changes: 2 additions & 1 deletion files/image_config/rsyslog/rsyslog-container.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@
$ModLoad imuxsock # provides support for local system logging

#
# Set a rate limit on messages from the container
# Set a rate limit on messages from the container of priority INFO or lower (level 6 and above)
#
$SystemLogRateLimitInterval 300
$SystemLogRateLimitBurst 20000
$SystemLogRateLimitSeverity 6

#$ModLoad imklog # provides kernel logging support
#$ModLoad immark # provides --MARK-- message capability
Expand Down

0 comments on commit 207587d

Please sign in to comment.