From 588e0ebc322a1e08579394d84934ad956a43dbc0 Mon Sep 17 00:00:00 2001 From: Aaron Conole Date: Mon, 17 Apr 2017 13:59:49 -0400 Subject: [PATCH] install-doc: suggest to use ovs-ctl for start/stop 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 Signed-off-by: Aaron Conole Signed-off-by: Ben Pfaff --- Documentation/intro/install/dpdk.rst | 3 +- Documentation/intro/install/general.rst | 40 ++++++++++++++++++++++--- 2 files changed, 38 insertions(+), 5 deletions(-) diff --git a/Documentation/intro/install/dpdk.rst b/Documentation/intro/install/dpdk.rst index d1c0e651e70..e83f852e205 100644 --- a/Documentation/intro/install/dpdk.rst +++ b/Documentation/intro/install/dpdk.rst @@ -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. diff --git a/Documentation/intro/install/general.rst b/Documentation/intro/install/general.rst index 1ea82b6ae70..e5ec155b94a 100644 --- a/Documentation/intro/install/general.rst +++ b/Documentation/intro/install/general.rst @@ -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 \ @@ -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`