From fc0e6af337cd6ccce5a3f4d4160edcaf52da7ff0 Mon Sep 17 00:00:00 2001 From: Garrick He <32883830+GarrickHe@users.noreply.github.com> Date: Thu, 3 Dec 2020 01:33:10 -0800 Subject: [PATCH] [sflow] Fix race-condition seen with mVRF configured (#6102) Under certain conditions, the sFlow service can start before interface configurations are sucessfully applied. This will cause hsflowd to get a socket error. This fix ensures all interface configurations are successfully applied before the sFlow service (hsflowd) starts. During testing we saw this error from hsflowd if interface configs were not successfully applied before hsflowd started. ERR sflow#hsflowd: socket sendto error: Network is unreachable no FLOW samples can be seen. This can be consistently reproducible if you force sFlow service to start before interface-config.service. Signed-off-by: Garrick He --- files/build_templates/sflow.service.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/build_templates/sflow.service.j2 b/files/build_templates/sflow.service.j2 index 643bf64696..e9d5a87143 100644 --- a/files/build_templates/sflow.service.j2 +++ b/files/build_templates/sflow.service.j2 @@ -1,7 +1,7 @@ [Unit] Description=sFlow container Requisite=swss.service -After=swss.service syncd.service +After=swss.service syncd.service hostcfgd.service Before=ntp-config.service StartLimitIntervalSec=1200 StartLimitBurst=3