Enable rsyslogd notify mode for supervisord logs in docker container#6298
Merged
abdosi merged 2 commits intosonic-net:masterfrom Jan 1, 2021
Merged
Enable rsyslogd notify mode for supervisord logs in docker container#6298abdosi merged 2 commits intosonic-net:masterfrom
abdosi merged 2 commits intosonic-net:masterfrom
Conversation
logs in docker container Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
9963730 to
4ac40ad
Compare
yxieca
approved these changes
Dec 30, 2020
hui-ma
reviewed
Dec 30, 2020
| $InputFileFacility local0 | ||
| $InputFilePersistStateInterval 1 | ||
| $InputRunFileMonitor | ||
| module(load="imfile") #By default notify mode |
Contributor
There was a problem hiding this comment.
could you please explain why this file format/style is changed? And why did the previous specify polling mode? Not seeing it in the config. It is default in the old format as well? Thanks!
Contributor
Author
There was a problem hiding this comment.
@hui-ma yes old semantics of rsyslogd default to polling mode. Rsyslogd document recommends to use notify mode and new semantic going forward
Contributor
There was a problem hiding this comment.
Sorry for the late reply due to the holidays, but I wonder if we should explicitly set mode="inotify" just in case the default mode were ever to change.
Contributor
Author
Contributor
Author
|
Retest mellanox please |
hui-ma
approved these changes
Dec 30, 2020
Contributor
Author
|
retest mellanox please |
abdosi
added a commit
that referenced
this pull request
Jan 1, 2021
…#6298) Enable the notify mode of rsyslogd imfile module used for supervisord logs in docker container
This was referenced Jan 5, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What I did:
Enable the notify mode of rsyslogd imfile module used for supervisord logs in docker container
How I did:
As suggested in https://rsyslog-doc.readthedocs.io/en/latest/configuration/modules/imfile.html updated to use "innotify mode" which is by default when using new semantics of imfile parameters.
Why I did:
Without this change because of polling mode the supervisord logs in docker container could take upto 10 seconds (Default Polling Interval) to get logged in host.
This change will fix the issue where any critical process gets exited the supervisord log for same was not coming in host syslog immediately.
Below is one of the sequence to hit the issue:
• Telemetry Service entered failed state during boot up as no certificate present .
• After sometime certificates are pushed and makes telemetry feature disable/enable
• When we enable the telemetry feature again the supervisor message that got buffered when it entered failed state in
previous iteration comes now. See the Below Log for difference in time in host log (Dec 25 01:33:46) vs when it got
generated in docker (2020-12-25 01:29:29)
Dec 25 01:33:46.128364 str-xxxx-on-2 INFO telemetry#supervisord 2020-12-25 01:29:29,686 INFO exited: telemetry (exit status 1; not expected)How I Verify:
After the fix the syslog message is coming immediately.
Dec 30 00:07:50.406483 str-xxxx-on-2 INFO telemetry#supervisord 2020-12-30 00:07:50,404 INFO exited: telemetry (exit status 1; not expected)