-
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
Fix rsyslogd start failed cause by rsyslog.conf is emtpy. #13669
Fix rsyslogd start failed cause by rsyslog.conf is emtpy. #13669
Conversation
Signed-off-by: Chun'ang Li <chunangli@microsoft.com>
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.
LGTM
Is it known why sonic-cfggen fails? Edit: never mind, I just saw the screenshot. |
Should we fix sonic-cfggen? It should not generate an empty file while exception occurs? |
@saiarcot895 |
@Junchao-Mellanox |
docker cp $TMP_FILE ${DOCKERNAME}:/etc/rsyslog.conf | ||
if [ "$failed" == "false" ]; then | ||
docker cp $TMP_FILE ${DOCKERNAME}:/etc/rsyslog.conf | ||
fi |
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.
There is a risk that teamd container started without proper rsyslog.conf file. Then probably the log of teamd container can't be received by the host rsyslog service. The consequence is that teamd syslog could be missing.
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 for the reminder! Will discuss and improve again.
…ue to generate conf. Signed-off-by: Chun'ang Li <chunangli@microsoft.com>
…ue to generate conf. Signed-off-by: Chun'ang Li <chunangli@microsoft.com>
#13674 will trace this issue. |
…13669) - Why I did it In to-sonic and multi-asic KVM-test, pretest sometimes failed. Reason is rsyslogd process can not start in teamd container. Because rsyslog.conf is empty caused by sonic-cfggen execute failed - How I did it If sonic-cfggen -d execute failed, execute without -d because the template file has the default value. - How to verify it Build image and test it over 40 times, all passed pretest. Signed-off-by: Chun'ang Li <chunangli@microsoft.com>
Cherry-pick PR to 202211: #13862 |
@yejianquan @wangxin do we need this for 202205? |
- Why I did it In to-sonic and multi-asic KVM-test, pretest sometimes failed. Reason is rsyslogd process can not start in teamd container. Because rsyslog.conf is empty caused by sonic-cfggen execute failed - How I did it If sonic-cfggen -d execute failed, execute without -d because the template file has the default value. - How to verify it Build image and test it over 40 times, all passed pretest. Signed-off-by: Chun'ang Li <chunangli@microsoft.com>
Signed-off-by: Chun'ang Li chunangli@microsoft.com
Why I did it
In to-sonic and multi-asic KVM-test, pretest sometimes failed. Reason is rsyslogd process can not start in teamd container. Because rsyslog.conf is empty caused by sonic-cfggen execute failed, and failed log is:
How I did it
If
sonic-cfggen -d
execute failed, execute without-d
because the template file has the default value.How to verify it
Build image and test it over 40 times, all passed pretest.
Which release branch to backport (provide reason below if selected)
Description for the changelog
Ensure to add label/tag for the feature raised. example - PR#2174 under sonic-utilities repo. where, Generic Config and Update feature has been labelled as GCU.
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)