diff mbox series

[ovs-dev] tests: fix flaky VXLAN check port/datapath key space limits test

Message ID 20211123173700.87322-1-odivlad@gmail.com
State Accepted
Headers show
Series [ovs-dev] tests: fix flaky VXLAN check port/datapath key space limits test | expand

Checks

Context Check Description
ovsrobot/apply-robot success apply and check: success
ovsrobot/github-robot-_Build_and_Test success github build: passed
ovsrobot/github-robot-_ovn-kubernetes fail github build: failed

Commit Message

Vladislav Odintsov Nov. 23, 2021, 5:37 p.m. UTC
OVN requested-tnl-key VXLAN checks affect tunnel_key in
datapath_binding record only on datapath tunnel key assigning.
If a dp tnl key was already assigned and VXLAN-enabled chassis
is added after that, the value would never be changed.

The test didn't check the VXLAN-enabled chassis was created and
thus test could fail like this:

$ ovn.at:3777: waiting until test x`ovn-nbctl lsp-get-up lsp-bad` = xup...
$ ovn.at:3777: wait succeeded immediately
$ ./ovn.at:3777: ovn-sbctl get Datapath_Binding ls-bad tunnel_key
$ --- -	2021-11-23 17:34:51.646403185 +0300
$ +++ /builddir/build/BUILD/ovn-21.09.90/tests/testsuite.dir/at-groups/104/stdout	2021-11-23 17:34:51.644406189 +0300
$ @@ -1,2 +1,2 @@
$ -1
$ +5000

This patch fixes such fail by adding await for chassis to be
registered in SB DB.

Signed-off-by: Vladislav Odintsov <odivlad@gmail.com>
---
 tests/ovn.at | 1 +
 1 file changed, 1 insertion(+)

Comments

Odintsov Vladislav Nov. 24, 2021, 7:53 a.m. UTC | #1
Reported-at: https://mail.openvswitch.org/pipermail/ovs-dev/2021-November/389256.html

Regards,
Vladislav Odintsov

On 23 Nov 2021, at 20:37, Vladislav Odintsov <odivlad@gmail.com<mailto:odivlad@gmail.com>> wrote:

OVN requested-tnl-key VXLAN checks affect tunnel_key in
datapath_binding record only on datapath tunnel key assigning.
If a dp tnl key was already assigned and VXLAN-enabled chassis
is added after that, the value would never be changed.

The test didn't check the VXLAN-enabled chassis was created and
thus test could fail like this:

$ ovn.at:3777<http://ovn.at:3777>: waiting until test x`ovn-nbctl lsp-get-up lsp-bad` = xup...
$ ovn.at:3777<http://ovn.at:3777>: wait succeeded immediately
$ ./ovn.at:3777<http://ovn.at:3777>: ovn-sbctl get Datapath_Binding ls-bad tunnel_key
$ --- - 2021-11-23 17:34:51.646403185 +0300
$ +++ /builddir/build/BUILD/ovn-21.09.90/tests/testsuite.dir/at-groups/104/stdout 2021-11-23 17:34:51.644406189 +0300
$ @@ -1,2 +1,2 @@
$ -1
$ +5000

This patch fixes such fail by adding await for chassis to be
registered in SB DB.

Signed-off-by: Vladislav Odintsov <odivlad@gmail.com<mailto:odivlad@gmail.com>>
---
tests/ovn.at<http://ovn.at> | 1 +
1 file changed, 1 insertion(+)

diff --git a/tests/ovn.at<http://ovn.at> b/tests/ovn.at<http://ovn.at>
index 965eed809..c39f3162e 100644
--- a/tests/ovn.at<http://ovn.at>
+++ b/tests/ovn.at<http://ovn.at>
@@ -3783,6 +3783,7 @@ check ovs-vsctl add-br br-phys
check ovs-vsctl set open . external-ids:ovn-bridge-mappings=phys:br-phys
ovn_attach net br-phys 192.168.0.1 24 vxlan
check ovn-nbctl --wait=sb sync
+OVS_WAIT_UNTIL([ovn-sbctl get chassis main _uuid])

check ovn-nbctl ls-add ls-bad -- \
    set Logical_Switch ls-bad other_config:requested-tnl-key=5000
--
2.30.0
Dumitru Ceara Nov. 26, 2021, 12:41 p.m. UTC | #2
On 11/23/21 18:37, Vladislav Odintsov wrote:
> OVN requested-tnl-key VXLAN checks affect tunnel_key in
> datapath_binding record only on datapath tunnel key assigning.
> If a dp tnl key was already assigned and VXLAN-enabled chassis
> is added after that, the value would never be changed.
> 
> The test didn't check the VXLAN-enabled chassis was created and
> thus test could fail like this:
> 
> $ ovn.at:3777: waiting until test x`ovn-nbctl lsp-get-up lsp-bad` = xup...
> $ ovn.at:3777: wait succeeded immediately
> $ ./ovn.at:3777: ovn-sbctl get Datapath_Binding ls-bad tunnel_key
> $ --- -	2021-11-23 17:34:51.646403185 +0300
> $ +++ /builddir/build/BUILD/ovn-21.09.90/tests/testsuite.dir/at-groups/104/stdout	2021-11-23 17:34:51.644406189 +0300
> $ @@ -1,2 +1,2 @@
> $ -1
> $ +5000
> 
> This patch fixes such fail by adding await for chassis to be
> registered in SB DB.
> 
> Signed-off-by: Vladislav Odintsov <odivlad@gmail.com>
> ---

Looks good to me, thanks!

Acked-by: Dumitru Ceara <dceara@redhat.com>
Numan Siddique Nov. 26, 2021, 10:18 p.m. UTC | #3
On Fri, Nov 26, 2021 at 7:41 AM Dumitru Ceara <dceara@redhat.com> wrote:
>
> On 11/23/21 18:37, Vladislav Odintsov wrote:
> > OVN requested-tnl-key VXLAN checks affect tunnel_key in
> > datapath_binding record only on datapath tunnel key assigning.
> > If a dp tnl key was already assigned and VXLAN-enabled chassis
> > is added after that, the value would never be changed.
> >
> > The test didn't check the VXLAN-enabled chassis was created and
> > thus test could fail like this:
> >
> > $ ovn.at:3777: waiting until test x`ovn-nbctl lsp-get-up lsp-bad` = xup...
> > $ ovn.at:3777: wait succeeded immediately
> > $ ./ovn.at:3777: ovn-sbctl get Datapath_Binding ls-bad tunnel_key
> > $ --- -       2021-11-23 17:34:51.646403185 +0300
> > $ +++ /builddir/build/BUILD/ovn-21.09.90/tests/testsuite.dir/at-groups/104/stdout     2021-11-23 17:34:51.644406189 +0300
> > $ @@ -1,2 +1,2 @@
> > $ -1
> > $ +5000
> >
> > This patch fixes such fail by adding await for chassis to be
> > registered in SB DB.
> >
> > Signed-off-by: Vladislav Odintsov <odivlad@gmail.com>
> > ---
>
> Looks good to me, thanks!
>
> Acked-by: Dumitru Ceara <dceara@redhat.com>

Thanks.  Applied.

Numan

>
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
diff mbox series

Patch

diff --git a/tests/ovn.at b/tests/ovn.at
index 965eed809..c39f3162e 100644
--- a/tests/ovn.at
+++ b/tests/ovn.at
@@ -3783,6 +3783,7 @@  check ovs-vsctl add-br br-phys
 check ovs-vsctl set open . external-ids:ovn-bridge-mappings=phys:br-phys
 ovn_attach net br-phys 192.168.0.1 24 vxlan
 check ovn-nbctl --wait=sb sync
+OVS_WAIT_UNTIL([ovn-sbctl get chassis main _uuid])
 
 check ovn-nbctl ls-add ls-bad -- \
     set Logical_Switch ls-bad other_config:requested-tnl-key=5000