ovsdb-server: Add and remove databases during run time.
[sliver-openvswitch.git] / ovsdb / ovsdb-server.1.in
1 .\" -*- nroff -*-
2 .de IQ
3 .  br
4 .  ns
5 .  IP "\\$1"
6 ..
7 .TH ovsdb\-server 1 "@VERSION@" "Open vSwitch" "Open vSwitch Manual"
8 .\" This program's name:
9 .ds PN ovsdb\-server
10 .\" SSL peer program's name:
11 .ds SN ovsdb\-client
12 .
13 .SH NAME
14 ovsdb\-server \- Open vSwitch database server
15 .
16 .SH SYNOPSIS
17 \fBovsdb\-server\fR
18 [\fIdatabase\fR]\&...
19 [\fB\-\-remote=\fIremote\fR]\&...
20 [\fB\-\-run=\fIcommand\fR]
21 .so lib/daemon-syn.man
22 .so lib/vlog-syn.man
23 .so lib/ssl-syn.man
24 .so lib/ssl-bootstrap-syn.man
25 .so lib/unixctl-syn.man
26 .so lib/common-syn.man
27 .
28 .SH DESCRIPTION
29 The \fBovsdb\-server\fR program provides RPC interfaces to one or more
30 Open vSwitch databases (OVSDBs).  It supports JSON-RPC client
31 connections over active or passive TCP/IP or Unix domain sockets.
32 .PP
33 Each OVSDB file may be specified on the command line as \fIdatabase\fR.
34 If none is specified, the default is \fB@DBDIR@/conf.db\fR.  The database
35 files must already have been created and initialized using, for
36 example, \fBovsdb\-tool create\fR.
37 .
38 .SH OPTIONS
39 .
40 .IP "\fB\-\-remote=\fIremote\fR"
41 Adds \fIremote\fR as a connection method used by \fBovsdb\-server\fR.
42 \fIremote\fR must take one of the following forms:
43 .
44 .RS
45 .so ovsdb/remote-passive.man
46 .so ovsdb/remote-active.man
47 .
48 .IP "\fBdb:\fIdb\fB,\fItable\fB,\fIcolumn\fR"
49 Reads additional connection methods from \fIcolumn\fR in all of the
50 rows in \fItable\fR within \fIdb\fR.  As the contents of \fIcolumn\fR changes,
51 \fBovsdb\-server\fR also adds and drops connection methods accordingly.
52 .IP
53 If \fIcolumn\fR's type is string or set of strings, then the
54 connection methods are taken directly from the column.  The connection
55 methods in the column must have one of the forms described above.
56 .IP
57 If \fIcolumn\fR's type is UUID or set of UUIDs and references a table,
58 then each UUID is looked up in the referenced table to obtain a row.
59 The following columns in the row, if present and of the correct type,
60 configure a connection method.  Any additional columns are ignored.
61 .RS
62 .IP "\fBtarget\fR (string)"
63 Connection method, in one of the forms described above.  This column
64 is mandatory: if it is missing or empty then no connection method can
65 be configured.
66 .IP "\fBmax_backoff\fR (integer)"
67 Maximum number of milliseconds to wait between connection attempts.
68 .IP "\fBinactivity_probe\fR (integer)"
69 Maximum number of milliseconds of idle time on connection to
70 client before sending an inactivity probe message.
71 .RE
72 .IP
73 It is an error for \fIcolumn\fR to have another type.
74 .RE
75 .
76 .IP "\fB\-\-run=\fIcommand\fR]"
77 Ordinarily \fBovsdb\-server\fR runs forever, or until it is told to
78 exit (see \fBRUNTIME MANAGEMENT COMMANDS\fR below).  With this option,
79 \fBovsdb\-server\fR instead starts a shell subprocess running
80 \fIcommand\fR.  When the subprocess terminates, \fBovsdb\-server\fR
81 also exits gracefully.  If the subprocess exits normally with exit
82 code 0, then \fBovsdb\-server\fR exits with exit code 0 also;
83 otherwise, it exits with exit code 1.
84 .IP
85 This option can be useful where a database server is needed only to
86 run a single command, e.g.:
87 .B "ovsdb\-server \-\-remote=punix:socket \-\-run='ovsdb\-client dump unix:socket Open_vSwitch'"
88 .SS "Daemon Options"
89 .ds DD \
90 \fBovsdb\-server\fR detaches only after it starts listening on all \
91 configured remotes.
92 .so lib/daemon.man
93 .SS "Logging Options"
94 .so lib/vlog.man
95 .SS "Public Key Infrastructure Options"
96 The options described below for configuring the SSL public key
97 infrastructure accept a special syntax for obtaining their
98 configuration from the database.  If any of these options is given
99 \fBdb:\fIdb\fB,\fItable\fB,\fIcolumn\fR as its argument, then the
100 actual file name is read from the specified \fIcolumn\fR in \fItable\fR
101 within the \fIdb\fR database.  The \fIcolumn\fR must have type
102 string or set of strings.  The first nonempty string in the table is taken
103 as the file name.  (This means that ordinarily there should be at most
104 one row in \fItable\fR.)
105 .so lib/ssl.man
106 .so lib/ssl-bootstrap.man
107 .SS "Other Options"
108 .so lib/unixctl.man
109 .so lib/common.man
110 .SH "RUNTIME MANAGEMENT COMMANDS"
111 \fBovs\-appctl\fR(8) can send commands to a running
112 \fBovsdb\-server\fR process.  The currently supported commands are
113 described below.
114 .SS "OVSDB\-SERVER COMMANDS"
115 These commands are specific to \fBovsdb\-server\fR.
116 .IP "\fBexit\fR"
117 Causes \fBovsdb\-server\fR to gracefully terminate.
118 .IP "\fBovsdb\-server/compact\fR [\fIdb\fR]\&..."
119 Compacts each database \fIdb\fR in-place.  If no \fIdb\fR is
120 specified, compacts every database in-place.  Databases are also
121 automatically compacted occasionally.
122 .
123 .IP "\fBovsdb\-server/reconnect\fR"
124 Makes \fBovsdb\-server\fR drop all of the JSON\-RPC
125 connections to database clients and reconnect.
126 .IP
127 This command might be useful for debugging issues with database
128 clients.
129 .
130 .IP "\fBovsdb\-server/add\-remote \fIremote\fR"
131 Adds a remote, as if \fB\-\-remote=\fIremote\fR had been specified on
132 the \fBovsdb\-server\fR command line.  (If \fIremote\fR is already a
133 remote, this command succeeds without changing the configuration.)
134 .
135 .IP "\fBovsdb\-server/remove\-remote \fIremote\fR"
136 Removes the specified \fIremote\fR from the configuration, failing
137 with an error if \fIremote\fR is not configured as a remote.  This
138 command only works with remotes that were named on \fB\-\-remote\fR or
139 \fBovsdb\-server/add\-remote\fR, that is, it will not remove remotes
140 added indirectly because they were read from the database by
141 configuring a \fBdb:\fIdb\fB,\fItable\fB,\fIcolumn\fR remote.
142 (You can remove a database source with \fBovsdb\-server/remove\-remote
143 \fBdb:\fIdb\fB,\fItable\fB,\fIcolumn\fR, but not individual
144 remotes found indirectly through the database.)
145 .
146 .IP "\fBovsdb\-server/list\-remotes"
147 Outputs a list of the currently configured remotes named on
148 \fB\-\-remote\fR or \fBovsdb\-server/add\-remote\fR, that is, it does
149 not list remotes added indirectly because they were read from the
150 database by configuring a
151 \fBdb:\fIdb\fB,\fItable\fB,\fIcolumn\fR remote.
152 .
153 .IP "\fBovsdb\-server/add\-db \fIdatabase\fR"
154 Adds the \fIdatabase\fR to the running \fBovsdb\-server\fR.  The database
155 file must already have been created and initialized using, for example,
156 \fBovsdb\-tool create\fR.
157 .
158 .IP "\fBovsdb\-server/remove\-db \fIdatabase\fR"
159 Removes \fIdatabase\fR from the running \fBovsdb\-server\fR.  \fIdatabase\fR
160 must be a database name as listed by \fBovsdb-server/list\-dbs\fR.
161 .IP
162 If a remote has been configured that points to the specified
163 \fIdatabase\fR (e.g. \fB\-\-remote=db:\fIdatabase\fB,\fR... on the
164 command line), then it will be disabled until another database with
165 the same name is added again (with \fBovsdb\-server/add\-db\fR).
166 .IP
167 Any public key infrastructure options specified through this database
168 (e.g. \fB\-\-private\-key=db:\fIdatabase,\fR... on the command line)
169 will be disabled until another database with the same name is added
170 again (with \fBovsdb\-server/add\-db\fR).
171 .
172 .IP "\fBovsdb\-server/list\-dbs"
173 Outputs a list of the currently configured databases added either through
174 the command line or through the \fBovsdb\-server/add\-db\fR command.
175 .
176 .so lib/vlog-unixctl.man
177 .so lib/memory-unixctl.man
178 .so lib/coverage-unixctl.man
179 .so lib/stress-unixctl.man
180 .SH "SEE ALSO"
181 .
182 .BR ovsdb\-tool (1).