On 12 August 2016 at 02:48, Gurucharan Shetty <g...@ovn.org> wrote: > The client and servers are in the same subnet. > > (This would not have worked without the recent > IPv6 patches that let packets to loop back) > > Signed-off-by: Gurucharan Shetty <g...@ovn.org>
A couple of minor comments below, but otherwise this seems fine. Acked-by: Joe Stringer <j...@ovn.org> > --- > tests/system-ovn.at | 118 > ++++++++++++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 118 insertions(+) > > diff --git a/tests/system-ovn.at b/tests/system-ovn.at > index 6ac5ece..efba4a7 100755 > --- a/tests/system-ovn.at > +++ b/tests/system-ovn.at > @@ -416,3 +416,121 @@ OVS_APP_EXIT_AND_WAIT([ovn-northd]) > as > OVS_TRAFFIC_VSWITCHD_STOP(["/failed to query port patch-.*/d"]) > AT_CLEANUP > + > +AT_SETUP([ovn -- load-balancing - same subnet.]) > +AT_KEYWORDS([ovnlb]) > + > +CHECK_CONNTRACK() > +CHECK_CONNTRACK_NAT() > +ovn_start > +OVS_TRAFFIC_VSWITCHD_START() > +ADD_BR([br-int]) > + > +# Set external-ids in br-int needed for ovn-controller > +ovs-vsctl \ > + -- set Open_vSwitch . external-ids:system-id=hv1 \ > + -- set Open_vSwitch . > external-ids:ovn-remote=unix:$ovs_base/ovn-sb/ovn-sb.sock \ > + -- set Open_vSwitch . external-ids:ovn-encap-type=geneve \ > + -- set Open_vSwitch . external-ids:ovn-encap-ip=169.0.0.1 \ > + -- set bridge br-int fail-mode=secure > other-config:disable-in-band=true > + > +# Start ovn-controller > +start_daemon ovn-controller > + > +# Logical network: > +# 1 logical switch "foo" (192.168.1.0/24) connected to router R1. > +# foo has foo1, foo2, foo3, foo4 as logical ports. > +# > +# Loadbalancer VIPs in 30.0.0.0/24 network. Router is needed for default > +# gateway. We will test load-balancing with foo1 as a client and foo2, foo3 > and > +# foo4 as servers. > + > +ovn-nbctl create Logical_Router name=R1 > +ovn-nbctl ls-add foo > + > +# Connect foo to R1 > +ovn-nbctl lrp-add R1 foo 00:00:01:01:02:03 192.168.1.1/24 > +ovn-nbctl lsp-add foo rp-foo -- set Logical_Switch_Port rp-foo \ > + type=router options:router-port=foo addresses=\"00:00:01:01:02:03\" > + > +# Create logical port 'foo1', 'foo2', 'foo3' and 'foo4' in switch 'foo'. > +ADD_NAMESPACES(foo1) > +ADD_VETH(foo1, foo1, br-int, "192.168.1.2/24", "f0:00:00:01:02:03", \ > + "192.168.1.1") > +ovn-nbctl lsp-add foo foo1 \ > +-- lsp-set-addresses foo1 "f0:00:00:01:02:03 192.168.1.2" > + > +ADD_NAMESPACES(foo2) > +ADD_VETH(foo2, foo2, br-int, "192.168.1.3/24", "f0:00:00:01:02:04", \ > + "192.168.1.1") > +ovn-nbctl lsp-add foo foo2 \ > +-- lsp-set-addresses foo2 "f0:00:00:01:02:04 192.168.1.3" > + > +ADD_NAMESPACES(foo3) > +ADD_VETH(foo3, foo3, br-int, "192.168.1.4/24", "f0:00:00:01:02:05", \ > + "192.168.1.1") > +ovn-nbctl lsp-add foo foo3 \ > +-- lsp-set-addresses foo3 "f0:00:00:01:02:05 192.168.1.4" > + > +ADD_NAMESPACES(foo4) > +ADD_VETH(foo4, foo4, br-int, "192.168.1.5/24", "f0:00:00:01:02:06", \ > + "192.168.1.1") > +ovn-nbctl lsp-add foo foo4 \ > +-- lsp-set-addresses foo4 "f0:00:00:01:02:06 192.168.1.5" ADD_NAMESPACES accepts multiple arguments, so you could have a single call to create all of these. Is there a reason why you didn't use a for loop to create these? _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev