Skip to content

Commit

Permalink
system-tests: Prevent flakiness in ovn mirroring
Browse files Browse the repository at this point in the history
The "ovn mirroring" test wasn't waiting for the flows
to be properly installed. That could lead to
smaller number of packets being mirrored thus failing
the test.

Fixes: a88b620 ("mirror: fix ovn mirror support with IPv6")
Signed-off-by: Ales Musil <amusil@redhat.com>
Signed-off-by: Dumitru Ceara <dceara@redhat.com>
  • Loading branch information
almusil authored and dceara committed Jun 8, 2023
1 parent 21d5bb4 commit 6e12077
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions tests/system-ovn.at
Original file line number Diff line number Diff line change
Expand Up @@ -11205,6 +11205,9 @@ ovn-nbctl lsp-add bar bar1 \
ovn-nbctl mirror-add mirror0 gre 1 to-lport 172.16.0.100
ovn-nbctl lsp-attach-mirror bar1 mirror0

OVN_POPULATE_ARP
check ovn-nbctl --wait=hv sync

ADD_NAMESPACES(mirror)
ADD_VETH(mirror, mirror, br-mirror, "2003::b/64", "f0:00:00:01:07:06", \
"2003::1", "nodad", "172.16.0.100/24", "172.16.0.1")
Expand All @@ -11228,7 +11231,8 @@ killall tcpdump

ovn-nbctl mirror-del mirror0
ovn-nbctl mirror-add mirror1 gre 2 to-lport 2003::b
ovn-nbctl lsp-attach-mirror bar1 mirror1

ovn-nbctl --wait=hv lsp-attach-mirror bar1 mirror1

NS_CHECK_EXEC([mirror], [tcpdump -l -c 3 -neei mirror proto GRE > gre_mirror6.pcap 2>gre_mirror6_error &])
OVS_WAIT_UNTIL([grep "listening" gre_mirror6_error])
Expand All @@ -11247,7 +11251,7 @@ killall tcpdump

ovn-nbctl mirror-del mirror1
ovn-nbctl mirror-add mirror2 erspan 3 to-lport 172.16.0.100
ovn-nbctl lsp-attach-mirror bar1 mirror2
ovn-nbctl --wait=hv lsp-attach-mirror bar1 mirror2

NS_CHECK_EXEC([mirror], [tcpdump -l -c 3 -neei mirror ip[[22:2]]=0x88be > erspan_mirror4.pcap 2>erspan_mirror4_error &])
OVS_WAIT_UNTIL([grep "listening" erspan_mirror4_error])
Expand All @@ -11265,7 +11269,7 @@ killall tcpdump

ovn-nbctl mirror-del mirror2
ovn-nbctl mirror-add mirror3 erspan 4 to-lport 2003::b
ovn-nbctl lsp-attach-mirror bar1 mirror3
ovn-nbctl --wait=hv lsp-attach-mirror bar1 mirror3

NS_CHECK_EXEC([mirror], [tcpdump -l -c 3 -neei mirror ip6[[42:2]]=0x88be > erspan_mirror6.pcap 2>erspan_mirror6_error &])
OVS_WAIT_UNTIL([grep "listening" erspan_mirror6_error])
Expand All @@ -11282,7 +11286,7 @@ OVS_WAIT_UNTIL([
killall tcpdump

uuid=$(fetch_column nb:mirror _uuid name="mirror3")
ovn-nbctl set mirror $uuid type=gre
ovn-nbctl --wait=hv set mirror $uuid type=gre

NS_CHECK_EXEC([mirror], [tcpdump -c 3 -l -neei mirror proto GRE > gre_mirror6.pcap 2>gre_mirror6_error &])
OVS_WAIT_UNTIL([grep "listening" gre_mirror6_error])
Expand Down

0 comments on commit 6e12077

Please sign in to comment.