diff mbox series

[ovs-dev] tests: fix flaky "ovn-ic -- gateway sync" test

Message ID 20211007180428.516-1-odivlad@gmail.com
State Accepted
Headers show
Series [ovs-dev] tests: fix flaky "ovn-ic -- gateway sync" 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 Oct. 7, 2021, 6:04 p.m. UTC
Sometimes when ovn daemons in test sandbox were running slower than
usual (more often in ASAN tests), test 'ovn-ic -- gateway sync'
failed if chassis was not created yet.

This patch fixes such situation by adding await for chassis to
appear.

Test fail example:

# ../../../tests/ovn-ic.at:119: ovn_as az2 ovn-sbctl show | sort -r
# --- -	2021-10-07 12:50:45.178529089 +0000
# +++ /home/runner/work/ovn/ovn/ovn-21.09.90/_build/sub/tests/testsuite.dir/at-groups/1069/stdout	2021-10-07 12:50:45.169509348 +0000
# @@ -1,9 +1 @@
# -Chassis gw1
# -    hostname: gw1
# -    Encap vxlan
# -    Encap geneve
# -        options: {csum="true"}
# -        options: {csum="true"}
# -        ip: "192.168.0.1"
# -        ip: "192.168.0.1"

1069. ovn-ic.at:119: 1069. ovn-ic -- gateway sync -- ovn-northd -- dp-groups=no (ovn-ic.at:119): FAILED (ovn-ic.at:119)

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

Comments

Mark Gray Oct. 8, 2021, 9:55 a.m. UTC | #1
On 07/10/2021 19:04, Vladislav Odintsov wrote:
> Sometimes when ovn daemons in test sandbox were running slower than
> usual (more often in ASAN tests), test 'ovn-ic -- gateway sync'
> failed if chassis was not created yet.
> 
> This patch fixes such situation by adding await for chassis to
> appear.
> 
> Test fail example:
> 
> # ../../../tests/ovn-ic.at:119: ovn_as az2 ovn-sbctl show | sort -r
> # --- -	2021-10-07 12:50:45.178529089 +0000
> # +++ /home/runner/work/ovn/ovn/ovn-21.09.90/_build/sub/tests/testsuite.dir/at-groups/1069/stdout	2021-10-07 12:50:45.169509348 +0000
> # @@ -1,9 +1 @@
> # -Chassis gw1
> # -    hostname: gw1
> # -    Encap vxlan
> # -    Encap geneve
> # -        options: {csum="true"}
> # -        options: {csum="true"}
> # -        ip: "192.168.0.1"
> # -        ip: "192.168.0.1"
> 
> 1069. ovn-ic.at:119: 1069. ovn-ic -- gateway sync -- ovn-northd -- dp-groups=no (ovn-ic.at:119): FAILED (ovn-ic.at:119)
> 
> Signed-off-by: Vladislav Odintsov <odivlad@gmail.com>
> ---
>  tests/ovn-ic.at | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/tests/ovn-ic.at b/tests/ovn-ic.at
> index 15560334d..3faa9629a 100644
> --- a/tests/ovn-ic.at
> +++ b/tests/ovn-ic.at
> @@ -129,6 +129,7 @@ ovs-vsctl add-br br-phys
>  ovn_az_attach az1 n1 br-phys 192.168.0.1
>  ovs-vsctl set open . external-ids:ovn-is-interconn=true external-ids:hostname=gw1
>  
> +OVS_WAIT_UNTIL([ovn_as az2 ovn-sbctl show | grep "192.168.0.1"])
>  AT_CHECK([ovn_as az2 ovn-sbctl show | sort -r], [0], [dnl
>  Chassis gw1
>      hostname: gw1
> 

Acked-by: Mark D. Gray <mark.d.gray@redhat.com>
Numan Siddique Oct. 8, 2021, 5:56 p.m. UTC | #2
On Fri, Oct 8, 2021 at 5:56 AM Mark Gray <mark.d.gray@redhat.com> wrote:
>
> On 07/10/2021 19:04, Vladislav Odintsov wrote:
> > Sometimes when ovn daemons in test sandbox were running slower than
> > usual (more often in ASAN tests), test 'ovn-ic -- gateway sync'
> > failed if chassis was not created yet.
> >
> > This patch fixes such situation by adding await for chassis to
> > appear.
> >
> > Test fail example:
> >
> > # ../../../tests/ovn-ic.at:119: ovn_as az2 ovn-sbctl show | sort -r
> > # --- -       2021-10-07 12:50:45.178529089 +0000
> > # +++ /home/runner/work/ovn/ovn/ovn-21.09.90/_build/sub/tests/testsuite.dir/at-groups/1069/stdout     2021-10-07 12:50:45.169509348 +0000
> > # @@ -1,9 +1 @@
> > # -Chassis gw1
> > # -    hostname: gw1
> > # -    Encap vxlan
> > # -    Encap geneve
> > # -        options: {csum="true"}
> > # -        options: {csum="true"}
> > # -        ip: "192.168.0.1"
> > # -        ip: "192.168.0.1"
> >
> > 1069. ovn-ic.at:119: 1069. ovn-ic -- gateway sync -- ovn-northd -- dp-groups=no (ovn-ic.at:119): FAILED (ovn-ic.at:119)

Thanks for fixing this issue.   Applied to the main branch and to branch-21.09.

Numan

> >
> > Signed-off-by: Vladislav Odintsov <odivlad@gmail.com>
> > ---
> >  tests/ovn-ic.at | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/tests/ovn-ic.at b/tests/ovn-ic.at
> > index 15560334d..3faa9629a 100644
> > --- a/tests/ovn-ic.at
> > +++ b/tests/ovn-ic.at
> > @@ -129,6 +129,7 @@ ovs-vsctl add-br br-phys
> >  ovn_az_attach az1 n1 br-phys 192.168.0.1
> >  ovs-vsctl set open . external-ids:ovn-is-interconn=true external-ids:hostname=gw1
> >
> > +OVS_WAIT_UNTIL([ovn_as az2 ovn-sbctl show | grep "192.168.0.1"])
> >  AT_CHECK([ovn_as az2 ovn-sbctl show | sort -r], [0], [dnl
> >  Chassis gw1
> >      hostname: gw1
> >
>
> Acked-by: Mark D. Gray <mark.d.gray@redhat.com>
>
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
Vladislav Odintsov Oct. 8, 2021, 5:58 p.m. UTC | #3
Thanks Numan.

Regards,
Vladislav Odintsov

> On 8 Oct 2021, at 20:56, Numan Siddique <numans@ovn.org> wrote:
> 
> On Fri, Oct 8, 2021 at 5:56 AM Mark Gray <mark.d.gray@redhat.com <mailto:mark.d.gray@redhat.com>> wrote:
>> 
>> On 07/10/2021 19:04, Vladislav Odintsov wrote:
>>> Sometimes when ovn daemons in test sandbox were running slower than
>>> usual (more often in ASAN tests), test 'ovn-ic -- gateway sync'
>>> failed if chassis was not created yet.
>>> 
>>> This patch fixes such situation by adding await for chassis to
>>> appear.
>>> 
>>> Test fail example:
>>> 
>>> # ../../../tests/ovn-ic.at:119: ovn_as az2 ovn-sbctl show | sort -r
>>> # --- -       2021-10-07 12:50:45.178529089 +0000
>>> # +++ /home/runner/work/ovn/ovn/ovn-21.09.90/_build/sub/tests/testsuite.dir/at-groups/1069/stdout     2021-10-07 12:50:45.169509348 +0000
>>> # @@ -1,9 +1 @@
>>> # -Chassis gw1
>>> # -    hostname: gw1
>>> # -    Encap vxlan
>>> # -    Encap geneve
>>> # -        options: {csum="true"}
>>> # -        options: {csum="true"}
>>> # -        ip: "192.168.0.1"
>>> # -        ip: "192.168.0.1"
>>> 
>>> 1069. ovn-ic.at:119: 1069. ovn-ic -- gateway sync -- ovn-northd -- dp-groups=no (ovn-ic.at:119): FAILED (ovn-ic.at:119)
> 
> Thanks for fixing this issue.   Applied to the main branch and to branch-21.09.
> 
> Numan
> 
>>> 
>>> Signed-off-by: Vladislav Odintsov <odivlad@gmail.com>
>>> ---
>>> tests/ovn-ic.at | 1 +
>>> 1 file changed, 1 insertion(+)
>>> 
>>> diff --git a/tests/ovn-ic.at b/tests/ovn-ic.at
>>> index 15560334d..3faa9629a 100644
>>> --- a/tests/ovn-ic.at
>>> +++ b/tests/ovn-ic.at
>>> @@ -129,6 +129,7 @@ ovs-vsctl add-br br-phys
>>> ovn_az_attach az1 n1 br-phys 192.168.0.1
>>> ovs-vsctl set open . external-ids:ovn-is-interconn=true external-ids:hostname=gw1
>>> 
>>> +OVS_WAIT_UNTIL([ovn_as az2 ovn-sbctl show | grep "192.168.0.1"])
>>> AT_CHECK([ovn_as az2 ovn-sbctl show | sort -r], [0], [dnl
>>> Chassis gw1
>>>     hostname: gw1
>>> 
>> 
>> Acked-by: Mark D. Gray <mark.d.gray@redhat.com>
>> 
>> _______________________________________________
>> dev mailing list
>> dev@openvswitch.org
>> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>> 
> _______________________________________________
> dev mailing list
> dev@openvswitch.org <mailto:dev@openvswitch.org>
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev <https://mail.openvswitch.org/mailman/listinfo/ovs-dev>
diff mbox series

Patch

diff --git a/tests/ovn-ic.at b/tests/ovn-ic.at
index 15560334d..3faa9629a 100644
--- a/tests/ovn-ic.at
+++ b/tests/ovn-ic.at
@@ -129,6 +129,7 @@  ovs-vsctl add-br br-phys
 ovn_az_attach az1 n1 br-phys 192.168.0.1
 ovs-vsctl set open . external-ids:ovn-is-interconn=true external-ids:hostname=gw1
 
+OVS_WAIT_UNTIL([ovn_as az2 ovn-sbctl show | grep "192.168.0.1"])
 AT_CHECK([ovn_as az2 ovn-sbctl show | sort -r], [0], [dnl
 Chassis gw1
     hostname: gw1