[ovs-dev] [PATCH 3/7] ovn: Fix some races in IPAM connectivity test.
Ben Pfaff
blp at ovn.org
Fri Oct 7 15:33:54 UTC 2016
On Fri, Oct 07, 2016 at 07:27:54AM -0700, Guru Shetty wrote:
> On 5 October 2016 at 18:26, Ben Pfaff <blp at ovn.org> wrote:
>
> > It can take a way for dynamic addresses to propagate through ovn-northd,
> > so wait for it to happen.
> >
> > Signed-off-by: Ben Pfaff <blp at ovn.org>
> > ---
> > tests/ovn.at | 13 ++++---------
> > 1 file changed, 4 insertions(+), 9 deletions(-)
> >
> > diff --git a/tests/ovn.at b/tests/ovn.at
> > index 4214a00..9baa1df 100644
> > --- a/tests/ovn.at
> > +++ b/tests/ovn.at
> > @@ -4724,23 +4724,18 @@ ovn-nbctl lsp-add alice rp-alice -- set
> > Logical_Switch_Port rp-alice type=router
> > # Create logical port foo1 in foo
> > ovn-nbctl lsp-add foo foo1 \
> > -- lsp-set-addresses foo1 "dynamic"
> > -AT_CHECK([ovn-nbctl get Logical-Switch-Port foo1 dynamic_addresses], [0],
> > - ["0a:00:00:00:00:01 192.168.1.2"
> > -])
> > +AT_CHECK([ovn-nbctl --timeout=10 wait-until Logical-Switch-Port foo1
> > dynamic_addresses='"0a:00:00:00:00:01 192.168.1.2"'], [0])
> >
> > # Create logical port alice1 in alice
> > ovn-nbctl lsp-add alice alice1 \
> > -- lsp-set-addresses alice1 "dynamic"
> > -AT_CHECK([ovn-nbctl get Logical-Switch-Port alice1 dynamic_addresses],
> > [0],
> > - ["0a:00:00:00:00:02 192.168.2.2"
> > -])
> > +AT_CHECK([ovn-nbctl --timeout=10 wait-until Logical-Switch-Port alice1
> > dynamic_addresses='"0a:00:00:00:00:02 192.168.2.2"'])
> >
> > # Create logical port foo2 in foo
> > ovn-nbctl lsp-add foo foo2 \
> > -- lsp-set-addresses foo2 "dynamic"
> > -AT_CHECK([ovn-nbctl get Logical-Switch-Port foo2 dynamic_addresses], [0],
> > - ["0a:00:00:00:00:03 192.168.1.3"
> > -])
> > +sleep 1
> >
>
> Why a sleep 1?
I think that must have crept in as I was experimenting. It should not
be necessary. I've removed it now.
>
> > +AT_CHECK([ovn-nbctl --timeout=10 wait-until Logical-Switch-Port foo2
> > dynamic_addresses='"0a:00:00:00:00:03 192.168.1.3"'])
> >
> > # Create a hypervisor and create OVS ports corresponding to logical ports.
> > net_add n1
> >
> Acked-by: Gurucharan Shetty <guru at ovn.org>
Thanks!
More information about the dev
mailing list