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

Numan Siddique nusiddiq at redhat.com
Thu Nov 30 10:45:09 UTC 2017


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.

Thanks
Numan


> Thanks,
>
> Ben.
>


More information about the dev mailing list