Skip to content

Commit

Permalink
tests: Change ct zone UUID->name migration test to use GW routers.
Browse files Browse the repository at this point in the history
The test added by 5a1d82c ("controller: Migrate from ct zone UUID
name to component name") was, in theory, correct.  However, due to the
way conditional monitoring works, the test cannot pass on deployments
where distributed routers are used.  These will initially not be
considered "local" datapaths, so ovn-controller will consider their CT
zone entries as stale:

https://mail.openvswitch.org/pipermail/ovs-dev/2023-July/406785.html

Change the test instead and make it use gateway routers.  Like that the
behavior is known to be correct and we can, at least, ensure it won't be
broken in the future.

CC: Vladislav Odintsov <odivlad@gmail.com>
CC: Ales Musil <amusil@redhat.com>
CC: Han Zhou <hzhou@ovn.org>
Signed-off-by: Dumitru Ceara <dceara@redhat.com>
Acked-by: Han Zhou <hzhou@ovn.org>
Acked-by: Ales Musil <amusil@redhat.com>
(cherry picked from commit af7783a)
  • Loading branch information
dceara committed Aug 14, 2023
1 parent 7794d6d commit ae0c148
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions tests/ovn.at
Original file line number Diff line number Diff line change
Expand Up @@ -36428,6 +36428,7 @@ ovn_attach n1 br-phys 192.168.0.1
# sw0-port1 -- sw0 -- lr0

check ovn-nbctl lr-add lr0
check ovn-nbctl set logical_router lr0 options:chassis=hv1
check ovn-nbctl lrp-add lr0 lr0-sw0 00:00:00:00:ff:01 192.168.0.1/24
check ovn-nbctl lrp-add lr0 lr0-sw1 00:00:00:00:ff:02 11.0.0.1/24

Expand Down Expand Up @@ -36491,8 +36492,11 @@ check_zones_in_ovsdb() {

AS_BOX([Check newly created are with name only])
AT_CHECK([ovn-appctl -t ovn-controller ct-zone-list | sed "s/ [[0-9]]*/ ??/" | sort], [0], [dnl
lr0-sw0 ??
lr0-sw1 ??
lr0_dnat ??
lr0_snat ??
sw0-lr0 ??
sw0-port1 ??
sw0_dnat ??
sw0_snat ??
Expand All @@ -36505,7 +36509,7 @@ check_zones_in_ovsdb "$zone_list" sw0

# Check that we did just the initial zone flush
AT_CHECK([grep -c "NXT_CT_FLUSH_ZONE" hv1/ovs-vswitchd.log], [0], [dnl
5
8
])

AS_BOX([Check conversion from UUID - recompute])
Expand All @@ -36520,8 +36524,11 @@ ovn-appctl -t ovn-controller inc-engine/recompute
OVS_WAIT_UNTIL([test "$(grep -c 'ct zone .* replace uuid name' hv1/ovn-controller.log)" = "4"])

AT_CHECK([ovn-appctl -t ovn-controller ct-zone-list | sed "s/ [[0-9]]*/ ??/" | sort], [0], [dnl
lr0-sw0 ??
lr0-sw1 ??
lr0_dnat ??
lr0_snat ??
sw0-lr0 ??
sw0-port1 ??
sw0_dnat ??
sw0_snat ??
Expand All @@ -36534,7 +36541,7 @@ check_zones_in_ovsdb "$zone_list" sw0

# Check that we did just the initial zone flush
AT_CHECK([grep -c "NXT_CT_FLUSH_ZONE" hv1/ovs-vswitchd.log], [0], [dnl
5
8
])

AS_BOX([Check conversion from UUID - restart])
Expand All @@ -36550,8 +36557,11 @@ start_daemon ovn-controller --verbose="main:dbg"
OVS_WAIT_UNTIL([test "$(grep -c 'ct zone .* replace uuid name' hv1/ovn-controller.log)" = "8"])

AT_CHECK([ovn-appctl -t ovn-controller ct-zone-list | sed "s/ [[0-9]]*/ ??/" | sort], [0], [dnl
lr0-sw0 ??
lr0-sw1 ??
lr0_dnat ??
lr0_snat ??
sw0-lr0 ??
sw0-port1 ??
sw0_dnat ??
sw0_snat ??
Expand All @@ -36564,7 +36574,7 @@ check_zones_in_ovsdb "$zone_list" sw0

# Check that we did just the initial zone flush
AT_CHECK([grep -c "NXT_CT_FLUSH_ZONE" hv1/ovs-vswitchd.log], [0], [dnl
5
8
])

OVN_CLEANUP([hv1])
Expand Down

0 comments on commit ae0c148

Please sign in to comment.