[ovs-dev] [PATCH v2] ovn-ctl: Add new commands 'run_nb_server' and 'run_sb_server'

Numan Siddique nusiddiq at redhat.com
Fri Dec 1 09:08:58 UTC 2017


On Thu, Nov 30, 2017 at 11:38 PM, Numan Siddique <nusiddiq at redhat.com>
wrote:

>
>
> On Thu, Nov 30, 2017 at 11:27 PM, Ben Pfaff <blp at ovn.org> wrote:
>
>> On Thu, Nov 30, 2017 at 04:15:09PM +0530, Numan Siddique wrote:
>> > On Wed, Nov 29, 2017 at 11:19 PM, Ben Pfaff <blp at ovn.org> wrote:
>> >
>> > > On Tue, Nov 21, 2017 at 12:35:56PM +0530, nusiddiq at redhat.com wrote:
>> > > > From: Numan Siddique <nusiddiq at redhat.com>
>> > > >
>> > > > Presently if the user wants to start OVN db servers as separate
>> > > containers, 'ovn-ctl'
>> > > > script is not useful as '--detach' option is passed when
>> ovsdb-servers
>> > > are started.
>> > > > If the container command is 'ovn-ctl start_nb_ovsdb', the  container
>> > > exits as soon as
>> > > > ovn-ctl exits.
>> > > >
>> > > > This patch adds two new commands - 'run_nb_server' and
>> 'run_sb_server'.
>> > > This will be
>> > > > really useful for the above mentioned requirement.
>> > > >
>> > > > Without these commands, the user may have to first generate the db
>> by
>> > > running 'ovsdb-tool'
>> > > > and then start the container with the command 'ovsdb-server
>> ovnnb_db.db
>> > > ....' and this
>> > > > is very inconvenient.
>> > > >
>> > > > This patch also updates the documentation in ovn-ctl.8.xml.
>> > > >
>> > > > Signed-off-by: Numan Siddique <nusiddiq at redhat.com>
>> > >
>> > > Thanks for v2.
>> > >
>> > > It occurs to me that we might be able to do an additional optimization
>> > > in this case.  After ovsdb-server exits, does ovn-ctl do anything
>> else?
>> > > If not, then we could use "exec" to simply replace the script by
>> > > ovsdb-server, something like this:
>> > >
>> > > -        set "$@" --detach --monitor
>> > > +        if test X"$DB_NB_DETACH" != Xno; then
>> > > +            set "$@" --detach --monitor
>> > > +        else
>> > > +            set exec "$@"
>> > > +        fi
>> > >
>> > > With this change, we could additionally drop the changes following
>> > > starting ovsdb-server, since they'd never get executed.
>> > >
>> > > Just a thought.
>> > >
>> > >
>> > Thanks Ben for the review and the suggestions. I will work on it and
>> submit
>> > v3.
>>
>> OK.
>>
>> You might find that there is some reason that "exec" is not a good idea
>> or will not work.  If so, let me know--I will apply this version.
>>
>
> Sure. I will test it out and let you know.
>
>
It worked fine. So I submitted v3 here -
https://patchwork.ozlabs.org/patch/843405/

Thanks
Numan


> Thanks
> Numan
>
>
>


More information about the dev mailing list