2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-22 01:51:26 +00:00

ovs-brcompatd: Run ovs-vsctl instead of accessing database directly.

ovs-vsctl is carefully written to avoid races in database access.  It is
much simpler to just call it than to reimplement its capabilities.

This eliminates the requirement that bridges managed by ovs-brcompatd have
no ports at ovs-brcompatd startup time.  It also eliminates races between
competing brctl and ovs-vsctl processes.
This commit is contained in:
Ben Pfaff 2011-06-08 09:15:38 -07:00
parent e1f406a32b
commit 2b01925c18
3 changed files with 253 additions and 714 deletions

View File

@ -4,6 +4,7 @@ post v1.1.0
counters for each port.
- ovs-vsctl:
- New "show" command to print an overview of configuration.
- ovs-brcompatd has been rewritten to fix long-standing bugs.
- ovs-openflowd has been renamed test-openflowd and moved into the
tests directory. Its presence confused too many users. Please
use ovs-vswitchd instead.

View File

@ -6,7 +6,7 @@ ovs\-brcompatd \- Bridge compatibility front-end for ovs\-vswitchd
.
.SH SYNOPSIS
.B ovs\-brcompatd
[\fIoptions\fR] \fIdatabase\fR
[\fIoptions\fR]
.
.SH DESCRIPTION
A daemon that provides a legacy bridge front-end for \fBovs\-vswitchd\fR. It
@ -14,48 +14,32 @@ does this by listening for bridge ioctl commands (e.g., those generated by
the \fBbrctl\fR program) to add or remove datapaths and the interfaces
that attach to them.
.PP
The mandatory \fIdatabase\fR argument specifies the
\fBovsdb\-server\fR from which \fBovs\-vswitchd\fR's configuration is
retrieved. It should take the form \fBunix:\fIfile\fR, to connect to
the Unix domain server socket named \fIfile\fR.
.PP
.SH OPTIONS
.IP "\fB\-\-appctl\-command=\fIcommand\fR"
Sets the command that \fBovs\-brcompatd\fR runs to communicate with
\fBovs\-vswitchd\fR. The command is run in \fB/bin/sh\fR as a shell
command, so \fIcommand\fR may contain arbitrary shell metacharacters,
etc. The \fB\-\-help\fR option displays the default command.
.IP
\fIcommand\fR must contain exactly one instance of \fB%s\fR, which
\fBovs\-brcompatd\fR replaces by a command from the set understood by
\fBovs\-vswitchd\fR. Any instances of \fB%%\fR in \fIcommand\fR are
replaced by a single \fB%\fR. The \fB%\fR character may not otherwise
appear in \fIcommand\fR.
.IP
The commands that are substituted into \fIcommand\fR are those that
can be listed by passing \fBhelp\fR to \fBovs\-appctl\fR with
\fBovs\-vswitchd\fR as target.
.IP
\fIcommand\fR must not redirect \fBovs\-appctl\fR's standard output or
standard error streams, because \fBovs\-brcompatd\fR expects to read
both of these streams separately.
.IP "\fB\-\-appctl=\fIprogram\fR"
Sets the name to the program that \fBovs\-brcompatd\fR runs to
communicate with \fBovs\-vswitchd\fR. The default is
\fBovs\-appctl\fR. Unless \fIprogram\fR contains \fB/\fR,
\fBovs\-brcompatd\fR will search the \fBPATH\fR environment variable
to find it.
.
.IP "\fB\-\-vsctl=\fIprogram\fR"
Sets the name to the program that \fBovs\-brcompatd\fR runs to
communicate with \fBovsdb\-server\fR. The default is
\fBovs\-vsctl\fR. Unless \fIprogram\fR contains \fB/\fR,
\fBovs\-brcompatd\fR will search the \fBPATH\fR environment variable
to find it.
.
.so lib/daemon.man
.so lib/vlog.man
.so lib/common.man
.so lib/leak-checker.man
.
.SH BUGS
.
\fBovs\-brcompatd\fR requires the bridges that it manages to initially
have no ports listed in their database records when it starts up.
Otherwise, it may add duplicate ports to bridges.
.
.SH NOTES
\fBovs\-brcompatd\fR requires the \fBbrcompat_mod.ko\fR kernel module to be
loaded.
.SH "SEE ALSO"
.BR ovs\-appctl (8),
.BR ovs\-vsctl (8),
.BR ovs\-vswitchd (8),
.BR ovsdb\-server (1),
\fBINSTALL.bridge\fR in the Open vSwitch distribution.

File diff suppressed because it is too large Load Diff