Skip to content
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

Merged
merged 2 commits into from
Jan 1, 2021

Conversation

abdosi
Copy link
Contributor

@abdosi abdosi commented Dec 25, 2020

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)

@abdosi abdosi closed this Dec 25, 2020
@abdosi abdosi reopened this Dec 30, 2020
@abdosi abdosi changed the title Do reset-failed before we restart the service Enable rsyslogd notify mode for supervisord logs in docker container Dec 30, 2020
$InputFileFacility local0
$InputFilePersistStateInterval 1
$InputRunFileMonitor
module(load="imfile") #By default notify mode
Copy link
Contributor

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!

Copy link
Contributor Author

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks!

Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks @jleveque . PR #6351 has the change.

@abdosi
Copy link
Contributor Author

abdosi commented Dec 30, 2020

Retest mellanox please

@abdosi
Copy link
Contributor Author

abdosi commented Dec 31, 2020

retest mellanox please

@abdosi abdosi merged commit ef0088c into sonic-net:master Jan 1, 2021
@abdosi abdosi deleted the feature_reset branch January 1, 2021 01:02
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants