On 8/14/23 00:23, Han Zhou wrote:
> On Fri, Aug 11, 2023 at 5:24 AM Dumitru Ceara <dce...@redhat.com> wrote:
>>
>> The test added by 5a1d82cb28c5 ("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 <odiv...@gmail.com>
>> CC: Ales Musil <amu...@redhat.com>
>> CC: Han Zhou <hz...@ovn.org>
>> Signed-off-by: Dumitru Ceara <dce...@redhat.com>
>> ---
>>  tests/ovn.at |   16 +++++++++++++---
>>  1 file changed, 13 insertions(+), 3 deletions(-)
>>
>> diff --git a/tests/ovn.at b/tests/ovn.at
>> index 94f04d011a..2cf5d51693 100644
>> --- a/tests/ovn.at
>> +++ b/tests/ovn.at
>> @@ -36724,6 +36724,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
>>
>> @@ -36787,8 +36788,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 ??
>> @@ -36801,7 +36805,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])
>> @@ -36816,8 +36820,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 ??
>> @@ -36830,7 +36837,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])
>> @@ -36846,8 +36853,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 ??
>> @@ -36860,7 +36870,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])
>>
> 
> Acked-by: Han Zhou <hz...@ovn.org>
> 

Thanks, applied to main and backported to 23.06.

Regards,
Dumitru

_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to