Skip to content

Commit

Permalink
[sflow] Fix race-condition seen with mVRF configured (sonic-net#6102)
Browse files Browse the repository at this point in the history
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 <garrick_he@dell.com>
  • Loading branch information
GarrickHe authored and santhosh-kt committed Feb 25, 2021
1 parent fdd5ac7 commit b0c98b6
Showing 1 changed file with 1 addition and 1 deletion.
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
After=swss.service syncd.service hostcfgd.service
Before=ntp-config.service
StartLimitIntervalSec=1200
StartLimitBurst=3
Expand Down

0 comments on commit b0c98b6

Please sign in to comment.