diff mbox

[ovs-dev,1/4] ovn: make ipam tests more reliable

Message ID 1475666445-90772-1-git-send-email-nickcooper-zhangtonghao@opencloud.tech
State Changes Requested
Headers show

Commit Message

nickcooper-zhangtonghao Oct. 5, 2016, 11:20 a.m. UTC
Fixes: 8639f9be("ovn-northd, tests: Adding IPAM to ovn-northd.")
The IPAM tests began to fail occasionally. Adding --wait=sb
to commands triggering address allocation eliminated these failures.

Signed-off-by: nickcooper-zhangtonghao <nickcooper-zhangtonghao@opencloud.tech>
---
 tests/ovn.at | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

Comments

Ben Pfaff Oct. 6, 2016, 12:30 a.m. UTC | #1
On Wed, Oct 05, 2016 at 04:20:42AM -0700, nickcooper-zhangtonghao wrote:
> Fixes: 8639f9be("ovn-northd, tests: Adding IPAM to ovn-northd.")
> The IPAM tests began to fail occasionally. Adding --wait=sb
> to commands triggering address allocation eliminated these failures.
> 
> Signed-off-by: nickcooper-zhangtonghao <nickcooper-zhangtonghao@opencloud.tech>

Thanks for working on this.

When there are multiple ovn-nbctl calls in a row, it's ordinarily only
necessary to add --wait to the last call.  Can you make that change?

Thanks,

Ben.
nickcooper-zhangtonghao Oct. 6, 2016, 10:55 a.m. UTC | #2
Good idea. I have submitted v2 patch.
> On Oct 6, 2016, at 8:30 AM, Ben Pfaff <blp@ovn.org> wrote:
> 
> Thanks for working on this.
> 
> When there are multiple ovn-nbctl calls in a row, it's ordinarily only
> necessary to add --wait to the last call.  Can you make that change?
Ben Pfaff Oct. 6, 2016, 3:34 p.m. UTC | #3
Are you sure?  I do not see it.

Thanks,

Ben.

On Thu, Oct 06, 2016 at 06:55:02PM +0800, nickcooper-zhangtonghao wrote:
> Good idea. I have submitted v2 patch.
> > On Oct 6, 2016, at 8:30 AM, Ben Pfaff <blp@ovn.org> wrote:
> > 
> > Thanks for working on this.
> > 
> > When there are multiple ovn-nbctl calls in a row, it's ordinarily only
> > necessary to add --wait to the last call.  Can you make that change?
>
nickcooper-zhangtonghao Oct. 6, 2016, 5:09 p.m. UTC | #4
Yes, I submitted the v2 patch. I can not see also it in
http://patchwork.ozlabs.org/project/openvswitch/list/ <http://patchwork.ozlabs.org/project/openvswitch/list/>

There may an error in patchwork. I will send directly the patch to you.
 
> On Oct 6, 2016, at 11:34 PM, Ben Pfaff <blp@ovn.org> wrote:
> 
> Are you sure?  I do not see it.
Ben Pfaff Oct. 6, 2016, 5:38 p.m. UTC | #5
I see it now, thanks.

On Fri, Oct 07, 2016 at 01:09:25AM +0800, nickcooper-zhangtonghao wrote:
> Yes, I submitted the v2 patch. I can not see also it in
> http://patchwork.ozlabs.org/project/openvswitch/list/ <http://patchwork.ozlabs.org/project/openvswitch/list/>
> 
> There may an error in patchwork. I will send directly the patch to you.
>  
> > On Oct 6, 2016, at 11:34 PM, Ben Pfaff <blp@ovn.org> wrote:
> > 
> > Are you sure?  I do not see it.
>
diff mbox

Patch

diff --git a/tests/ovn.at b/tests/ovn.at
index 2b193dd..73f1694 100644
--- a/tests/ovn.at
+++ b/tests/ovn.at
@@ -4543,8 +4543,8 @@  ovn_start
 # Add a port to a switch that does not have a subnet set, then set the
 # subnet which should result in an address being allocated for the port.
 ovn-nbctl ls-add sw0
-ovn-nbctl lsp-add sw0 p0 -- lsp-set-addresses p0 dynamic
-ovn-nbctl add Logical-Switch sw0 other_config subnet=192.168.1.0/24
+ovn-nbctl --wait=sb lsp-add sw0 p0 -- lsp-set-addresses p0 dynamic
+ovn-nbctl --wait=sb add Logical-Switch sw0 other_config subnet=192.168.1.0/24
 AT_CHECK([ovn-nbctl get Logical-Switch-Port p0 dynamic_addresses], [0],
     ["0a:00:00:00:00:01 192.168.1.2"
 ])
@@ -4584,7 +4584,7 @@  AT_CHECK([ovn-nbctl get Logical-Switch-Port p9 dynamic_addresses], [0],
 # Trying similar tests with a second switch. MAC addresses should be unique
 # across both switches but IP's only need to be unique within the same switch.
 ovn-nbctl ls-add sw1
-ovn-nbctl lsp-add sw1 p10 -- lsp-set-addresses p10 dynamic
+ovn-nbctl --wait=sb lsp-add sw1 p10 -- lsp-set-addresses p10 dynamic
 ovn-nbctl --wait=sb add Logical-Switch sw1 other_config subnet=192.168.1.0/24
 AT_CHECK([ovn-nbctl get Logical-Switch-Port p10 dynamic_addresses], [0],
      ["0a:00:00:00:00:0b 192.168.1.2"
@@ -4700,8 +4700,8 @@  ovn_start
 ovn-nbctl lr-add R1
 
 # Test for a ping using dynamically allocated addresses.
-ovn-nbctl ls-add foo -- add Logical_Switch foo other_config subnet=192.168.1.0/24
-ovn-nbctl ls-add alice -- add Logical_Switch alice other_config subnet=192.168.2.0/24
+ovn-nbctl --wait=sb ls-add foo -- add Logical_Switch foo other_config subnet=192.168.1.0/24
+ovn-nbctl --wait=sb ls-add alice -- add Logical_Switch alice other_config subnet=192.168.2.0/24
 
 # Connect foo to R1
 ovn-nbctl lrp-add R1 foo 00:00:00:01:02:03 192.168.1.1/24
@@ -4714,21 +4714,21 @@  ovn-nbctl lsp-add alice rp-alice -- set Logical_Switch_Port rp-alice type=router
           options:router-port=alice addresses=\"00:00:00:01:02:04\"
 
 # Create logical port foo1 in foo
-ovn-nbctl lsp-add foo foo1 \
+ovn-nbctl --wait=sb 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"
 ])
 
 # Create logical port alice1 in alice
-ovn-nbctl lsp-add alice alice1 \
+ovn-nbctl --wait=sb 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"
 ])
 
 # Create logical port foo2 in foo
-ovn-nbctl lsp-add foo foo2 \
+ovn-nbctl --wait=sb 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"