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 10257d7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions build/yamls/antrea.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2695,7 +2695,7 @@ spec:
- --alsologtostderr
- --log_file_max_size=100
- --log_file_max_num=4
- --v=0
- --v=7
command:
- antrea-controller
env:
Expand Down Expand Up @@ -2927,7 +2927,7 @@ spec:
- --alsologtostderr
- --log_file_max_size=100
- --log_file_max_num=4
- --v=0
- --v=7
command:
- antrea-agent
env:
Expand Down
5 changes: 5 additions & 0 deletions pkg/agent/controller/traceflow/traceflow_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ const (
// 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
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 10257d7

Please sign in to comment.