Skip to content

Commit

Permalink
tests: fixed multiple tests missing ovn-nbctl "wait"
Browse files Browse the repository at this point in the history
- dhcpv4 : 1 HV, 2 LS
- Remote port binding
- MLD snoop/querier/relay
- basic connectivity with multiple requested-chassis

Signed-off-by: Xavier Simonart <xsimonar@redhat.com>
Acked-by: Mark Michelson <mmichels@redhat.com>
Signed-off-by: Dumitru Ceara <dceara@redhat.com>
  • Loading branch information
simonartxavier authored and dceara committed Oct 6, 2023
1 parent 9441717 commit 7c6a207
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion tests/ovn-northd.at
Original file line number Diff line number Diff line change
Expand Up @@ -10340,7 +10340,7 @@ wait_for_ports_up sw0-r1
check_column $remote_chassis_uuid Port_Binding chassis logical_port=sw0-r1

# Set the type to router and ovn-northd should not claim it.
check ovn-nbctl lsp-set-type sw0-r1 router
check ovn-nbctl --wait=hv lsp-set-type sw0-r1 router
check_column '' Port_Binding chassis logical_port=sw0-r1

AT_CLEANUP
Expand Down
15 changes: 11 additions & 4 deletions tests/ovn.at
Original file line number Diff line number Diff line change
Expand Up @@ -7132,7 +7132,7 @@ ovn-nbctl dhcp-options-set-options $d3 \
lease_time=3600 router=10.0.0.1 bootfile_name_alt=\"bootfile_name_alt\" \
bootfile_name=\"bootfile\"

ovn-nbctl lsp-set-dhcpv4-options ls1-lp1 $d3
ovn-nbctl --wait=hv lsp-set-dhcpv4-options ls1-lp1 $d3

offer_ip=`ip_to_hex 10 0 0 4`
server_ip=`ip_to_hex 10 0 0 1`
Expand Down Expand Up @@ -7502,7 +7502,7 @@ ovn-nbctl dhcp-options-set-options $d1 \
server_id=00:00:00:10:00:01 \
bootfile_name_alt=\"bootfile_name_alt\" \
bootfile_name=\"bootfile_name\"
ovn-nbctl lsp-set-dhcpv6-options ls1-lp2 ${d1}
ovn-nbctl --wait=hv lsp-set-dhcpv6-options ls1-lp2 ${d1}

reset_pcap_file hv1-vif2 hv1/vif2

Expand Down Expand Up @@ -14872,6 +14872,10 @@ wait_column "$hv2_uuid" Port_Binding requested_additional_chassis logical_port=m
# ovn-installed on hv2 should guarantee that.
OVS_WAIT_UNTIL([test `as hv2 ovs-vsctl get Interface migrator external_ids:ovn-installed` = '"true"'])

# Still, this does not guarantee that all flows are installed on hv3: hv3 (might) still need to receive and handle
# additional_chassis for migrator port
ovn-nbctl --wait=hv sync

# check that...
# unicast from First arrives to hv1:Migrator
# unicast from First arrives to hv2:Migrator
Expand Down Expand Up @@ -14958,6 +14962,9 @@ wait_column "" Port_Binding requested_additional_chassis logical_port=migrator
# For instance, migrator port might still be up from prior to complete migration to hv2
OVS_WAIT_UNTIL([test `as hv2 ovs-vsctl get Interface migrator external_ids:ovn-installed` = '"true"'])

# Give time for hv3 to handle the change of Port_Binding for migrator port
ovn-nbctl --wait=hv sync

# check that...
# unicast from Third doesn't arrive to hv1:Migrator
# unicast from Third arrives to hv2:Migrator
Expand Down Expand Up @@ -23408,7 +23415,7 @@ check ovn-nbctl set Logical_Switch sw2 \
other_config:mcast_querier="false"

# Enable multicast snooping on sw3.
check ovn-nbctl --wait=sb set Logical_Switch sw3 \
check ovn-nbctl --wait=hv set Logical_Switch sw3 \
other_config:mcast_querier="false" \
other_config:mcast_snoop="true"

Expand Down Expand Up @@ -23447,7 +23454,7 @@ OVS_WAIT_UNTIL(
[$at_diff -F'^---' exp rcv])

# Enable multicast relay on rtr
check ovn-nbctl --wait=sb set logical_router rtr options:mcast_relay="true"
check ovn-nbctl --wait=hv set logical_router rtr options:mcast_relay="true"

AT_CAPTURE_FILE([sbflows6])
ovn-sbctl dump-flows > sbflows6
Expand Down

0 comments on commit 7c6a207

Please sign in to comment.