Skip to content

Commit

Permalink
rsyslog to start after interfaces-config (#13503)
Browse files Browse the repository at this point in the history
Fixes #12408

Why I did it
We are running into #12408 very frequently.
This results in no syslogs from any containers as rsyslog server could not start.
some of the sonic-mgmt scripts look for log statements and error out if log is not present.

Interfaces-config service configures the loopback interface along with other interfaces. rsyslog-config reads ip address of loopback interface and generates /etc/rsyslog.conf. When this race condition happens, lo interface ip is not yet programmed and rsyslog-config ends up writing UDP server as null in /etc/rsyslog.conf.

How I did it
rsyslog-config service is started after interfaces-config service.

How to verify it
Did multiple reboots and verified that $UDPServerAddress is valid.
  • Loading branch information
devpatha committed Jan 27, 2023
1 parent dabb31c commit c93716a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions files/image_config/rsyslog/rsyslog-config.service
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Requires=updategraph.service
After=updategraph.service
BindsTo=sonic.target
After=sonic.target
After=interfaces-config.service

[Service]
Type=oneshot
Expand Down

0 comments on commit c93716a

Please sign in to comment.