-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Enable rsyslogd notify mode for supervisord logs in docker container #6298
Conversation
logs in docker container Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
9963730
to
4ac40ad
Compare
$InputFileFacility local0 | ||
$InputFilePersistStateInterval 1 | ||
$InputRunFileMonitor | ||
module(load="imfile") #By default notify mode |
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.
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!
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.
@hui-ma yes old semantics of rsyslogd default to polling mode. Rsyslogd document recommends to use notify mode and new semantic going forward
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.
Thanks!
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.
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.
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.
Retest mellanox please |
retest mellanox please |
…#6298) Enable the notify mode of rsyslogd imfile module used for supervisord logs in docker container
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)