Skip to content

Commit

Permalink
install-doc: suggest to use ovs-ctl for start/stop
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Aaron Conole <[email protected]>
Signed-off-by: Ben Pfaff <[email protected]>
  • Loading branch information
apconole authored and blp committed May 1, 2017
1 parent 8d34857 commit 588e0eb
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 5 deletions.
3 changes: 2 additions & 1 deletion Documentation/intro/install/dpdk.rst
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,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.
Expand Down
40 changes: 36 additions & 4 deletions Documentation/intro/install/general.rst
Original file line number Diff line number Diff line change
Expand Up @@ -423,10 +423,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 BSDs 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 \
Expand Down Expand Up @@ -479,6 +506,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`
Expand Down

0 comments on commit 588e0eb

Please sign in to comment.