On Thu, Nov 02, 2017 at 11:41:17PM +0530, Numan Siddique wrote:
> On Thu, Nov 2, 2017 at 11:15 PM, Ben Pfaff <[email protected]> wrote:
> 
> > On Thu, Nov 02, 2017 at 04:55:14PM +0530, [email protected] wrote:
> > > From: Numan Siddique <[email protected]>
> > >
> > > 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 2 new options to the 'ovn-ctl' script - '--db-nb-detach'
> > and
> > > '--db-sb-detach' which can take 'yes/no'. This will be really useful for
> > the above
> > > mentioned requirement. The user can start NB ovsdb-server with the
> > command
> > > 'ovn-ctl start_nb_ovsdb --db-nb-detach=no'.
> > >
> > > Without this option, 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 option will be useful only if the OVN db
> > servers are started
> > > in separate containers.
> > >
> > > This patch also updates the missing documentation in ovn-ctl.8.xml.
> > >
> > > Signed-off-by: Numan Siddique <[email protected]>
> >
> > Despite the small patch, this is a major change in actual functionality,
> > since, with this option, ovn-ctl changes from a fast-running script that
> > just starts or stops a daemon, to a long-running script that waits for
> > the daemon to exit.
> >
> > I wonder whether this would warrant new commands, e.g. run_nb_ovsdb and
> > run_sb_ovsdb.  These could be implemented internally by just adding the
> > option, I guess.
> >
> > Another way might be to add a command to wait for a service to exit.
> >
> > The "ovn-[sn]bctl init" commands won't run, in this case.  Maybe that is
> > not too important.
> >
> > --detach and --monitor are independent.  Is there a reason to remove
> > --monitor when removing --detach?
> >
> 
> Thanks Ben. I agree. I will work based on your suggestions.
> In the case of containers, I thnk monitor is not required. The life of the
> container in the case of ovsdb-server would be till it runs.
> In case the ovsdb-server exits unexpectedly, the container
> management service (like docker) can restart the container if "restart"
> flag is set when starting the container.
> Please let me know if this doesn't sound fine.

I think that's OK, then.

It would be good to explain what this does, and why, and when might want
to use it, in the ovn-ctl manpage.

Thanks,

Ben.
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to