]> git.proxmox.com Git - mirror_ovs.git/blame - ovn/utilities/ovn-sbctl.8.in
ovn-trace: Fix selection of table that "next" jumps to.
[mirror_ovs.git] / ovn / utilities / ovn-sbctl.8.in
CommitLineData
fed00ab1
AW
1.\" -*- nroff -*-
2.de IQ
3. br
4. ns
5. IP "\\$1"
6..
7.de ST
8. PP
9. RS -0.15in
10. I "\\$1"
11. RE
12..
13.TH ovn\-sbctl 8 "@VERSION@" "Open vSwitch" "Open vSwitch Manual"
14.\" This program's name:
15.ds PN ovn\-sbctl
16.
17.SH NAME
18ovn\-sbctl \- utility for querying and configuring \fBOVN_Southbound\fR database
19.
20.SH SYNOPSIS
21\fBovn\-sbctl\fR [\fIoptions\fR] \fB\-\-\fR [\fIoptions\fR] \fIcommand
22\fR[\fIargs\fR] [\fB\-\-\fR [\fIoptions\fR] \fIcommand \fR[\fIargs\fR]]...
23.
24.SH DESCRIPTION
fed00ab1
AW
25The \fBovn\-sbctl\fR program configures the \fBOVN_Southbound\fR database
26by providing a high\-level interface to its configuration database. See
27\fBovn\-sb\fR(5) for comprehensive documentation of the database schema.
28.PP
29\fBovn\-sbctl\fR connects to an \fBovsdb\-server\fR process that
30maintains an OVN_Southbound configuration database. Using this
31connection, it queries and possibly applies changes to the database,
32depending on the supplied commands.
33.PP
34\fBovn\-sbctl\fR can perform any number of commands in a single run,
35implemented as a single atomic transaction against the database.
36.PP
37The \fBovn\-sbctl\fR command line begins with global options (see
38\fBOPTIONS\fR below for details). The global options are followed by
39one or more commands. Each command should begin with \fB\-\-\fR by
40itself as a command-line argument, to separate it from the following
41commands. (The \fB\-\-\fR before the first command is optional.) The
42command
43itself starts with command-specific options, if any, followed by the
44command name and any arguments.
45.
46.SH OPTIONS
47.
48The following options affect the behavior of \fBovn\-sbctl\fR as a
49whole. Some individual commands also accept their own options, which
50are given just before the command name. If the first command on the
51command line has options, then those options must be separated from
52the global options by \fB\-\-\fR.
53.
54.IP "\fB\-\-db=\fIserver\fR"
cce9c163
BP
55The OVSDB database remote to contact. If the \fBOVN_SB_DB\fR
56environment variable is set, its value is used as the default.
57Otherwise, the default is \fBunix:@RUNDIR@/db.sock\fR, but this
58default is unlikely to be useful outside of single-machine OVN test
59environments.
60.IP
61\fIserver\fR must take one of the following forms:
fed00ab1
AW
62.RS
63.so ovsdb/remote-active.man
64.so ovsdb/remote-passive.man
65.RE
66.
67.IP "\fB\-\-no\-syslog\fR"
68By default, \fBovn\-sbctl\fR logs its arguments and the details of any
69changes that it makes to the system log. This option disables this
70logging.
71.IP
72This option is equivalent to \fB\-\-verbose=sbctl:syslog:warn\fR.
73.
74.IP "\fB\-\-oneline\fR"
75Modifies the output format so that the output for each command is printed
76on a single line. New-line characters that would otherwise separate
77lines are printed as \fB\\n\fR, and any instances of \fB\\\fR that
78would otherwise appear in the output are doubled.
79Prints a blank line for each command that has no output.
80This option does not affect the formatting of output from the
81\fBlist\fR or \fBfind\fR commands; see \fBTable Formatting Options\fR
82below.
83.
84.IP "\fB\-\-dry\-run\fR"
85Prevents \fBovn\-sbctl\fR from actually modifying the database.
86.
87.IP "\fB\-t \fIsecs\fR"
88.IQ "\fB\-\-timeout=\fIsecs\fR"
89By default, or with a \fIsecs\fR of \fB0\fR, \fBovn\-sbctl\fR waits
90forever for a response from the database. This option limits runtime
91to approximately \fIsecs\fR seconds. If the timeout expires,
92\fBovn\-sbctl\fR will exit with a \fBSIGALRM\fR signal. (A timeout
93would normally happen only if the database cannot be contacted, or if
94the system is overloaded.)
95.
14bf7951
LR
96.so lib/vlog.man
97.so lib/common.man
98.
fed00ab1
AW
99.SS "Table Formatting Options"
100These options control the format of output from the \fBlist\fR and
101\fBfind\fR commands.
102.so lib/table.man
103.
10471820
LR
104.SS "Public Key Infrastructure Options"
105.so lib/ssl.man
106.so lib/ssl-bootstrap.man
107.so lib/ssl-peer-ca-cert.man
108.
fed00ab1
AW
109.SH COMMANDS
110The commands implemented by \fBovn\-sbctl\fR are described in the
111sections below.
112.SS "OVN_Southbound Commands"
113These commands work with an \fBOVN_Southbound\fR database as a whole.
114.
fa183acc
BP
115.IP "\fBinit\fR"
116Initializes the database, if it is empty. If the database has already
117been initialized, this command has no effect.
118.
fed00ab1
AW
119.IP "\fBshow\fR"
120Prints a brief overview of the database contents.
121.
122.SS "Chassis Commands"
123These commands manipulate \fBOVN_Southbound\fR chassis.
124.
7971b36c
BP
125.IP "[\fB\-\-may\-exist\fR] \fBchassis\-add \fIchassis\fR \fIencap-type\fR \fIencap-ip\fR"
126Creates a new chassis named \fIchassis\fR. \fIencap-type\fR is a
3c653533
JP
127comma-separated list of tunnel types. The chassis will have
128one encap entry for each specified tunnel type with \fIencap-ip\fR
129as the destination IP for each.
fed00ab1
AW
130.IP
131Without \fB\-\-may\-exist\fR, attempting to create a chassis that
132exists is an error. With \fB\-\-may\-exist\fR, this command does
5b9db326 133nothing if \fIchassis\fR already exists.
fed00ab1
AW
134.
135.IP "[\fB\-\-if\-exists\fR] \fBchassis\-del \fIchassis\fR"
136Deletes \fIchassis\fR and its \fIencaps\fR and \fIgateway_ports\fR.
137.IP
138Without \fB\-\-if\-exists\fR, attempting to delete a chassis that does
139not exist is an error. With \fB\-\-if\-exists\fR, attempting to
140delete a chassis that does not exist has no effect.
141.
142.SS "Port binding Commands"
143.
144These commands manipulate \fBOVN_Southbound\fR port bindings.
145.
7971b36c
BP
146.IP "[\fB\-\-may\-exist\fR] \fBlsp\-bind \fIlogical-port\fR \fIchassis\fR"
147Binds the logical port named \fIlogical-port\fR to \fIchassis\fR.
fed00ab1
AW
148.IP
149Without \fB\-\-may\-exist\fR, attempting to bind a logical port that
150has already been bound is an error. With \fB\-\-may\-exist\fR, this
7971b36c 151command does nothing if \fIlogical-port\fR has already been bound to
fed00ab1
AW
152a chassis.
153.
7971b36c
BP
154.IP "[\fB\-\-if\-exists\fR] \fBlsp\-unbind\fR \fIlogical-port\fR"
155Resets the binding of \fIlogical-port\fR to \fINULL\fR.
fed00ab1
AW
156.IP
157Without \fB\-\-if\-exists\fR, attempting to unbind a logical port
158that is not bound is an error. With \fB\-\-if\-exists\fR, attempting
159to unbind logical port that is not bound has no effect.
160.
dc70b67b
RB
161.SS "Logical Flow Commands"
162.
c80eac1f 163.IP "[\fB\-\-uuid\fR] \fBlflow\-list\fR [\fIlogical-datapath\fR] [\fIlflow\fR...]"
7971b36c 164List logical flows. If \fIlogical-datapath\fR is specified, only list
c80eac1f
BP
165flows for that logical datapath. The \fIlogical-datapath\fR may be
166given as a UUID or as a datapath name (reporting an error if multiple
167datapaths have the same name).
168.IP
169If at least one \fIlflow\fR is given, only matching logical flows, if
170any, are listed. Each \fIlflow\fR may be specified as a UUID or the
171first few characters of a UUID, optionally prefixed by \fB0x\fR.
172(Because \fBovn\-controller\fR sets OpenFlow flow cookies to the first
17332 bits of the corresponding logical flow's UUID, this makes it easy
174to look up the logical flow that generated a particular OpenFlow
175flow.)
176.IP
177If \fB\-\-uuid\fR is specified, the output includes the first 32 bits
178of each logical flow's UUID. This makes it easier to find the
179OpenFlow flows that correspond to a given logical flow.
dc70b67b 180.
c80eac1f 181.IP "[\fB\-\-uuid\fR] \fBdump\-flows\fR [\fIlogical-datapath\fR]"
dc70b67b
RB
182Alias for \fBlflow\-list\fB.
183.
10471820
LR
184.SS "Remote Connectivity Commands"
185.
186These commands manipulate the \fBconnections\fR column in the \fBSB_Global\fR
187table and rows in the \fBConnection\fR table. When \fBovsdb\-server\fR
188is configured to use the \fBconnections\fR column for OVSDB connections,
189this allows the administrator to use \fBovn\-sbctl\fR to configure database
190connections.
191.
192.IP "\fBget\-connection\fR"
193Prints the configured connection(s).
194.
195.IP "\fBdel\-connection\fR"
196Deletes the configured connection(s).
197.
198.IP "\fBset\-connection\fR [\fIaccess\-specifier\fR] \fItarget\fR\&..."
199Sets the configured manager target or targets. Each \fItarget\fR may
200be preceded by an optional access-specifier (\fBread\-only\fR or
201\fBread\-write\fR) and may use any of the following forms:
202.
203.RS
204.so ovsdb/remote-active.man
205.so ovsdb/remote-passive.man
206.RE
207
208If provided, the effect of the access specifier persists for subsequent
209targets until changed by another access specifier.
210.
211.SS "SSL Configuration"
212When \fBovsdb\-server\fR is configured to connect using SSL, the
213following parameters are required:
214.TP
215\fIprivate-key\fR
216Specifies a PEM file containing the private key used for SSL connections.
217.TP
218\fIcertificate\fR
219Specifies a PEM file containing a certificate, signed by the
220certificate authority (CA) used by the connection peers, that
221certifies the private key, identifying a trustworthy peer.
222.TP
223\fIca-cert\fR
224Specifies a PEM file containing the CA certificate used to verify that
225the connection peers are trustworthy.
226.PP
227These SSL settings apply to all SSL connections made by the southbound
228database server.
229.
230.IP "\fBget\-ssl\fR"
231Prints the SSL configuration.
232.
233.IP "\fBdel\-ssl\fR"
234Deletes the current SSL configuration.
235.
236.IP "[\fB\-\-bootstrap\fR] \fBset\-ssl\fR \fIprivate-key\fR \fIcertificate\fR \fIca-cert\fR"
237Sets the SSL configuration. The \fB\-\-bootstrap\fR option is described
238below.
239.
240.ST "CA Certificate Bootstrap"
241.PP
242Ordinarily, all of the files named in the SSL configuration must exist
243before SSL connectivity can be used. However, if the \fIca-cert\fR file
244does not exist and the \fB\-\-bootstrap\fR
245option is given, then \fBovsdb\-server\fR will attempt to obtain the
246CA certificate from the target on its first SSL connection and
247save it to the named PEM file. If it is successful, it will
248immediately drop the connection and reconnect, and from then on all
249SSL connections must be authenticated by a certificate signed by the
250CA certificate thus obtained.
251.PP
252\fBThis option exposes the SSL connection to a man-in-the-middle
253attack obtaining the initial CA certificate\fR, but it may be useful
254for bootstrapping.
255.PP
256This option is only useful if the SSL peer sends its CA certificate
257as part of the SSL certificate chain. The SSL protocol does not
258require the controller to send the CA certificate.
259.
fed00ab1
AW
260.so lib/db-ctl-base.man
261.SH "EXIT STATUS"
262.IP "0"
263Successful program execution.
264.IP "1"
265Usage, syntax, or configuration file error.
fed00ab1
AW
266.SH "SEE ALSO"
267.
268.BR ovn\-sb (5).