7e68d68bf983950ab2417a588110d033afa36467
[cascardo/ovs.git] / ovn / utilities / ovn-sbctl.8.in
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
18 ovn\-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
25 The command should only be used for advanced debugging and troubleshooting
26 of the \fBOVN_Southbound\fR database; and should never be used in normal
27 operation.
28 .PP
29 The \fBovn\-sbctl\fR program configures the \fBOVN_Southbound\fR database
30 by providing a high\-level interface to its configuration database.  See
31 \fBovn\-sb\fR(5) for comprehensive documentation of the database schema.
32 .PP
33 \fBovn\-sbctl\fR connects to an \fBovsdb\-server\fR process that
34 maintains an OVN_Southbound configuration database.  Using this
35 connection, it queries and possibly applies changes to the database,
36 depending on the supplied commands.
37 .PP
38 \fBovn\-sbctl\fR can perform any number of commands in a single run,
39 implemented as a single atomic transaction against the database.
40 .PP
41 The \fBovn\-sbctl\fR command line begins with global options (see
42 \fBOPTIONS\fR below for details).  The global options are followed by
43 one or more commands.  Each command should begin with \fB\-\-\fR by
44 itself as a command-line argument, to separate it from the following
45 commands.  (The \fB\-\-\fR before the first command is optional.)  The
46 command
47 itself starts with command-specific options, if any, followed by the
48 command name and any arguments.
49 .
50 .SH OPTIONS
51 .
52 The following options affect the behavior of \fBovn\-sbctl\fR as a
53 whole.  Some individual commands also accept their own options, which
54 are given just before the command name.  If the first command on the
55 command line has options, then those options must be separated from
56 the global options by \fB\-\-\fR.
57 .
58 .IP "\fB\-\-db=\fIserver\fR"
59 Sets \fIserver\fR as the database server that \fBovn\-sbctl\fR
60 contacts to query or modify configuration.  The default is
61 \fBunix:@RUNDIR@/db.sock\fR.  \fIserver\fR must take one of the
62 following forms:
63 .RS
64 .so ovsdb/remote-active.man
65 .so ovsdb/remote-passive.man
66 .RE
67 .
68 .IP "\fB\-\-no\-syslog\fR"
69 By default, \fBovn\-sbctl\fR logs its arguments and the details of any
70 changes that it makes to the system log.  This option disables this
71 logging.
72 .IP
73 This option is equivalent to \fB\-\-verbose=sbctl:syslog:warn\fR.
74 .
75 .IP "\fB\-\-oneline\fR"
76 Modifies the output format so that the output for each command is printed
77 on a single line.  New-line characters that would otherwise separate
78 lines are printed as \fB\\n\fR, and any instances of \fB\\\fR that
79 would otherwise appear in the output are doubled.
80 Prints a blank line for each command that has no output.
81 This option does not affect the formatting of output from the
82 \fBlist\fR or \fBfind\fR commands; see \fBTable Formatting Options\fR
83 below.
84 .
85 .IP "\fB\-\-dry\-run\fR"
86 Prevents \fBovn\-sbctl\fR from actually modifying the database.
87 .
88 .IP "\fB\-t \fIsecs\fR"
89 .IQ "\fB\-\-timeout=\fIsecs\fR"
90 By default, or with a \fIsecs\fR of \fB0\fR, \fBovn\-sbctl\fR waits
91 forever for a response from the database.  This option limits runtime
92 to approximately \fIsecs\fR seconds.  If the timeout expires,
93 \fBovn\-sbctl\fR will exit with a \fBSIGALRM\fR signal.  (A timeout
94 would normally happen only if the database cannot be contacted, or if
95 the system is overloaded.)
96 .
97 .SS "Table Formatting Options"
98 These options control the format of output from the \fBlist\fR and
99 \fBfind\fR commands.
100 .so lib/table.man
101 .
102 .SH COMMANDS
103 The commands implemented by \fBovn\-sbctl\fR are described in the
104 sections below.
105 .SS "OVN_Southbound Commands"
106 These commands work with an \fBOVN_Southbound\fR database as a whole.
107 .
108 .IP "\fBshow\fR"
109 Prints a brief overview of the database contents.
110 .
111 .SS "Chassis Commands"
112 These commands manipulate \fBOVN_Southbound\fR chassis.
113 .
114 .IP "[\fB\-\-may\-exist\fR] \fBchassis\-add \fIchassis\fR \fIencap-type\fR \fIencap-ip\fR"
115 Creates a new chassis named \fIchassis\fR.  The chassis will have
116 one encap entry with \fIencap-type\fR as tunnel type and \fIencap-ip\fR
117 as destination ip.
118 .IP
119 Without \fB\-\-may\-exist\fR, attempting to create a chassis that
120 exists is an error.  With \fB\-\-may\-exist\fR, this command does
121 nothing if \fIchassis\fR already exists as a real bridge.
122 .
123 .IP "[\fB\-\-if\-exists\fR] \fBchassis\-del \fIchassis\fR"
124 Deletes \fIchassis\fR and its \fIencaps\fR and \fIgateway_ports\fR.
125 .IP
126 Without \fB\-\-if\-exists\fR, attempting to delete a chassis that does
127 not exist is an error.  With \fB\-\-if\-exists\fR, attempting to
128 delete a chassis that does not exist has no effect.
129 .
130 .SS "Port binding Commands"
131 .
132 These commands manipulate \fBOVN_Southbound\fR port bindings.
133 .
134 .IP "[\fB\-\-may\-exist\fR] \fBlport\-bind \fIlogical\-port\fR \fIchassis\fR"
135 Binds the logical port named \fIlogical\-port\fR to \fIchassis\fR.
136 .IP
137 Without \fB\-\-may\-exist\fR, attempting to bind a logical port that
138 has already been bound is an error.  With \fB\-\-may\-exist\fR, this
139 command does nothing if \fIlogical\-port\fR has already been bound to
140 a chassis.
141 .
142 .IP "[\fB\-\-if\-exists\fR] \fBlport\-unbind\fR \fIlogical\-port\fR"
143 Resets the binding of \fIlogical\-port\fR to \fINULL\fR.
144 .IP
145 Without \fB\-\-if\-exists\fR, attempting to unbind a logical port
146 that is not bound is an error.  With \fB\-\-if\-exists\fR, attempting
147 to unbind logical port that is not bound has no effect.
148 .
149 .SS "Logical Flow Commands"
150 .
151 .IP "\fBlflow\-list\fR [\fIlogical\-datapath\fR]"
152 List logical flows. If \fIlogical\-datapath\fR is specified, only list flows for
153 that logical datapath.
154 .
155 .IP "\fBdump\-flows\fR [\fIlogical\-datapath\fR]"
156 Alias for \fBlflow\-list\fB.
157 .
158 .so lib/db-ctl-base.man
159 .SH "EXIT STATUS"
160 .IP "0"
161 Successful program execution.
162 .IP "1"
163 Usage, syntax, or configuration file error.
164 .IP "2"
165 The \fIbridge\fR argument to \fBbr\-exists\fR specified the name of a
166 bridge that does not exist.
167 .SH "SEE ALSO"
168 .
169 .BR ovn\-sb (5).