[ovs-dev] [PATCH] ovn-ctl: Provide the option to detach the OVN db servers or not when starting

Ben Pfaff blp at ovn.org
Thu Nov 2 17:45:35 UTC 2017


On Thu, Nov 02, 2017 at 04:55:14PM +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 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 <nusiddiq at redhat.com>

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?


More information about the dev mailing list