Skip to content

Commit

Permalink
tests: Fix failures in 4 HV, 1 LS, 1 LR, packet test with HA dist rtr…
Browse files Browse the repository at this point in the history
… gw prt

The test case "76: ovn -- 4 HV, 1 LS, 1 LR, packet test with HA
distributed router gateway port" fails sometimes. This patch fixes
this by leveraging the command ovn-nbctl sync. It also adds a
delay before sending a packet between foo1 and outside1, so it does
not get out of order with the gratuitous arp broadcast.

The failed test would look like this:
  <snip>
  checking packets in ext1/vif1-tx.pcap against ext1-vif1.expected:
  ovn.at:12: waiting until $PYTHON "$ovs_srcdir/utilities/ovs-pcap.in" $rcv_pcap > $rcv_text
        rcv_n=`wc -l < "$rcv_text"`
        echo "rcv_n=$rcv_n exp_n=$exp_n"
        test $rcv_n -ge $exp_n...
  <snip>
  ovn.at:12: wait succeeded after 2 seconds
  ./ovn.at:8865: sort $rcv_text
      expout	2020-04-22 15:24:29.948703642 -0400
      /home/ffernand/work/ovn/tests/testsuite.dir/at-groups/76/stdout	2020-04-22 15:24:29.948703642 -0400
     -1,2 +1,2
  -f0000001020400000201020308004500001c000000003f110100c0a80102ac1001030035111100080000
  +ffffffffffff00000201020308060001080006040001000002010203ac100101000000000000ac100101
   ffffffffffff00000201020308060001080006040001000002010203ac100101000000000000ac100101
  76. ovn.at:8695: 76. ovn -- 4 HV, 1 LS, 1 LR, packet test with HA distributed router gateway port (ovn.at:8695): FAILED (ovn.at:8865)

Reported-by: Dumitru Ceara <dceara@redhat.com>
Signed-off-by: Flavio Fernandes <flavio@flaviof.com>
Signed-off-by: Numan Siddique <numans@ovn.org>
  • Loading branch information
flavio-fernandes authored and numansiddique committed Apr 27, 2020
1 parent 5f8132a commit d4f0998
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/ovn.at
Original file line number Diff line number Diff line change
Expand Up @@ -8818,8 +8818,7 @@ as ext1 ovs-vsctl set open . external-ids:ovn-bridge-mappings=phys:br-phys
AT_CHECK([ovn-nbctl --timeout=3 --wait=sb sync], [0], [ignore])

# Allow some time for ovn-northd and ovn-controller to catch up.
# XXX This should be more systematic.
sleep 2
ovn-nbctl --wait=hv sync

ip_to_hex() {
printf "%02x%02x%02x%02x" "$@"
Expand Down Expand Up @@ -8886,6 +8885,8 @@ grep actions=mod_dl_dst:f0:00:00:01:02:04 | wc -l` -eq 1
fi
as ext1 reset_pcap_file ext1-vif1 ext1/vif1

sleep 1

# Resend packet from foo1 to outside1
as hv1 ovs-appctl netdev-dummy/receive hv1-vif1 $packet

Expand Down

0 comments on commit d4f0998

Please sign in to comment.