diff mbox

[ovs-dev,v2,1/2] install-doc: suggest to use ovs-ctl for start/stop

Message ID 20170417175950.8290-2-aconole@redhat.com
State Accepted
Headers show

Commit Message

Aaron Conole April 17, 2017, 5:59 p.m. UTC
The install documentation guided users to manually start/stop
daemons.  This is good information to have, but with the
existence of ovs-ctl, is probably not the best way to start
guiding new users of ovs.

Suggest that users start by running ovs-ctl start, and
document the ability to selectively start/stop the daemons.
The ovs-ctl script is already mentioned a bit in the install
doc, so this just reinforces its use.

Suggested-by: Ben Pfaff <blp@ovn.org>
Signed-off-by: Aaron Conole <aconole@redhat.com>
---
v1->v2:
* Added the location of ovs-ctl script

 Documentation/intro/install/dpdk.rst    |  3 ++-
 Documentation/intro/install/general.rst | 40 +++++++++++++++++++++++++++++----
 2 files changed, 38 insertions(+), 5 deletions(-)

Comments

Aaron Conole May 1, 2017, 5:51 p.m. UTC | #1
Ben Pfaff <blp@ovn.org> writes:

> On Mon, Apr 17, 2017 at 01:59:49PM -0400, Aaron Conole wrote:
>> The install documentation guided users to manually start/stop
>> daemons.  This is good information to have, but with the
>> existence of ovs-ctl, is probably not the best way to start
>> guiding new users of ovs.
>> 
>> Suggest that users start by running ovs-ctl start, and
>> document the ability to selectively start/stop the daemons.
>> The ovs-ctl script is already mentioned a bit in the install
>> doc, so this just reinforces its use.
>> 
>> Suggested-by: Ben Pfaff <blp@ovn.org>
>> Signed-off-by: Aaron Conole <aconole@redhat.com>
>> ---
>> v1->v2:
>> * Added the location of ovs-ctl script
>
> I had to fold the following in because of:

d'oh!  Sorry for that.

...

> and then I applied both of these to master.  Thank you!

Thanks, Ben.  You rock!
Ben Pfaff May 1, 2017, 6:05 p.m. UTC | #2
On Mon, May 01, 2017 at 01:51:35PM -0400, Aaron Conole wrote:
> Ben Pfaff <blp@ovn.org> writes:
> 
> > On Mon, Apr 17, 2017 at 01:59:49PM -0400, Aaron Conole wrote:
> >> The install documentation guided users to manually start/stop
> >> daemons.  This is good information to have, but with the
> >> existence of ovs-ctl, is probably not the best way to start
> >> guiding new users of ovs.
> >> 
> >> Suggest that users start by running ovs-ctl start, and
> >> document the ability to selectively start/stop the daemons.
> >> The ovs-ctl script is already mentioned a bit in the install
> >> doc, so this just reinforces its use.
> >> 
> >> Suggested-by: Ben Pfaff <blp@ovn.org>
> >> Signed-off-by: Aaron Conole <aconole@redhat.com>
> >> ---
> >> v1->v2:
> >> * Added the location of ovs-ctl script
> >
> > I had to fold the following in because of:
> 
> d'oh!  Sorry for that.
> 
> ...
> 
> > and then I applied both of these to master.  Thank you!
> 
> Thanks, Ben.  You rock!

Thanks!
diff mbox

Patch

diff --git a/Documentation/intro/install/dpdk.rst b/Documentation/intro/install/dpdk.rst
index b947bd5..7b90175 100644
--- a/Documentation/intro/install/dpdk.rst
+++ b/Documentation/intro/install/dpdk.rst
@@ -194,9 +194,10 @@  DPDK functionality. DPDK configuration arguments can be passed to ovs-vswitchd
 via the ``other_config`` column of the ``Open_vSwitch`` table. At a minimum,
 the ``dpdk-init`` option must be set to ``true``. For example::
 
+    $ export PATH=$PATH:/usr/local/share/openvswitch/scripts
     $ export DB_SOCK=/usr/local/var/run/openvswitch/db.sock
     $ ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-init=true
-    $ ovs-vswitchd unix:$DB_SOCK --pidfile --detach
+    $ ovs-ctl --no-ovsdb-server --db-sock="$DB_SOCK" start
 
 There are many other configuration options, the most important of which are
 listed below. Defaults will be provided for all values not explicitly set.
diff --git a/Documentation/intro/install/general.rst b/Documentation/intro/install/general.rst
index f2cd2b1..be1791f 100644
--- a/Documentation/intro/install/general.rst
+++ b/Documentation/intro/install/general.rst
@@ -422,10 +422,37 @@  Building
 Starting
 --------
 
-Before starting ovs-vswitchd itself, you need to start its configuration
-database, ovsdb-server. Each machine on which Open vSwitch is installed should
-run its own copy of ovsdb-server. Before ovsdb-server itself can be started,
-configure a database that it can use::
+On unix-alike systems, such as *BSD and Linux, starting the Open vSwitch
+suite of daemons is a simple process.  Open vSwitch includes a shell script,
+and helpers, called ovs-ctl which automates much of the tasks for starting
+and stopping ovsdb-server, and ovs-vswitchd.  After installation, the daemons
+can be started by using the ovs-ctl utility.  This will take care to setup
+initial conditions, and start the daemons in the correct order.  The ovs-ctl
+utility is located in '$(pkgdatadir)/scripts', and defaults to
+'/usr/local/share/openvswitch/scripts'.  An example after install might be::
+
+    $ export PATH=$PATH:/usr/local/share/openvswitch/scripts
+    $ ovs-ctl start
+
+Additionally, the ovs-ctl script allows starting / stopping the daemons
+individually using specific options.  To start just the ovsdb-server::
+
+    $ export PATH=$PATH:/usr/local/share/openvswitch/scripts
+    $ ovs-ctl --no-ovs-vswitchd start
+
+Likewise, to start just the ovs-vswitchd::
+
+    $ export PATH=$PATH:/usr/local/share/openvswitch/scripts
+    $ ovs-ctl --no-ovsdb-server start
+
+Refer to ovs-ctl(8) for more information on ovs-ctl.
+
+In addition to using the automated script to start Open vSwitch, you may
+wish to manually start the various daemons. Before starting ovs-vswitchd
+itself, you need to start its configuration database, ovsdb-server. Each
+machine on which Open vSwitch is installed should run its own copy of
+ovsdb-server. Before ovsdb-server itself can be started, configure a
+database that it can use::
 
        $ mkdir -p /usr/local/etc/openvswitch
        $ ovsdb-tool create /usr/local/etc/openvswitch/conf.db \
@@ -478,6 +505,11 @@  Upgrading
 When you upgrade Open vSwitch from one version to another you should also
 upgrade the database schema:
 
+.. note::
+   The following manual steps may also be accomplished by using ovs-ctl to
+   stop and start the daemons after upgrade.  The ovs-ctl script will
+   automatically upgrade the schema.
+
 1. Stop the Open vSwitch daemons, e.g.::
 
        $ kill `cd /usr/local/var/run/openvswitch && cat ovsdb-server.pid ovs-vswitchd.pid`