Hi Jakub, On Mon, Jul 30, 2018 at 04:37:49PM +0200, Jakub Sitnicki wrote: > If a logical switch port belongs to a port group and has dynamic > addresses assigned, propagate the addresses to the auto-generated > address sets for the port group. > > Signed-off-by: Jakub Sitnicki <j...@redhat.com> > Acked-by: Han Zhou <hzh...@ebay.com> > --- > ovn/northd/ovn-northd.c | 34 ++++++++++++++++++++-------- > tests/ovn.at | 59 > +++++++++++++++++++++++++++++++++++++++++++++++++ > 2 files changed, 84 insertions(+), 9 deletions(-)
The test added by this patch, which is now present in the master branch, seems to fail. https://travis-ci.org/openvswitch/ovs/jobs/410550769 ... > diff --git a/tests/ovn.at b/tests/ovn.at > index e7bdfe250..32e6c1738 100644 > --- a/tests/ovn.at > +++ b/tests/ovn.at > @@ -10267,6 +10267,65 @@ AT_CHECK([ovn-sbctl get Address_Set pg1_ip6 > addresses], > > AT_CLEANUP > > +AT_SETUP([ovn -- Address Set generation from Port Groups (dynamic > addressing)]) > +ovn_start > + > +ovn-nbctl ls-add ls1 > +ovn-nbctl ls-add ls2 > +ovn-nbctl ls-add ls3 > + > +ovn-nbctl set Logical_Switch ls1 \ > + other_config:subnet=10.1.0.0/24 other_config:ipv6_prefix="2001:db8:1::" > +ovn-nbctl set Logical_Switch ls2 \ > + other_config:subnet=10.2.0.0/24 other_config:ipv6_prefix="2001:db8:2::" > +ovn-nbctl set Logical_Switch ls3 \ > + other_config:subnet=10.3.0.0/24 other_config:ipv6_prefix="2001:db8:3::" > + > +ovn-nbctl lsp-add ls1 lp1 > +ovn-nbctl lsp-add ls2 lp2 > +ovn-nbctl lsp-add ls3 lp3 > + > +ovn-nbctl lsp-set-addresses lp1 "02:00:00:00:00:01 dynamic" > +ovn-nbctl lsp-set-addresses lp2 "02:00:00:00:00:02 dynamic" > +ovn-nbctl lsp-set-addresses lp3 "02:00:00:00:00:03 dynamic" > + > +ovn-nbctl create Port_Group name=pg1 > +ovn-nbctl create Port_Group name=pg2 > + > +ovn-nbctl --id=@p get Logical_Switch_Port lp1 -- add Port_Group pg1 ports @p > +ovn-nbctl --id=@p get Logical_Switch_Port lp2 -- add Port_Group pg1 ports @p > +ovn-nbctl --id=@p get Logical_Switch_Port lp2 -- add Port_Group pg2 ports @p > +ovn-nbctl --id=@p get Logical_Switch_Port lp3 -- add Port_Group pg2 ports @p > + > +ovn-nbctl --wait=sb sync > + > +dnl Check if port group address sets were populated with ports' addresses > +AT_CHECK([ovn-sbctl get Address_Set pg1_ip4 addresses], > + [0], [[["10.1.0.2", "10.2.0.2"]] > +]) > +AT_CHECK([ovn-sbctl get Address_Set pg2_ip4 addresses], > + [0], [[["10.2.0.2", "10.3.0.2"]] > +]) > +AT_CHECK([ovn-sbctl get Address_Set pg1_ip6 addresses], > + [0], [[["2001:db8:1::ff:fe00:1", "2001:db8:2::ff:fe00:2"]] > +]) > +AT_CHECK([ovn-sbctl get Address_Set pg2_ip6 addresses], > + [0], [[["2001:db8:2::ff:fe00:2", "2001:db8:3::ff:fe00:3"]] > +]) > + > +ovn-nbctl set Logical_Switch ls1 \ > + other_config:subnet=10.11.0.0/24 other_config:ipv6_prefix="2001:db8:11::" > + Empirically the following allows the test to pass in my local environment: > +dnl Check if updated address got propagated to the port group address sets > +AT_CHECK([ovn-sbctl get Address_Set pg1_ip4 addresses], > + [0], [[["10.11.0.2", "10.2.0.2"]] - s/10.11.0.2/10.1.0.2/ > +]) > +AT_CHECK([ovn-sbctl get Address_Set pg1_ip6 addresses], > + [0], [[["2001:db8:11::ff:fe00:1", "2001:db8:2::ff:fe00:2"]] - s/2001:db8:11::ff:fe00:1/2001:db8:1::ff:fe00:1/ > +]) > + > +AT_CLEANUP > + > AT_SETUP([ovn -- ACL conjunction]) > ovn_start > > -- > 2.14.4 > > _______________________________________________ > dev mailing list > d...@openvswitch.org > https://mail.openvswitch.org/mailman/listinfo/ovs-dev > _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev