Skip to content

Commit

Permalink
Fix Traceflow IPv6 DS e2e error
Browse files Browse the repository at this point in the history
  • Loading branch information
gran-vmv committed Apr 22, 2021
1 parent c67106c commit 08b26e0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkg/agent/controller/traceflow/traceflow_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ const (
defaultWorkers = 4
// Seconds delay before injecting packet into OVS. The time of different nodes may not be completely
// synchronized, which requires a delay before inject packet.
injectPacketDelay = 5
injectPacketDelay = 5
injectLocalPacketDelay = 1

// ICMP Echo Request type and code.
icmpEchoRequestType uint8 = 8
Expand Down Expand Up @@ -345,6 +346,10 @@ func (c *Controller) startTraceflow(tf *crdv1alpha1.Traceflow) error {
// be sent to remote Node, wait a small period for other
// Nodes.
time.Sleep(time.Duration(injectPacketDelay) * time.Second)
} else {
// Issue #2116
// Wait a small period after flows installed to avoid unexpected behavior.
time.Sleep(time.Duration(injectLocalPacketDelay) * time.Second)
}
klog.V(2).Infof("Injecting packet for Traceflow %s", tf.Name)
err = c.ofClient.SendTraceflowPacket(tfState.tag, packet, srcOFPort, -1)
Expand Down

0 comments on commit 08b26e0

Please sign in to comment.