This repository has been archived on 2025-03-20. You can view files and clone it, but cannot push or open issues or pull requests.
sonic-buildimage/files/build_templates/snmp.timer
Ying Xie d3f3ac6411
Delay mux/sflow/snmp timer after interface-config service (#14506)
Why I did it
All these 3 services started after swss service, which used to start after interface-config service. But #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>
2023-04-04 16:23:00 -07:00

13 lines
269 B
SYSTEMD

[Unit]
Description=Delays snmp container until SONiC has started
PartOf=snmp.service
After=swss.service interfaces-config.service
[Timer]
OnUnitActiveSec=0 sec
OnBootSec=3min 30 sec
Unit=snmp.service
[Install]
WantedBy=timers.target swss.service sonic-delayed.target