Skip to content

Commit

Permalink
tests: fixed race_condition with max_prefix
Browse files Browse the repository at this point in the history
The following tests:
- ipam
- ipam connectivity
- ipam to non-ipam
set the mac_prefix using nbctl.
However, it can happen that both northd and nbctl sets the mac_prefix
at the same time, which might result in the mac_prefix from nbctl to
be dropped.

Signed-off-by: Xavier Simonart <[email protected]>
Signed-off-by: Dumitru Ceara <[email protected]>
(cherry picked from commit 13ca6d5)
  • Loading branch information
simonartxavier authored and dceara committed Nov 10, 2023
1 parent f43ace4 commit 89e00c2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/ovn.at
Original file line number Diff line number Diff line change
Expand Up @@ -8241,6 +8241,7 @@ check_dynamic_addresses() {
check_row_count nb:Logical_Switch_Port 1 name="$1" dynamic_addresses="$arg"
}

check ovn-nbctl --wait=sb sync
# Add a port to a switch that does not have a subnet set, then set the
# subnet which should result in an address being allocated for the port.
ovn-nbctl --wait=hv set NB_Global . options:mac_prefix="0a:00:00:00:00:00"
Expand Down Expand Up @@ -8556,7 +8557,7 @@ OVN_FOR_EACH_NORTHD([
AT_SETUP([ipam connectivity])
ovn_start

ovn-nbctl lr-add R1
ovn-nbctl --wait=sb lr-add R1

# Test for a ping using dynamically allocated addresses.
ovn-nbctl --wait=hv set NB_Global . options:mac_prefix="0a:00:00:00:00:00"
Expand Down Expand Up @@ -20758,6 +20759,7 @@ OVN_FOR_EACH_NORTHD([
AT_SETUP([ipam to non-ipam])
ovn_start

check ovn-nbctl --wait=sb sync
ovn-nbctl --wait=hv set NB_Global . options:mac_prefix="0a:00:00:00:00:00"
ovn-nbctl ls-add sw0
ovn-nbctl lsp-add sw0 p0 -- lsp-set-addresses p0 dynamic
Expand Down

0 comments on commit 89e00c2

Please sign in to comment.