Message ID | 20200611124409.1356507-1-numans@ovn.org |
---|---|
State | Superseded |
Headers | show |
Series | Incremental processing improvements. | expand |
On 6/11/20 2:44 PM, numans@ovn.org wrote: > From: Numan Siddique <numans@ovn.org> > > This covers the scenario of setting up/deleting of BFD tunnels > for HA. > > Tested-by: Dumitru Ceara <dceara@redhat.com> > Signed-off-by: Numan Siddique <numans@ovn.org> Hi Numan, This test now fails for me: 0 0 0 0 0 ovn-nbctl --wait=hv lrp-set-gateway-chassis lr1-public gw1 30 ./ovn-performance.at:463: test $rc -eq 0 -a $rv -eq 1 ./ovn-performance.at:463: exit code was 1, expected 0 Maybe we missed something in the previous patches? Thanks, Dumitru > --- > tests/ovn-performance.at | 104 +++++++++++++++++++++++++++++++++++++++ > 1 file changed, 104 insertions(+) > > diff --git a/tests/ovn-performance.at b/tests/ovn-performance.at > index a12757e18..2a15cb473 100644 > --- a/tests/ovn-performance.at > +++ b/tests/ovn-performance.at > @@ -239,6 +239,16 @@ for i in 1 2; do > ovn_attach n1 br-phys 192.168.0.$i > done > > +for i in 1 2 3; do > + sim_add gw$i > + as gw$i > + ovs-vsctl add-br br-phys > + ovs-vsctl add-br br-ex > + ovs-vsctl set open . external_ids:ovn-bridge-mappings="public:br-ex" > + j=$((i + 2)) > + ovn_attach n1 br-phys 192.168.0.$j > +done > + > # Wait for the tunnel ports to be created and up. > # Otherwise this may affect the lflow_run count. > > @@ -399,6 +409,100 @@ OVN_CONTROLLER_EXPECT_NO_HIT( > [ovn-nbctl --wait=hv acl-add pg1 to-lport 1001 'outport == @pg1 && ip4.src == $pg1_ip4' allow] > ) > > +# Create a public logical switch and attach the router to it. > +OVN_CONTROLLER_EXPECT_NO_HIT( > + [hv1 hv2], [lflow_run], > + [ovn-nbctl --wait=hv ls-add public] > +) > + > +OVN_CONTROLLER_EXPECT_NO_HIT( > + [hv1 hv2], [lflow_run], > + [ovn-nbctl --wait=hv lsp-add public public-lr1] > +) > + > +OVN_CONTROLLER_EXPECT_NO_HIT( > + [hv1 hv2], [lflow_run], > + [ovn-nbctl --wait=hv lsp-set-type public-lr1 router] > +) > + > +OVN_CONTROLLER_EXPECT_NO_HIT( > + [hv1 hv2], [lflow_run], > + [ovn-nbctl --wait=hv lsp-set-addresses public-lr1 router] > +) > + > +OVN_CONTROLLER_EXPECT_NO_HIT( > + [hv1 hv2], [lflow_run], > + [ovn-nbctl --wait=hv lsp-set-options public-lr1 router-port=lr1-public] > +) > + > +OVN_CONTROLLER_EXPECT_NO_HIT( > + [hv1 hv2], [lflow_run], > + [ovn-nbctl --wait=hv lrp-add lr1 lr1-public 00:00:20:20:12:13 172.168.0.100/24] > +) > + > +OVN_CONTROLLER_EXPECT_NO_HIT( > + [hv1 hv2], [lflow_run], > + [ovn-nbctl --wait=hv lsp-add public ln-public] > +) > + > +OVN_CONTROLLER_EXPECT_NO_HIT( > + [hv1 hv2], [lflow_run], > + [ovn-nbctl --wait=hv lsp-set-type ln-public localnet] > +) > + > +OVN_CONTROLLER_EXPECT_NO_HIT( > + [hv1 hv2], [lflow_run], > + [ovn-nbctl --wait=hv lsp-set-addresses ln-public unknown] > +) > + > +OVN_CONTROLLER_EXPECT_NO_HIT( > + [hv1 hv2], [lflow_run], > + [ovn-nbctl --wait=hv lsp-set-options ln-public network_name=public] > +) > + > +OVN_CONTROLLER_EXPECT_HIT_COND( > + [hv1 hv2 gw1 gw2 gw3], [lflow_run], [=0 =0 >0 =0 =0], > + [ovn-nbctl --wait=hv lrp-set-gateway-chassis lr1-public gw1 30] > +) > + > +# After this, BFD should be enabled from hv1 and hv2 to gw1. > +# So there should be lflow_run hits in hv1, hv2, gw1 and gw2 > +OVN_CONTROLLER_EXPECT_HIT_COND( > + [hv1 hv2 gw1 gw2 gw3], [lflow_run], [>0 >0 >0 >0 =0], > + [ovn-nbctl --wait=hv lrp-set-gateway-chassis lr1-public gw2 20] > +) > + > +OVN_CONTROLLER_EXPECT_HIT( > + [hv1 hv2 gw1 gw2 gw3], [lflow_run], > + [ovn-nbctl --wait=hv lrp-set-gateway-chassis lr1-public gw3 10] > +) > + > +# Make gw2 master. > +OVN_CONTROLLER_EXPECT_NO_HIT( > + [hv1 hv2 gw1 gw2 gw3], [lflow_run], > + [ovn-nbctl --wait=hv lrp-set-gateway-chassis lr1-public gw2 40] > +) > + > +# Delete gw2 from gateway chassis > +OVN_CONTROLLER_EXPECT_HIT( > + [hv1 hv2 gw1 gw2 gw3], [lflow_run], > + [ovn-nbctl --wait=hv lrp-del-gateway-chassis lr1-public gw2] > +) > + > +# Delete gw1 from gateway chassis > +# After this, the BFD should be disabled entirely as gw3 is the > +# only gateway chassis. > +OVN_CONTROLLER_EXPECT_HIT_COND( > + [hv1 hv2 gw1 gw2 gw3], [lflow_run], [>0 >0 >0 =0 >0], > + [ovn-nbctl --wait=hv lrp-del-gateway-chassis lr1-public gw1] > +) > + > +# Delete gw3 from gateway chassis. There should be no lflow_run. > +OVN_CONTROLLER_EXPECT_NO_HIT( > + [hv1 hv2 gw1 gw2 gw3], [lflow_run], > + [ovn-nbctl --wait=hv lrp-del-gateway-chassis lr1-public gw3] > +) > + > for i in 1 2; do > j=$((i%2 + 1)) > lp=lp$i >
On Fri, Jun 19, 2020 at 2:08 PM Dumitru Ceara <dceara@redhat.com> wrote: > On 6/11/20 2:44 PM, numans@ovn.org wrote: > > From: Numan Siddique <numans@ovn.org> > > > > This covers the scenario of setting up/deleting of BFD tunnels > > for HA. > > > > Tested-by: Dumitru Ceara <dceara@redhat.com> > > Signed-off-by: Numan Siddique <numans@ovn.org> > > Hi Numan, > > This test now fails for me: > > 0 0 0 0 0 ovn-nbctl --wait=hv > lrp-set-gateway-chassis lr1-public gw1 30 > > ./ovn-performance.at:463: test $rc -eq 0 -a $rv -eq 1 > ./ovn-performance.at:463: exit code was 1, expected 0 > > Maybe we missed something in the previous patches? > There was a race condition window. Fixed it by adding ovn-sbctl --wait=hv sync Thanks for the suggestion. I have submitted v13 addressing the comments and fixing this test failure. Please take a look. Numan > > Thanks, > Dumitru > > > --- > > tests/ovn-performance.at | 104 +++++++++++++++++++++++++++++++++++++++ > > 1 file changed, 104 insertions(+) > > > > diff --git a/tests/ovn-performance.at b/tests/ovn-performance.at > > index a12757e18..2a15cb473 100644 > > --- a/tests/ovn-performance.at > > +++ b/tests/ovn-performance.at > > @@ -239,6 +239,16 @@ for i in 1 2; do > > ovn_attach n1 br-phys 192.168.0.$i > > done > > > > +for i in 1 2 3; do > > + sim_add gw$i > > + as gw$i > > + ovs-vsctl add-br br-phys > > + ovs-vsctl add-br br-ex > > + ovs-vsctl set open . external_ids:ovn-bridge-mappings="public:br-ex" > > + j=$((i + 2)) > > + ovn_attach n1 br-phys 192.168.0.$j > > +done > > + > > # Wait for the tunnel ports to be created and up. > > # Otherwise this may affect the lflow_run count. > > > > @@ -399,6 +409,100 @@ OVN_CONTROLLER_EXPECT_NO_HIT( > > [ovn-nbctl --wait=hv acl-add pg1 to-lport 1001 'outport == @pg1 && > ip4.src == $pg1_ip4' allow] > > ) > > > > +# Create a public logical switch and attach the router to it. > > +OVN_CONTROLLER_EXPECT_NO_HIT( > > + [hv1 hv2], [lflow_run], > > + [ovn-nbctl --wait=hv ls-add public] > > +) > > + > > +OVN_CONTROLLER_EXPECT_NO_HIT( > > + [hv1 hv2], [lflow_run], > > + [ovn-nbctl --wait=hv lsp-add public public-lr1] > > +) > > + > > +OVN_CONTROLLER_EXPECT_NO_HIT( > > + [hv1 hv2], [lflow_run], > > + [ovn-nbctl --wait=hv lsp-set-type public-lr1 router] > > +) > > + > > +OVN_CONTROLLER_EXPECT_NO_HIT( > > + [hv1 hv2], [lflow_run], > > + [ovn-nbctl --wait=hv lsp-set-addresses public-lr1 router] > > +) > > + > > +OVN_CONTROLLER_EXPECT_NO_HIT( > > + [hv1 hv2], [lflow_run], > > + [ovn-nbctl --wait=hv lsp-set-options public-lr1 > router-port=lr1-public] > > +) > > + > > +OVN_CONTROLLER_EXPECT_NO_HIT( > > + [hv1 hv2], [lflow_run], > > + [ovn-nbctl --wait=hv lrp-add lr1 lr1-public 00:00:20:20:12:13 > 172.168.0.100/24] > > +) > > + > > +OVN_CONTROLLER_EXPECT_NO_HIT( > > + [hv1 hv2], [lflow_run], > > + [ovn-nbctl --wait=hv lsp-add public ln-public] > > +) > > + > > +OVN_CONTROLLER_EXPECT_NO_HIT( > > + [hv1 hv2], [lflow_run], > > + [ovn-nbctl --wait=hv lsp-set-type ln-public localnet] > > +) > > + > > +OVN_CONTROLLER_EXPECT_NO_HIT( > > + [hv1 hv2], [lflow_run], > > + [ovn-nbctl --wait=hv lsp-set-addresses ln-public unknown] > > +) > > + > > +OVN_CONTROLLER_EXPECT_NO_HIT( > > + [hv1 hv2], [lflow_run], > > + [ovn-nbctl --wait=hv lsp-set-options ln-public network_name=public] > > +) > > + > > +OVN_CONTROLLER_EXPECT_HIT_COND( > > + [hv1 hv2 gw1 gw2 gw3], [lflow_run], [=0 =0 >0 =0 =0], > > + [ovn-nbctl --wait=hv lrp-set-gateway-chassis lr1-public gw1 30] > > +) > > + > > +# After this, BFD should be enabled from hv1 and hv2 to gw1. > > +# So there should be lflow_run hits in hv1, hv2, gw1 and gw2 > > +OVN_CONTROLLER_EXPECT_HIT_COND( > > + [hv1 hv2 gw1 gw2 gw3], [lflow_run], [>0 >0 >0 >0 =0], > > + [ovn-nbctl --wait=hv lrp-set-gateway-chassis lr1-public gw2 20] > > +) > > + > > +OVN_CONTROLLER_EXPECT_HIT( > > + [hv1 hv2 gw1 gw2 gw3], [lflow_run], > > + [ovn-nbctl --wait=hv lrp-set-gateway-chassis lr1-public gw3 10] > > +) > > + > > +# Make gw2 master. > > +OVN_CONTROLLER_EXPECT_NO_HIT( > > + [hv1 hv2 gw1 gw2 gw3], [lflow_run], > > + [ovn-nbctl --wait=hv lrp-set-gateway-chassis lr1-public gw2 40] > > +) > > + > > +# Delete gw2 from gateway chassis > > +OVN_CONTROLLER_EXPECT_HIT( > > + [hv1 hv2 gw1 gw2 gw3], [lflow_run], > > + [ovn-nbctl --wait=hv lrp-del-gateway-chassis lr1-public gw2] > > +) > > + > > +# Delete gw1 from gateway chassis > > +# After this, the BFD should be disabled entirely as gw3 is the > > +# only gateway chassis. > > +OVN_CONTROLLER_EXPECT_HIT_COND( > > + [hv1 hv2 gw1 gw2 gw3], [lflow_run], [>0 >0 >0 =0 >0], > > + [ovn-nbctl --wait=hv lrp-del-gateway-chassis lr1-public gw1] > > +) > > + > > +# Delete gw3 from gateway chassis. There should be no lflow_run. > > +OVN_CONTROLLER_EXPECT_NO_HIT( > > + [hv1 hv2 gw1 gw2 gw3], [lflow_run], > > + [ovn-nbctl --wait=hv lrp-del-gateway-chassis lr1-public gw3] > > +) > > + > > for i in 1 2; do > > j=$((i%2 + 1)) > > lp=lp$i > > > > _______________________________________________ > dev mailing list > dev@openvswitch.org > https://mail.openvswitch.org/mailman/listinfo/ovs-dev > >
diff --git a/tests/ovn-performance.at b/tests/ovn-performance.at index a12757e18..2a15cb473 100644 --- a/tests/ovn-performance.at +++ b/tests/ovn-performance.at @@ -239,6 +239,16 @@ for i in 1 2; do ovn_attach n1 br-phys 192.168.0.$i done +for i in 1 2 3; do + sim_add gw$i + as gw$i + ovs-vsctl add-br br-phys + ovs-vsctl add-br br-ex + ovs-vsctl set open . external_ids:ovn-bridge-mappings="public:br-ex" + j=$((i + 2)) + ovn_attach n1 br-phys 192.168.0.$j +done + # Wait for the tunnel ports to be created and up. # Otherwise this may affect the lflow_run count. @@ -399,6 +409,100 @@ OVN_CONTROLLER_EXPECT_NO_HIT( [ovn-nbctl --wait=hv acl-add pg1 to-lport 1001 'outport == @pg1 && ip4.src == $pg1_ip4' allow] ) +# Create a public logical switch and attach the router to it. +OVN_CONTROLLER_EXPECT_NO_HIT( + [hv1 hv2], [lflow_run], + [ovn-nbctl --wait=hv ls-add public] +) + +OVN_CONTROLLER_EXPECT_NO_HIT( + [hv1 hv2], [lflow_run], + [ovn-nbctl --wait=hv lsp-add public public-lr1] +) + +OVN_CONTROLLER_EXPECT_NO_HIT( + [hv1 hv2], [lflow_run], + [ovn-nbctl --wait=hv lsp-set-type public-lr1 router] +) + +OVN_CONTROLLER_EXPECT_NO_HIT( + [hv1 hv2], [lflow_run], + [ovn-nbctl --wait=hv lsp-set-addresses public-lr1 router] +) + +OVN_CONTROLLER_EXPECT_NO_HIT( + [hv1 hv2], [lflow_run], + [ovn-nbctl --wait=hv lsp-set-options public-lr1 router-port=lr1-public] +) + +OVN_CONTROLLER_EXPECT_NO_HIT( + [hv1 hv2], [lflow_run], + [ovn-nbctl --wait=hv lrp-add lr1 lr1-public 00:00:20:20:12:13 172.168.0.100/24] +) + +OVN_CONTROLLER_EXPECT_NO_HIT( + [hv1 hv2], [lflow_run], + [ovn-nbctl --wait=hv lsp-add public ln-public] +) + +OVN_CONTROLLER_EXPECT_NO_HIT( + [hv1 hv2], [lflow_run], + [ovn-nbctl --wait=hv lsp-set-type ln-public localnet] +) + +OVN_CONTROLLER_EXPECT_NO_HIT( + [hv1 hv2], [lflow_run], + [ovn-nbctl --wait=hv lsp-set-addresses ln-public unknown] +) + +OVN_CONTROLLER_EXPECT_NO_HIT( + [hv1 hv2], [lflow_run], + [ovn-nbctl --wait=hv lsp-set-options ln-public network_name=public] +) + +OVN_CONTROLLER_EXPECT_HIT_COND( + [hv1 hv2 gw1 gw2 gw3], [lflow_run], [=0 =0 >0 =0 =0], + [ovn-nbctl --wait=hv lrp-set-gateway-chassis lr1-public gw1 30] +) + +# After this, BFD should be enabled from hv1 and hv2 to gw1. +# So there should be lflow_run hits in hv1, hv2, gw1 and gw2 +OVN_CONTROLLER_EXPECT_HIT_COND( + [hv1 hv2 gw1 gw2 gw3], [lflow_run], [>0 >0 >0 >0 =0], + [ovn-nbctl --wait=hv lrp-set-gateway-chassis lr1-public gw2 20] +) + +OVN_CONTROLLER_EXPECT_HIT( + [hv1 hv2 gw1 gw2 gw3], [lflow_run], + [ovn-nbctl --wait=hv lrp-set-gateway-chassis lr1-public gw3 10] +) + +# Make gw2 master. +OVN_CONTROLLER_EXPECT_NO_HIT( + [hv1 hv2 gw1 gw2 gw3], [lflow_run], + [ovn-nbctl --wait=hv lrp-set-gateway-chassis lr1-public gw2 40] +) + +# Delete gw2 from gateway chassis +OVN_CONTROLLER_EXPECT_HIT( + [hv1 hv2 gw1 gw2 gw3], [lflow_run], + [ovn-nbctl --wait=hv lrp-del-gateway-chassis lr1-public gw2] +) + +# Delete gw1 from gateway chassis +# After this, the BFD should be disabled entirely as gw3 is the +# only gateway chassis. +OVN_CONTROLLER_EXPECT_HIT_COND( + [hv1 hv2 gw1 gw2 gw3], [lflow_run], [>0 >0 >0 =0 >0], + [ovn-nbctl --wait=hv lrp-del-gateway-chassis lr1-public gw1] +) + +# Delete gw3 from gateway chassis. There should be no lflow_run. +OVN_CONTROLLER_EXPECT_NO_HIT( + [hv1 hv2 gw1 gw2 gw3], [lflow_run], + [ovn-nbctl --wait=hv lrp-del-gateway-chassis lr1-public gw3] +) + for i in 1 2; do j=$((i%2 + 1)) lp=lp$i