On Fri, Apr 10, 2020 at 5:57 PM Brendan Doyle <brendan.do...@oracle.com> wrote: > > Thanks, > > Turns out I did not need it in the end, but the command to do it was: > > 'ovn-nbctl add logical_router_port lgi_vcn1-ls_external_vcn1 networks > "10.0.0.0/8"' > > But from the man page I would have expected that "ovn-nbctl --may-exist > lrp-add " > should have worked, else why the need for " --may-exist"?
I checked the code and you're hitting this code here - https://github.com/ovn-org/ovn/blob/master/utilities/ovn-nbctl.c#L4662 I'm not sure why that check is present. > > I looked at the "man ovn-nbctl" and see for "DATABASE COMMANDS" section > It talks of an "EXAMPLES section" but I could not find such a section in > the man page. > > I'm an OVN newbie, trying to use it from a consumers point of view, so > apologies if I'm > missing the "obvious" ways to do things, just trying to get to grips > with the documentation. > No worries. Welcome to OVN. Please feel free to report any documentation issues or bugs. Thanks Numan > Thanks again > > Brendan > > > On 09/04/2020 18:44, Numan Siddique wrote: > > On Thu, Apr 9, 2020 at 11:00 PM Brendan Doyle <brendan.do...@oracle.com> > > wrote: > >> OK thanks, I looked though the documentation and man pages and could not > >> find any hints. > > If there is a requirement to add more networks, I think ovn-nbctl can > > be enhanced > > with a new command like - lrp-add-network for example. > > > > ovs-vsctl/ovn-nbctl/ovn-sbctl supports generic database commands like > > add/set/del/create/destroy etc. > > > > Please see "man ovn-nbctl" and see for "DATABASE COMMANDS" section. > > > > Thanks > > Numan > > > >> > >> On 09/04/2020 18:26, Numan Siddique wrote: > >>> On Thu, Apr 9, 2020 at 10:47 PM Brendan Doyle <brendan.do...@oracle.com> > >>> wrote: > >>>> Hi, > >>>> > >>>> > >>>> How can I add a network to an existing lrp port, I thought I might be > >>>> able to use > >>>> --may-exist but: > >>>> > >>>> ovn-nbctl --may-exist lrp-add lgi_vcn1 lgi_vcn1-ls_external_vcn1 > >>>> 40:44:00:00:00:c0 172.20.1.105/24 10.0.0.0/8 > >>>> ovn-nbctl: lgi_vcn1-ls_external_vcn1: port already exists with different > >>>> network > >>>> > >>> One way to add this is: > >>> > >>> ovn-nbctl add logical_router_port lgi_vcn1 networks "10.0.0.0/8" > >>> > >>> Thanks > >>> Numan > >>> > >>>> Thanks > >>>> > >>>> Brendan > >>>> > >>>> _______________________________________________ > >>>> discuss mailing list > >>>> disc...@openvswitch.org > >>>> https://mail.openvswitch.org/mailman/listinfo/ovs-discuss > >> _______________________________________________ > >> discuss mailing list > >> disc...@openvswitch.org > >> https://mail.openvswitch.org/mailman/listinfo/ovs-discuss > >> > > _______________________________________________ > discuss mailing list > disc...@openvswitch.org > https://mail.openvswitch.org/mailman/listinfo/ovs-discuss > _______________________________________________ discuss mailing list disc...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-discuss