Skip to content

Commit

Permalink
Delay mux/sflow/snmp timer after interface-config service (sonic-net#…
Browse files Browse the repository at this point in the history
…14506)

Why I did it
All these 3 services started after swss service, which used to start after interface-config service. But sonic-net#13084 remove the time constraints for swss.

After that, these 3 services has the chance of start earlier when the inteface-config service is restarting the networking service, which could cause db connect request to fail.

How I did it
Delay mux/sflow/snmp timer after the interface-config service.

How to verify it
PR test.
Config reload can repro the issue in 1-3 retries. With this change. config reload run 30+ iterations without hitting the issue.

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
  • Loading branch information
yxieca authored and mssonicbld committed Apr 4, 2023
1 parent 8ca2d47 commit bfe9d94
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion files/build_templates/mux.service.j2
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[Unit]
Description=MUX Cable Container
Requires=database.service updategraph.service swss.service
After=swss.service
After=swss.service interfaces-config.service
BindsTo=sonic.target
After=sonic.target
StartLimitIntervalSec=1200
Expand Down
2 changes: 1 addition & 1 deletion files/build_templates/sflow.service.j2
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[Unit]
Description=sFlow container
Requisite=swss.service
After=swss.service syncd.service hostcfgd.service
After=swss.service syncd.service hostcfgd.service interfaces-config.service
BindsTo=sonic.target
After=sonic.target
Before=ntp-config.service
Expand Down
2 changes: 1 addition & 1 deletion files/build_templates/snmp.timer
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[Unit]
Description=Delays snmp container until SONiC has started
PartOf=snmp.service
After=swss.service
After=swss.service interfaces-config.service

[Timer]
OnUnitActiveSec=0 sec
Expand Down

0 comments on commit bfe9d94

Please sign in to comment.