[ovs-dev] [PATCH ovn] tests: Use ovn-nbctl --wait=hv sync for I-P test.

Gregory Smith gasmith at nutanix.com
Wed Oct 14 23:15:06 UTC 2020


Gregory Smith wrote:
> This patch makes the "controller I-P handling with monitoring disabled"
> testcase more determinstic, by waiting for flows to be synchronized to
> the hypervisor before counting them.
> 
> Signed-off-by: Gregory Smith <gasmith at nutanix.com>
> ---

It turns out this patch is insufficient. It seems that ovn-controller
ACKs the nb_cfg sequence number before waiting for an OFPT_BARRIER_REPLY
from ovs-vswitchd. Is there a better way to synchronize?

Regards,
Greg

>  tests/ovn.at | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/ovn.at b/tests/ovn.at
> index 488fd119b..ba83dc1bf 100644
> --- a/tests/ovn.at
> +++ b/tests/ovn.at
> @@ -21083,6 +21083,7 @@ ovs-vsctl -- add-port br-int hv1-vif1 -- \
>      ofport-request=1
>  
>  OVS_WAIT_UNTIL([test x$(ovn-nbctl lsp-get-up sw0-p1) = xup])
> +ovn-nbctl --wait=hv sync
>  
>  # Get the number of OF flows in hv1 and hv2
>  hv1_offlows=$(as hv1 ovs-ofctl dump-flows br-int | wc -l)
> @@ -21097,6 +21098,7 @@ ovs-vsctl -- add-port br-int hv2-vif1 -- \
>      ofport-request=1
>  
>  OVS_WAIT_UNTIL([test x$(ovn-nbctl lsp-get-up sw0-p2) = xup])
> +ovn-nbctl --wait=hv sync
>  
>  hv2_offlows=$(as hv2 ovs-ofctl dump-flows br-int | wc -l)
>  echo "hv2 flows : $hv2_offlows"
> @@ -21135,10 +21137,11 @@ ovs-vsctl -- add-port br-int hv1-vif1 -- \
>      ofport-request=1
>  
>  OVS_WAIT_UNTIL([test x$(ovn-nbctl lsp-get-up sw0-p1) = xup])
> +ovn-nbctl --wait=hv sync
>  
>  # Get the number of OF flows in hv1 and hv2
>  hv1_offlows_mon=$(as hv1 ovs-ofctl dump-flows br-int | wc -l)
> -echo "hv1 flows after monitor-all=true : $hv1_offlows"
> +echo "hv1 flows after monitor-all=true : $hv1_offlows_mon"
>  AT_CHECK([test "$hv1_offlows" = "$hv1_offlows_mon"])
>  
>  as hv2
> @@ -21149,9 +21152,10 @@ ovs-vsctl -- add-port br-int hv2-vif1 -- \
>      ofport-request=1
>  
>  OVS_WAIT_UNTIL([test x$(ovn-nbctl lsp-get-up sw0-p2) = xup])
> +ovn-nbctl --wait=hv sync
>  
>  hv2_offlows_mon=$(as hv2 ovs-ofctl dump-flows br-int | wc -l)
> -echo "hv2 flows after monitor-all=true : $hv2_offlows"
> +echo "hv2 flows after monitor-all=true : $hv2_offlows_mon"
>  AT_CHECK([test "$hv2_offlows" = "$hv2_offlows_mon"])
>  
>  OVN_CLEANUP([hv1], [hv2])
> -- 
> 2.28.0
> 
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> https://urldefense.proofpoint.com/v2/url?u=https-3A__mail.openvswitch.org_mailman_listinfo_ovs-2Ddev&d=DwICAg&c=s883GpUCOChKOHiocYtGcg&r=0HZBgQW39TLbzbCyTLQNu1VE33o6KzimT1AMqSUuNEk&m=J-m0jQ4DaLzjS_gzKLFTe8sCyojKk5qTRxVcgc5_2Yw&s=R5k-jJh8wMVT0j9_M8ZuxGrJXgfmM4fzahFmboB0BYw&e= 


More information about the dev mailing list