database you created during step 7 of installation, above, and to
listen on a Unix domain socket, e.g.:
- % ovsdb-server /usr/local/etc/ovs-vswitchd.conf.db --remote=punix:/usr/local/var/run/ovsdb-server
+ % ovsdb-server /usr/local/etc/ovs-vswitchd.conf.db --remote=punix:/usr/local/var/run/openvswitch/db.sock
Then initialize the database with "ovs-vsctl init". This is only
necessary the first time after you create the database with
Then start the main Open vSwitch daemon, telling it to connect to the
same Unix domain socket:
- % ovs-vswitchd unix:/usr/local/var/run/ovsdb-server
+ % ovs-vswitchd unix:/usr/local/var/run/openvswitch/db.sock
Now you may use ovs-vsctl to set up bridges and other Open vSwitch
features. For example, to create a bridge named br0 and add ports
Once you have these files, configure ovs-vswitchd to use them using
the ovs-vsctl "set-ssl" command, e.g.:
- ovs-vsctl set-ssl /etc/vswitch/sc-privkey.pem /etc/vswitch/sc-cert.pem /etc/vswitch/cacert.pem
+ ovs-vsctl set-ssl /etc/openvswitch/sc-privkey.pem /etc/openvswitch/sc-cert.pem /etc/openvswitch/cacert.pem
Substitute the correct file names, of course, if they differ from the
ones used above. You should use absolute file names (ones that begin
OpenFlow") and you did not copy controllerca/cacert.pem from the PKI
machine to the Open vSwitch, then add the --bootstrap option, e.g.:
- ovs-vsctl -- --bootstrap set-ssl /etc/vswitch/sc-privkey.pem /etc/vswitch/sc-cert.pem /etc/vswitch/cacert.pem
+ ovs-vsctl -- --bootstrap set-ssl /etc/openvswitch/sc-privkey.pem /etc/openvswitch/sc-cert.pem /etc/openvswitch/cacert.pem
After you have added all of these configuration keys, you may specify
"ssl:" connection methods elsewhere in the configuration database.
cd /tmp
tar xfz /usr/src/redhat/SOURCES/openvswitch-$VERSION.tar.gz
rpmbuild \
- -D "vswitch_version $VERSION" \
+ -D "openvswitch_version $VERSION" \
-D "xen_version $XENKERNEL" \
- -bb openvswitch-$VERSION/xenserver/vswitch-xen.spec
+ -bb openvswitch-$VERSION/xenserver/openvswitch-xen.spec
where:
It always ends in "xen".
Two RPMs will be output into /usr/src/redhat/RPMS, whose names begin
-with "vswitch" and "vswitch-debuginfo".
+with "openvswitch" and "openvswitch-debuginfo".
Installing Open vSwitch for XenServer
-------------------------------------
To install Open vSwitch on a XenServer host, or to upgrade to a newer
-version, copy the "vswitch" RPM to that host with "scp", then install
+version, copy the "openvswitch" RPM to that host with "scp", then install
it with "rpm -U", e.g.:
- scp vswitch-$VERSION-1.i386.rpm root@<host>:
+ scp openvswitch-$VERSION-1.i386.rpm root@<host>:
(At this point you will have to enter <host>'s root password.)
ssh root@<host>
(At this point you will have to enter <host>'s root password again.)
- rpm -U vswitch-$VERSION-1.i386.rpm
+ rpm -U openvswitch-$VERSION-1.i386.rpm
To uninstall Open vSwitch from a XenServer host, remove the package:
ssh root@<host>
(At this point you will have to enter <host>'s root password again.)
- rpm -e vswitch
+ rpm -e openvswitch
After installing or uninstalling Open vSwitch, the XenServer should be
rebooted as soon as possible.
3. Start ovs-brcompatd:
% ovs-brcompatd --pidfile --detach -vANY:console:EMER \
- unix:/usr/local/var/run/ovsdb-server
+ unix:/usr/local/var/run/openvswitch/db.sock
(ovsdb-server and ovs-vswitchd should already have been loaded.)
fi
# Create an empty configuration database if it doesn't exist.
- if test ! -e /etc/openvswitch-switch/conf; then
+ if test ! -e /etc/openvswitch/conf.db; then
# Create configuration database.
ovsdb-tool -vANY:console:emer \
create /etc/openvswitch-switch/conf \
#define DIRS_H 1
extern const char ovs_pkgdatadir[]; /* /usr/local/share/openvswitch */
-extern const char ovs_rundir[]; /* /usr/local/var/run */
-extern const char ovs_logdir[]; /* /usr/local/var/log */
+extern const char ovs_rundir[]; /* /usr/local/var/run/openvswitch */
+extern const char ovs_logdir[]; /* /usr/local/var/log/openvswitch */
extern const char ovs_bindir[]; /* /usr/local/bin */
#endif /* dirs.h */
\f
/* Connects to a Vlog server socket. 'path' should be the name of a Vlog
* server socket. If it does not start with '/', it will be prefixed with
- * ovs_rundir (e.g. /var/run).
+ * ovs_rundir (e.g. /var/run/openvswitch).
*
* Returns 0 if successful, otherwise a positive errno value. If successful,
* sets '*clientp' to the new unixctl_client, otherwise to NULL. */
[AC_ARG_WITH(
[rundir],
AC_HELP_STRING([--with-rundir=DIR],
- [directory used for pidfiles [[LOCALSTATEDIR/run]]]),
+ [directory used for pidfiles
+ [[LOCALSTATEDIR/run/openvswitch]]]),
[RUNDIR=$withval],
- [RUNDIR='${localstatedir}/run'])
+ [RUNDIR='${localstatedir}/run/openvswitch'])
AC_SUBST([RUNDIR])])
dnl Checks for the directory in which to store logs.
.IP "\fB\-\-db=\fIserver\fR"
Sets \fIserver\fR as the database server that \fBovs\-vsctl\fR
contacts to query or modify configuration. The default is
-\fBunix:@RUNDIR@/ovsdb\-server\fR. \fIserver\fR must take one of the
+\fBunix:@RUNDIR@/db.sock\fR. \fIserver\fR must take one of the
following forms:
.RS
.so ovsdb/remote-active.man
{
static char *def;
if (!def) {
- def = xasprintf("unix:%s/ovsdb-server", ovs_rundir);
+ def = xasprintf("unix:%s/db.sock", ovs_rundir);
}
return def;
}
-This directory contains files for seamless integration of vswitch on
+This directory contains files for seamless integration of Open vSwitch on
Citrix XenServer hosts managed by the Citrix management tools.
Some of these files are modifications of Citrix's proprietary code.
under the same name, if underscores are replaced by slashes. The
files are:
- etc_init.d_vswitch
+ etc_init.d_openvswitch
- Initializes the vswitch at boot and shuts it down at shutdown.
+ Initializes Open vSwitch at boot and shuts it down at shutdown.
- etc_init.d_vswitch-xapi-update
+ etc_init.d_openvswitch-xapi-update
- Init script to ensure vswitch-cfg-update is called for the
+ Init script to ensure openvswitch-cfg-update is called for the
current host at boot.
- etc_logrotate.d_vswitch
+ etc_logrotate.d_openvswitch
- Ensures that /var/log/ovs-vswitchd.log is rotated periodically
- and that ovs-vswitchd reopens its log file at that point.
+ Ensures that logs in /var/log/openvswitch are rotated
+ periodically and that appropriate daemons reopen their log
+ files at that point.
- etc_profile.d_vswitch.sh
+ etc_profile.d_openvswitch.sh
- vswitch-related shell functions for the administrator's
+ Open vSwitch-related shell functions for the administrator's
convenience.
- etc_xapi.d_plugins_vswitch-cfg-update
+ etc_xapi.d_plugins_openvswitch-cfg-update
xapi plugin script to update the cache of configuration items
- in the ovs-vswitchd configuration file that are managed in the
+ in the ovs-vswitchd configuration that are managed in the
xapi database when integrated with Citrix management tools.
etc_xensource_scripts_vif
- vswitch-aware replacement for Citrix script of the same name.
+ Open vSwitch-aware replacement for Citrix script of the same name.
+
+ openvswitch-xen.spec
+
+ spec file for building RPMs to install on a XenServer host.
opt_xensource_libexec_interface-reconfigure
- vswitch-aware replacement for Citrix script of the same name.
+ Open vSwitch-aware replacement for Citrix script of the same name.
- usr_share_vswitch_scripts_refresh-network-uuids
+ usr_share_openvswitch_scripts_refresh-network-uuids
Script to refresh bridge.<bridge>.network-uuids keys, which
can get out-of-sync following a pool join. Running this script
is an alternative to rebooting the host.
- root_vswitch_scripts_sysconfig.template
+ usr_share_openvswitch_scripts_sysconfig.template
- Template for vswitch's /etc/sysconfig/vswitch configuration
- file.
+ Template for Open vSwitch's /etc/sysconfig/openvswitch
+ configuration file.
usr_lib_xsconsole_plugins-base_XSFeatureVSwitch.py
xsconsole plugin to configure the pool-wide configuration keys
- used to control vswitch when integrated with Citrix management
- tools.
+ used to control Open vSwitch when integrated with Citrix
+ management tools.
usr_sbin_brctl
usr_sbin_xen-bugtool
- vswitch-aware replacement for Citrix script of the same name.
-
- vswitch-xen.spec
-
- spec file for building RPMs to install on a XenServer host.
+ Open vSwitch-aware replacement for Citrix script of the same name.
-To install, build the vswitch RPM with a command like this:
+To install, build the Open vSwitch RPM with a command like this:
- rpmbuild -D "vswitch_version $full_version" \
+ rpmbuild -D "openvswitch_version $full_version" \
-D "xen_version $XENKERNEL" \
-D "build_number --with-build-number=$buildnr" \
- -bb vswitch-xen.spec
+ -bb openvswitch-xen.spec
-Then, "rpm -U" the resulting vswitch package on the XenServer hosts in
-question and reboot them. (The vswitch-dbg package that is also
+Then, "rpm -U" the resulting Open vSwitch package on the XenServer hosts in
+question and reboot them. (The openvswitch-dbg package that is also
produced need not be installed, but it is harmless to do so.)
----------------------------------------------------------------------
-Copyright (C) 2009 Nicira Networks, Inc.
+Copyright (C) 2009, 2010 Nicira Networks, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
xenserver/LICENSE \
xenserver/README \
xenserver/automake.mk \
- xenserver/etc_init.d_vswitch \
- xenserver/etc_init.d_vswitch-xapi-update \
- xenserver/etc_logrotate.d_vswitch \
- xenserver/etc_profile.d_vswitch.sh \
- xenserver/etc_xapi.d_plugins_vswitch-cfg-update \
+ xenserver/etc_init.d_openvswitch \
+ xenserver/etc_init.d_openvswitch-xapi-update \
+ xenserver/etc_logrotate.d_openvswitch \
+ xenserver/etc_profile.d_openvswitch.sh \
+ xenserver/etc_xapi.d_plugins_openvswitch-cfg-update \
xenserver/etc_xensource_scripts_vif \
+ xenserver/openvswitch-xen.spec \
xenserver/opt_xensource_libexec_InterfaceReconfigure.py \
xenserver/opt_xensource_libexec_InterfaceReconfigureBridge.py \
xenserver/opt_xensource_libexec_InterfaceReconfigureVswitch.py \
xenserver/usr_lib_xsconsole_plugins-base_XSFeatureVSwitch.py \
xenserver/usr_sbin_brctl \
xenserver/usr_sbin_xen-bugtool \
- xenserver/usr_share_vswitch_scripts_refresh-network-uuids \
- xenserver/usr_share_vswitch_scripts_sysconfig.template \
- xenserver/vswitch-xen.spec
+ xenserver/usr_share_openvswitch_scripts_refresh-network-uuids \
+ xenserver/usr_share_openvswitch_scripts_sysconfig.template
#!/bin/bash
#
-# vswitch
+# openvswitch
#
# chkconfig: 2345 09 91
-# description: Manage vswitch kernel modules and user-space daemon
+# description: Manage Open vSwitch kernel modules and user-space daemons
# Copyright (C) 2009, 2010 Nicira Networks, Inc.
#
. /etc/init.d/functions
-test -e /etc/sysconfig/vswitch && . /etc/sysconfig/vswitch
+test -e /etc/sysconfig/openvswitch && . /etc/sysconfig/openvswitch
-# General config variables in /etc/sysconfig/vswitch
+# General config variables in /etc/sysconfig/openvswitch
: ${ENABLE_BRCOMPAT:=y}
: ${ENABLE_FAKE_PROC_NET:=y}
: ${ENABLE_MONITOR:=y}
: ${FORCE_COREFILES:=y}
# Config variables specific to ovsdb-server
-: ${OVSDB_SERVER_REMOTES:=punix:/var/run/ovsdb-server db:Open_vSwitch,managers}
-: ${OVSDB_SERVER_DB:=/etc/ovs-vswitchd.conf.db}
-: ${OVSDB_SERVER_PIDFILE:=/var/run/ovsdb-server.pid}
-: ${OVSDB_SERVER_RUN_DIR:=/var/xen/vswitch}
+: ${OVSDB_SERVER_REMOTES:=punix:/var/run/openvswitch/db.sock db:Open_vSwitch,managers}
+: ${OVSDB_SERVER_DB:=/etc/openvswitch/conf.db}
+: ${OVSDB_SERVER_PIDFILE:=/var/run/openvswitch/ovsdb-server.pid}
+: ${OVSDB_SERVER_RUN_DIR:=/var/xen/openvswitch}
: ${OVSDB_SERVER_PRIORITY:=-10}
-: ${OVSDB_SERVER_LOGFILE:=/var/log/ovsdb-server.log}
+: ${OVSDB_SERVER_LOGFILE:=/var/log/openvswitch/ovsdb-server.log}
: ${OVSDB_SERVER_FILE_LOGLEVEL:=INFO}
: ${OVSDB_SERVER_SYSLOG_LOGLEVEL:=ERR}
: ${OVSDB_SERVER_MEMLEAK_LOGFILE:=}
: ${OVSDB_SERVER_VALGRIND_OPT:=}
# Config variables specific to ovs-vswitchd
-: ${VSWITCHD_OVSDB_SERVER:=unix:/var/run/ovsdb-server}
-: ${VSWITCHD_OVSDB_SCHEMA:=/usr/share/vswitch/vswitch.ovsschema}
-: ${VSWITCHD_PIDFILE:=/var/run/ovs-vswitchd.pid}
-: ${VSWITCHD_RUN_DIR:=/var/xen/vswitch}
+: ${VSWITCHD_OVSDB_SERVER:=unix:/var/run/openvswitch/db.sock}
+: ${VSWITCHD_OVSDB_SCHEMA:=/usr/share/openvswitch/vswitch.ovsschema}
+: ${VSWITCHD_PIDFILE:=/var/run/openvswitch/ovs-vswitchd.pid}
+: ${VSWITCHD_RUN_DIR:=/var/xen/openvswitch}
: ${VSWITCHD_PRIORITY:=-10}
: ${VSWITCHD_MLOCKALL:=yes}
-: ${VSWITCHD_LOGFILE:=/var/log/ovs-vswitchd.log}
+: ${VSWITCHD_LOGFILE:=/var/log/openvswitch/ovs-vswitchd.log}
: ${VSWITCHD_FILE_LOGLEVEL:=INFO}
: ${VSWITCHD_SYSLOG_LOGLEVEL:=ERR}
: ${VSWITCHD_MEMLEAK_LOGFILE:=}
: ${VSWITCHD_VALGRIND_OPT:=}
# Config variables specific to ovs-brcompatd
-: ${BRCOMPATD_PIDFILE:=/var/run/ovs-brcompatd.pid}
-: ${BRCOMPATD_RUN_DIR:=/var/xen/vswitch}
+: ${BRCOMPATD_PIDFILE:=/var/run/openvswitch/ovs-brcompatd.pid}
+: ${BRCOMPATD_RUN_DIR:=/var/xen/openvswitch}
: ${BRCOMPATD_PRIORITY:=-10}
-: ${BRCOMPATD_LOGFILE:=/var/log/ovs-brcompatd.log}
+: ${BRCOMPATD_LOGFILE:=/var/log/openvswitch/ovs-brcompatd.log}
: ${BRCOMPATD_FILE_LOGLEVEL:=INFO}
: ${BRCOMPATD_SYSLOG_LOGLEVEL:=ERR}
: ${BRCOMPATD_MEMLEAK_LOGFILE:=}
if [ -n "$BRCOMPATD_PIDFILE" ] && ! lsmod | grep -q "brcompat_mod"; then
action "Inserting brcompat module" modprobe brcompat_mod
fi
- if [ -f "/lib/modules/`uname -r`/kernel/net/vswitch/ip_gre_mod.ko" ] && ! lsmod | grep -q "ip_gre_mod"; then
+ if [ -f "/lib/modules/`uname -r`/kernel/net/openvswitch/ip_gre_mod.ko" ] && ! lsmod | grep -q "ip_gre_mod"; then
action "Inserting ip_gre module" modprobe ip_gre_mod
fi
}
local logfile_file_opt=""
local logfile_level_opt=""
if [ ! -d "$OVSDB_SERVER_RUN_DIR" ]; then
- mkdir -p "$OVSDB_SERVER_RUN_DIR"
+ install -d -m 755 -o root -g root "$OVSDB_SERVER_RUN_DIR"
fi
cd "$OVSDB_SERVER_RUN_DIR"
local remotes=
for remote in $OVSDB_SERVER_REMOTES; do
remotes="$remotes --remote=$remote"
done
+
+ install -d -m 755 -o root -g root `dirname $OVSDB_SERVER_LOGFILE`
if [ -n "$OVSDB_SERVER_FILE_LOGLEVEL" ]; then
logfile_level_opt="-vANY:FILE:${OVSDB_SERVER_FILE_LOGLEVEL}"
logfile_file_opt="--log-file=$OVSDB_SERVER_LOGFILE"
fi
+
local leak_opt=""
if [ -n "$OVSDB_SERVER_MEMLEAK_LOGFILE" ]; then
leak_opt="--check-leaks=$OVSDB_SERVER_MEMLEAK_LOGFILE"
daemonize="n"
fi
ssl_opts="--private-key=db:SSL,private_key --certificate=db:SSL,certificate --bootstrap-ca-cert=db:SSL,ca_cert"
+ install -d -m 755 -o root -g root `dirname $OVSDB_SERVER_PIDFILE`
if [ "$daemonize" != "y" ]; then
# Start in background and force a "success" message
action "Starting ovsdb_server ($strace_opt$valgrind_opt)" true
local logfile_file_opt=""
local logfile_level_opt=""
if [ ! -d "$VSWITCHD_RUN_DIR" ]; then
- mkdir -p "$VSWITCHD_RUN_DIR"
+ install -d -m 755 -o root -g root "$VSWITCHD_RUN_DIR"
fi
cd "$VSWITCHD_RUN_DIR"
+
+ install -d -m 755 -o root -g root `dirname $VSWITCHD_LOGFILE`
if [ -n "$VSWITCHD_FILE_LOGLEVEL" ]; then
logfile_level_opt="-vANY:FILE:${VSWITCHD_FILE_LOGLEVEL}"
logfile_file_opt="--log-file=$VSWITCHD_LOGFILE"
fi
+
local leak_opt=""
if [ -n "$VSWITCHD_MEMLEAK_LOGFILE" ]; then
leak_opt="--check-leaks=$VSWITCHD_MEMLEAK_LOGFILE"
if [ "$VSWITCHD_MLOCKALL" != "no" ]; then
mlockall_opt="--mlockall"
fi
+
+ install -d -m 755 -o root -g root `dirname $VSWITCHD_PIDFILE`
if [ "$daemonize" != "y" ]; then
# Start in background and force a "success" message
action "Starting ovs-vswitchd ($strace_opt$valgrind_opt)" true
local logfile_file_opt=""
local logfile_level_opt=""
if [ -d "$BRCOMPATD_RUN_DIR" ]; then
- mkdir -p "$BRCOMPATD_RUN_DIR"
+ install -d -m 755 -o root -g root "$BRCOMPATD_RUN_DIR"
fi
cd "$BRCOMPATD_RUN_DIR"
+
+ install -d -m 755 -o root -g root `dirname $BRCOMPATD_LOGFILE`
if [ -n "$BRCOMPATD_FILE_LOGLEVEL" ]; then
logfile_level_opt="-vANY:FILE:${BRCOMPATD_FILE_LOGLEVEL}"
logfile_file_opt="--log-file=$BRCOMPATD_LOGFILE"
fi
+
local leak_opt=""
if [ -n "$BRCOMPATD_MEMLEAK_LOGFILE" ]; then
leak_opt="--check-leaks=$BRCOMPATD_MEMLEAK_LOGFILE"
valgrind_opt="valgrind --log-file=$BRCOMPATD_VALGRIND_LOG $BRCOMPATD_VALGRIND_OPT"
daemonize="n"
fi
- appctl_cmd="$appctl --target=/var/run/ovs-vswitchd.\`cat $VSWITCHD_PIDFILE\`.ctl %s"
+ appctl_cmd="$appctl --target=/var/run/openvswitch/ovs-vswitchd.\`cat $VSWITCHD_PIDFILE\`.ctl %s"
+
+ install -d -m 755 -o root -g root `dirname $BRCOMPATD_PIDFILE`
if [ "$daemonize" != "y" ]; then
# Start in background and force a "success" message
action "Starting ovs-brcompatd ($strace_opt$valgrind_opt)" true
WARNING!!!
-Restarting vswitch on a live server is not guaranteed to work. It is
+Restarting Open vSwitch on a live server is not guaranteed to work. It is
provided as a convenience for those situations in which it does work.
EOF
if [ ! -e "$OVSDB_SERVER_DB" ]; then
warning "$OVSDB_SERVER_DB does not exist"
+ install -d -m 755 -o root -g root `dirname $OVSDB_SERVER_DB`
action "Creating empty database $OVSDB_SERVER_DB" true
$ovsdb_tool -vANY:console:emer create "$OVSDB_SERVER_DB" "$VSWITCHD_OVSDB_SCHEMA"
start_ovsdb_server
$vsctl --no-wait init
- if [ ! -e /var/run/vswitch.booted ]; then
- touch /var/run/vswitch.booted
+ if [ ! -e /var/run/openvswitch.booted ]; then
+ touch /var/run/openvswitch.booted
for bridge in $($vsctl list-br); do
$vsctl --no-wait del-br $bridge
done
start_vswitchd
start_brcompatd
- touch /var/lock/subsys/vswitch
+ touch /var/lock/subsys/openvswitch
}
function stop {
stop_brcompatd
stop_vswitchd
stop_ovsdb_server
- rm -f /var/lock/subsys/vswitch
+ rm -f /var/lock/subsys/openvswitch
}
function restart {
/usr/sbin/ovs-brcompatd -V
;;
help)
- printf "vswitch [start|stop|restart|unload|status|version]\n"
+ printf "openvswitch [start|stop|restart|unload|status|version]\n"
;;
*)
printf "Unknown command: $1\n"
-# Copyright (C) 2009 Nicira Networks, Inc.
+# Copyright (C) 2009, 2010 Nicira Networks, Inc.
#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved. This file is offered as-is,
# without warranty of any kind.
-/var/log/ovs-vswitchd.log /var/log/ovs-brcompatd.log {
+/var/log/openvswitch/* {
sharedscripts
postrotate
- # Tell ovs-vswitchd and ovs-brcompatd to reopen their log files
+ # Tell Open vSwitch daemons to reopen their log files
/usr/bin/ovs-appctl -t ovs-vswitchd vlog/reopen
/usr/bin/ovs-appctl -t ovs-brcompatd vlog/reopen
/usr/bin/ovs-appctl -t ovsdb-server vlog/reopen
# notice and this notice are preserved. This file is offered as-is,
# without warranty of any kind.
-alias vswitch='service vswitch'
+alias vswitch='service openvswitch'
+alias openvswitch='service openvswitch'
function watchdp {
watch ovs-dpctl show "$@"
done
grep="$grep'"
fi
- cmd="tail -F /var/log/messages /var/log/ovs-vswitchd.log /var/log/xensource.log $grep | tee /var/log/monitorlogs.out"
+ cmd="tail -F /var/log/messages /var/log/openvswitch/ovs-vswitchd.log /var/log/openvswitch/ovs-brcompatd.log /var/log/openvswitch/ovsdb-server /var/log/xensource.log $grep | tee /var/log/monitorlogs.out"
printf "cmd: $cmd\n"
eval "$cmd"
}
#!/usr/bin/env python
#
# xapi plugin script to update the cache of configuration items in the
-# ovs-vswitchd configuration file that are managed in the xapi database
-# when integrated with Citrix management tools.
+# ovs-vswitchd configuration that are managed in the xapi database when
+# integrated with Citrix management tools.
# Copyright (C) 2009, 2010 Nicira Networks, Inc.
#
import subprocess
vsctl="/usr/bin/ovs-vsctl"
-cacert_filename="/etc/ovs-vswitchd.cacert"
+cacert_filename="/etc/openvswitch/vswitchd.cacert"
# Delete the CA certificate, so that we go back to boot-strapping mode
def delete_cacert():
"--", "del-ssl",
"--", "--bootstrap", "set-ssl",
"/etc/xensource/xapi-ssl.pem",
- "/etc/xensource/xapi-ssl.pem",
- "/etc/ovs-vswitchd.cacert",
+ cacert_filename,
"--", "set", "Open_vSwitch", ".",
'managers="ssl:' + controller + ':6632"'])
esac
;;
vswitch)
- logger -t script-vif "${dev}: Promiscuous ports are not supported via vSwitch."
+ logger -t script-vif "${dev}: Promiscuous ports are not supported via Open vSwitch."
;;
esac
fi
-# Spec file for vswitch and related programs.
+# Spec file for Open vSwitch.
# Copyright (C) 2009, 2010 Nicira Networks, Inc.
#
# without warranty of any kind.
# When building, the rpmbuild command line should define
-# vswitch_version, xen_version, and build_number using -D arguments.
+# openvswitch_version, xen_version, and build_number using -D arguments.
# for example:
#
-# rpmbuild -D "vswitch_version 0.8.9~1+build123" -D "xen_version 2.6.18-128.1.1.el5.xs5.1.0.483.1000xen" -D "build_number --with-build-number=123" -bb /usr/src/redhat/SPECS/vswitch-xen.spec
+# rpmbuild -D "openvswitch_version 0.8.9~1+build123" -D "xen_version 2.6.18-128.1.1.el5.xs5.1.0.483.1000xen" -D "build_number --with-build-number=123" -bb /usr/src/redhat/SPECS/openvswitch-xen.spec
#
-%define version %{vswitch_version}-%{xen_version}
+%define version %{openvswitch_version}-%{xen_version}
-Name: vswitch
+Name: openvswitch
Summary: Virtual switch
Group: System Environment/Daemons
URL: http://www.openvswitch.org/
Vendor: Nicira Networks, Inc.
-Version: %{vswitch_version}
+Version: %{openvswitch_version}
# The entire source code is ASL 2.0 except datapath/ which is GPLv2
License: ASL 2.0 and GPLv2
Release: 1
-Source: openvswitch-%{vswitch_version}.tar.gz
-Buildroot: /tmp/vswitch-xen-rpm
+Source: openvswitch-%{openvswitch_version}.tar.gz
+Buildroot: /tmp/openvswitch-xen-rpm
Requires: kernel-xen = %(echo '%{xen_version}' | sed 's/xen$//')
-# The following Conflicts prevents the "vswitch" package generated by
-# this spec file from installing at the same time as the "openvswitch"
-# package shipped with XenServer 5.5.900. In fact, the packages
-# contain some files with identical names anyhow, so they will not
-# coexist, but adding an explicit Conflicts makes this conflict more
-# obvious.
-Conflicts: openvswitch
%description
-The vswitch provides standard network bridging functions augmented with
+Open vSwitch provides standard network bridging functions augmented with
support for the OpenFlow protocol for remote per-flow control of
traffic.
%prep
-%setup -q -n openvswitch-%{vswitch_version}
+%setup -q -n openvswitch-%{openvswitch_version}
%build
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=%{_localstatedir} --with-l26=/lib/modules/%{xen_version}/build --enable-ssl %{build_number}
make install DESTDIR=$RPM_BUILD_ROOT
install -d -m 755 $RPM_BUILD_ROOT/etc
install -d -m 755 $RPM_BUILD_ROOT/etc/init.d
-install -m 755 xenserver/etc_init.d_vswitch \
- $RPM_BUILD_ROOT/etc/init.d/vswitch
-install -m 755 xenserver/etc_init.d_vswitch-xapi-update \
- $RPM_BUILD_ROOT/etc/init.d/vswitch-xapi-update
+install -m 755 xenserver/etc_init.d_openvswitch \
+ $RPM_BUILD_ROOT/etc/init.d/openvswitch
+install -m 755 xenserver/etc_init.d_openvswitch-xapi-update \
+ $RPM_BUILD_ROOT/etc/init.d/openvswitch-xapi-update
install -d -m 755 $RPM_BUILD_ROOT/etc/sysconfig
install -d -m 755 $RPM_BUILD_ROOT/etc/logrotate.d
-install -m 755 xenserver/etc_logrotate.d_vswitch \
- $RPM_BUILD_ROOT/etc/logrotate.d/vswitch
+install -m 755 xenserver/etc_logrotate.d_openvswitch \
+ $RPM_BUILD_ROOT/etc/logrotate.d/openvswitch
install -d -m 755 $RPM_BUILD_ROOT/etc/profile.d
-install -m 755 xenserver/etc_profile.d_vswitch.sh \
- $RPM_BUILD_ROOT/etc/profile.d/vswitch.sh
+install -m 755 xenserver/etc_profile.d_openvswitch.sh \
+ $RPM_BUILD_ROOT/etc/profile.d/openvswitch.sh
install -d -m 755 $RPM_BUILD_ROOT/etc/xapi.d/plugins
-install -m 755 xenserver/etc_xapi.d_plugins_vswitch-cfg-update \
- $RPM_BUILD_ROOT/etc/xapi.d/plugins/vswitch-cfg-update
-install -d -m 755 $RPM_BUILD_ROOT/usr/share/vswitch/scripts
+install -m 755 xenserver/etc_xapi.d_plugins_openvswitch-cfg-update \
+ $RPM_BUILD_ROOT/etc/xapi.d/plugins/openvswitch-cfg-update
+install -d -m 755 $RPM_BUILD_ROOT/usr/share/openvswitch/scripts
install -m 644 vswitchd/vswitch.ovsschema \
- $RPM_BUILD_ROOT/usr/share/vswitch/vswitch.ovsschema
+ $RPM_BUILD_ROOT/usr/share/openvswitch/vswitch.ovsschema
install -m 755 xenserver/opt_xensource_libexec_interface-reconfigure \
- $RPM_BUILD_ROOT/usr/share/vswitch/scripts/interface-reconfigure
+ $RPM_BUILD_ROOT/usr/share/openvswitch/scripts/interface-reconfigure
install -m 644 xenserver/opt_xensource_libexec_InterfaceReconfigure.py \
- $RPM_BUILD_ROOT/usr/share/vswitch/scripts/InterfaceReconfigure.py
+ $RPM_BUILD_ROOT/usr/share/openvswitch/scripts/InterfaceReconfigure.py
install -m 644 xenserver/opt_xensource_libexec_InterfaceReconfigureBridge.py \
- $RPM_BUILD_ROOT/usr/share/vswitch/scripts/InterfaceReconfigureBridge.py
+ $RPM_BUILD_ROOT/usr/share/openvswitch/scripts/InterfaceReconfigureBridge.py
install -m 644 xenserver/opt_xensource_libexec_InterfaceReconfigureVswitch.py \
- $RPM_BUILD_ROOT/usr/share/vswitch/scripts/InterfaceReconfigureVswitch.py
+ $RPM_BUILD_ROOT/usr/share/openvswitch/scripts/InterfaceReconfigureVswitch.py
install -m 755 xenserver/etc_xensource_scripts_vif \
- $RPM_BUILD_ROOT/usr/share/vswitch/scripts/vif
-install -m 755 xenserver/usr_share_vswitch_scripts_refresh-network-uuids \
- $RPM_BUILD_ROOT/usr/share/vswitch/scripts/refresh-network-uuids
+ $RPM_BUILD_ROOT/usr/share/openvswitch/scripts/vif
+install -m 755 xenserver/usr_share_openvswitch_scripts_refresh-network-uuids \
+ $RPM_BUILD_ROOT/usr/share/openvswitch/scripts/refresh-network-uuids
install -m 755 xenserver/usr_sbin_xen-bugtool \
- $RPM_BUILD_ROOT/usr/share/vswitch/scripts/xen-bugtool
+ $RPM_BUILD_ROOT/usr/share/openvswitch/scripts/xen-bugtool
install -m 755 xenserver/usr_sbin_brctl \
- $RPM_BUILD_ROOT/usr/share/vswitch/scripts/brctl
-install -m 755 xenserver/usr_share_vswitch_scripts_sysconfig.template \
- $RPM_BUILD_ROOT/usr/share/vswitch/scripts/sysconfig.template
+ $RPM_BUILD_ROOT/usr/share/openvswitch/scripts/brctl
+install -m 755 xenserver/usr_share_openvswitch_scripts_sysconfig.template \
+ $RPM_BUILD_ROOT/usr/share/openvswitch/scripts/sysconfig.template
install -m 644 \
xenserver/usr_lib_xsconsole_plugins-base_XSFeatureVSwitch.py \
- $RPM_BUILD_ROOT/usr/share/vswitch/scripts/XSFeatureVSwitch.py
+ $RPM_BUILD_ROOT/usr/share/openvswitch/scripts/XSFeatureVSwitch.py
-install -d -m 755 $RPM_BUILD_ROOT/lib/modules/%{xen_version}/kernel/net/vswitch
-find datapath/linux-2.6 -name *.ko -exec install -m 755 \{\} $RPM_BUILD_ROOT/lib/modules/%{xen_version}/kernel/net/vswitch \;
+install -d -m 755 $RPM_BUILD_ROOT/lib/modules/%{xen_version}/kernel/net/openvswitch
+find datapath/linux-2.6 -name *.ko -exec install -m 755 \{\} $RPM_BUILD_ROOT/lib/modules/%{xen_version}/kernel/net/openvswitch \;
# Get rid of stuff we don't want to make RPM happy.
rm \
$RPM_BUILD_ROOT/usr/share/man/man8/ovs-kill.8 \
$RPM_BUILD_ROOT/usr/share/man/man8/ovs-openflowd.8 \
$RPM_BUILD_ROOT/usr/share/man/man8/ovs-pki.8
-rm -f $RPM_BUILD_ROOT/lib/modules/%{xen_version}/kernel/net/vswitch/veth_mod.ko
+rm -f $RPM_BUILD_ROOT/lib/modules/%{xen_version}/kernel/net/openvswitch/veth_mod.ko
install -d -m 755 $RPM_BUILD_ROOT/var/lib/openvswitch
printf "Re-creating xapi database cache... "
fi
- if /usr/share/vswitch/scripts/interface-reconfigure rewrite; then
+ if /usr/share/openvswitch/scripts/interface-reconfigure rewrite; then
printf "done.\n"
else
printf "FAILED\n"
EOF
fi
-if test ! -e /etc/ovs-vswitchd.conf.db; then
+if test ! -e /etc/openvswitch/conf.db; then
+ install -d -m 755 -o root -g root /etc/openvswitch
+
# Create ovs-vswitchd config database
- ovsdb-tool -vANY:console:emer create /etc/ovs-vswitchd.conf.db \
- /usr/share/vswitch/vswitch.ovsschema \
+ ovsdb-tool -vANY:console:emer create /etc/openvswitch/conf.db \
+ /usr/share/openvswitch/vswitch.ovsschema \
# Create initial table in config database
- ovsdb-tool -vANY:console:emer transact /etc/ovs-vswitchd.conf.db \
+ ovsdb-tool -vANY:console:emer transact /etc/openvswitch/conf.db \
'[{"op": "insert", "table": "Open_vSwitch", "row": {}}]' \
> /dev/null
fi
-# Create default or update existing /etc/sysconfig/vswitch.
-SYSCONFIG=/etc/sysconfig/vswitch
-TEMPLATE=/usr/share/vswitch/scripts/sysconfig.template
+# Create default or update existing /etc/sysconfig/openvswitch.
+SYSCONFIG=/etc/sysconfig/openvswitch
+TEMPLATE=/usr/share/openvswitch/scripts/sysconfig.template
if [ ! -e $SYSCONFIG ]; then
cp $TEMPLATE $SYSCONFIG
else
fi
# Replace XenServer files by our versions.
-mkdir -p /usr/lib/vswitch/xs-original \
+mkdir -p /usr/lib/openvswitch/xs-original \
|| printf "Could not create script backup directory.\n"
for f in \
/opt/xensource/libexec/interface-reconfigure \
do
s=$(basename "$f")
t=$(readlink "$f")
- if [ -f "$f" ] && [ "$t" != "/usr/share/vswitch/scripts/$s" ]; then
- mv "$f" /usr/lib/vswitch/xs-original/ \
+ if [ -f "$f" ] && [ "$t" != "/usr/share/openvswitch/scripts/$s" ]; then
+ mv "$f" /usr/lib/openvswitch/xs-original/ \
|| printf "Could not save original XenServer $s script\n"
- ln -s "/usr/share/vswitch/scripts/$s" "$f" \
- || printf "Could not link to vSwitch $s script\n"
+ ln -s "/usr/share/openvswitch/scripts/$s" "$f" \
+ || printf "Could not link to Open vSwitch $s script\n"
fi
done
# Install xsconsole plugin
plugin=$(readlink /usr/lib/xsconsole/plugins-base/XSFeatureVSwitch.py)
-if [ "$plugin" != "/usr/share/vswitch/scripts/XSFeatureVSwitch.py" ]; then
+if [ "$plugin" != "/usr/share/openvswitch/scripts/XSFeatureVSwitch.py" ]; then
rm -f /usr/lib/xsconsole/plugins-base/XSFeatureVSwitch.py
- ln -s /usr/share/vswitch/scripts/XSFeatureVSwitch.py /usr/lib/xsconsole/plugins-base/ || printf "Could not link to vSswitch xsconsole plugin.\n"
+ ln -s /usr/share/openvswitch/scripts/XSFeatureVSwitch.py /usr/lib/xsconsole/plugins-base/ || printf "Could not link to vSswitch xsconsole plugin.\n"
fi
# Ensure all required services are set to run
-for s in vswitch vswitch-xapi-update; do
+for s in openvswitch openvswitch-xapi-update; do
if chkconfig --list $s >/dev/null 2>&1; then
chkconfig --del $s || printf "Could not remove $s init script."
fi
chkconfig $s on || printf "Could not enable $s init script."
done
-# Configure system to use vswitch
+# Configure system to use Open vSwitch
echo vswitch > /etc/xensource/network.conf
if [ "$1" = "1" ]; then # $1 = 2 for upgrade
- printf "\nYou MUST reboot the server NOW to complete the change to the\n"
- printf "the vSwitch. Attempts to modify networking on the server\n"
+ printf "\nYou MUST reboot the server NOW to complete the change to\n"
+ printf "Open vSwitch. Attempts to modify networking on the server\n"
printf "or any hosted VM will fail until after the reboot and could\n"
printf "leave the server in an state requiring manual recovery.\n\n"
else
- printf "\nTo use the new vSwitch, you should reboot the server\n"
- printf "now. Failure to do so may result in incorrect operation.\n\n"
+ printf "\nTo use the new Open vSwitch install, you should reboot the\n"
+ printf "server now. Failure to do so may result in incorrect operation."
+ printf "\n\n"
fi
%preun
if [ "$1" = "0" ]; then # $1 = 1 for upgrade
- for s in vswitch vswitch-xapi-update; do
+ for s in openvswitch openvswitch-xapi-update; do
chkconfig --del $s || printf "Could not remove $s init script."
done
fi
rm -f /usr/lib/xsconsole/plugins-base/XSFeatureVSwitch.py \
/usr/lib/xsconsole/plugins-base/XSFeatureVSwitch.pyc \
/usr/lib/xsconsole/plugins-base/XSFeatureVSwitch.pyo \
- || printf "Could not remove vSwitch xsconsole plugin.\n"
+ || printf "Could not remove Open vSwitch xsconsole plugin.\n"
# Restore original XenServer scripts
for f in \
/usr/sbin/brctl
do
s=$(basename "$f")
- if [ ! -f "/usr/lib/vswitch/xs-original/$s" ]; then
- printf "Original XenServer $s script not present in /usr/lib/vswitch/xs-original\n"
+ if [ ! -f "/usr/lib/openvswitch/xs-original/$s" ]; then
+ printf "Original XenServer $s script not present in /usr/lib/openvswitch/xs-original\n"
printf "Could not restore original XenServer script.\n"
else
(rm -f "$f" \
- && mv "/usr/lib/vswitch/xs-original/$s" "$f") \
+ && mv "/usr/lib/openvswitch/xs-original/$s" "$f") \
|| printf "Could not restore original XenServer $s script.\n"
fi
done
# Remove all configuration files
- rm -f /etc/ovs-vswitchd.conf.db
- rm -f /etc/sysconfig/vswitch
- rm -f /etc/ovs-vswitchd.cacert
+ rm -f /etc/openvswitch/conf.db
+ rm -f /etc/sysconfig/openvswitch
+ rm -f /etc/openvswitch/vswitchd.cacert
rm -f /var/xapi/network.dbcache
# Configure system to use bridge
%files
%defattr(-,root,root)
-/etc/init.d/vswitch
-/etc/init.d/vswitch-xapi-update
-/etc/xapi.d/plugins/vswitch-cfg-update
-/etc/logrotate.d/vswitch
-/etc/profile.d/vswitch.sh
-/lib/modules/%{xen_version}/kernel/net/vswitch/openvswitch_mod.ko
-/lib/modules/%{xen_version}/kernel/net/vswitch/brcompat_mod.ko
+/etc/init.d/openvswitch
+/etc/init.d/openvswitch-xapi-update
+/etc/xapi.d/plugins/openvswitch-cfg-update
+/etc/logrotate.d/openvswitch
+/etc/profile.d/openvswitch.sh
+/lib/modules/%{xen_version}/kernel/net/openvswitch/openvswitch_mod.ko
+/lib/modules/%{xen_version}/kernel/net/openvswitch/brcompat_mod.ko
%if %(echo '%{xen_version}'|awk -F"." '{if ($3>=18) print 1; else print 0;}')
-/lib/modules/%{xen_version}/kernel/net/vswitch/ip_gre_mod.ko
+/lib/modules/%{xen_version}/kernel/net/openvswitch/ip_gre_mod.ko
%endif
-/usr/share/vswitch/scripts/refresh-network-uuids
-/usr/share/vswitch/scripts/interface-reconfigure
-/usr/share/vswitch/scripts/InterfaceReconfigure.py
-/usr/share/vswitch/scripts/InterfaceReconfigureBridge.py
-/usr/share/vswitch/scripts/InterfaceReconfigureVswitch.py
-/usr/share/vswitch/scripts/vif
-/usr/share/vswitch/scripts/xen-bugtool
-/usr/share/vswitch/scripts/XSFeatureVSwitch.py
-/usr/share/vswitch/scripts/brctl
-/usr/share/vswitch/scripts/sysconfig.template
-/usr/share/vswitch/vswitch.ovsschema
+/usr/share/openvswitch/scripts/refresh-network-uuids
+/usr/share/openvswitch/scripts/interface-reconfigure
+/usr/share/openvswitch/scripts/InterfaceReconfigure.py
+/usr/share/openvswitch/scripts/InterfaceReconfigureBridge.py
+/usr/share/openvswitch/scripts/InterfaceReconfigureVswitch.py
+/usr/share/openvswitch/scripts/vif
+/usr/share/openvswitch/scripts/xen-bugtool
+/usr/share/openvswitch/scripts/XSFeatureVSwitch.py
+/usr/share/openvswitch/scripts/brctl
+/usr/share/openvswitch/scripts/sysconfig.template
+/usr/share/openvswitch/vswitch.ovsschema
/usr/sbin/ovs-brcompatd
/usr/sbin/ovs-vswitchd
/usr/sbin/ovsdb-server
/usr/share/man/man8/ovs-vsctl.8.gz
/usr/share/man/man8/ovs-vswitchd.8.gz
/var/lib/openvswitch
-%exclude /usr/share/vswitch/scripts/*.pyc
-%exclude /usr/share/vswitch/scripts/*.pyo
+%exclude /usr/share/openvswitch/scripts/*.pyc
+%exclude /usr/share/openvswitch/scripts/*.pyo
# ChoiceDef(Lang("Restart ovs-brcompatd"),
# lambda: self.restartService("vswitch-brcompatd"))
]
- self.menu = Menu(self, None, Lang("Configure vSwitch"), choiceDefs)
+ self.menu = Menu(self, None, Lang("Configure Open vSwitch"), choiceDefs)
self.ChangeState("INITIAL")
def BuildPane(self):
pane = self.NewPane(DialoguePane(self.parent))
- pane.TitleSet(Lang("Configure vSwitch"))
+ pane.TitleSet(Lang("Configure Open vSwitch"))
pane.AddBox()
def ChangeState(self, inState):
for host in hosts:
Layout.Inst().TransientBanner("Updating host %d out of %d"
% (self.hostsUpdated + 1, self.hostsInPool))
- session.xenapi.host.call_plugin(host, "vswitch-cfg-update", "update", {})
+ session.xenapi.host.call_plugin(host, "openvswitch-cfg-update", "update", {})
self.hostsUpdated = self.hostsUpdated + 1
def _updateThisServer(self, session):
data = Data.Inst()
host = data.host.opaqueref()
- session.xenapi.host.call_plugin(host, "vswitch-cfg-update", "update", {})
+ session.xenapi.host.call_plugin(host, "openvswitch-cfg-update", "update", {})
class XSFeatureVSwitch:
def StatusUpdateHandler(cls, inPane):
data = Data.Inst()
- inPane.AddTitleField(Lang("vSwitch"))
+ inPane.AddTitleField(Lang("Open vSwitch"))
inPane.NewLine()
inPane.AddStatusField(Lang("Version", 20),
- VSwitchService.Inst("vswitch", "ovs-vswitchd").version())
+ VSwitchService.Inst("openvswitch", "ovs-vswitchd").version())
inPane.NewLine()
inPane.NewLine()
inPane.AddStatusField(Lang("ovs-vswitchd status", 20),
- VSwitchService.Inst("vswitch", "ovs-vswitchd").status())
+ VSwitchService.Inst("openvswitch", "ovs-vswitchd").status())
inPane.AddStatusField(Lang("ovsdb-server status", 20),
- VSwitchService.Inst("vswitch", "ovsdb-server").status())
+ VSwitchService.Inst("openvswitch", "ovsdb-server").status())
inPane.AddStatusField(Lang("ovs-brcompatd status", 20),
- VSwitchService.Inst("vswitch", "ovs-brcompatd").status())
+ VSwitchService.Inst("openvswitch", "ovs-brcompatd").status())
inPane.AddKeyHelpField( {
Lang("<Enter>") : Lang("Reconfigure"),
{
'menuname' : 'MENU_NETWORK',
'menupriority' : 800,
- 'menutext' : Lang('vSwitch') ,
+ 'menutext' : Lang('Open vSwitch') ,
'statusupdatehandler' : self.StatusUpdateHandler,
'activatehandler' : self.ActivateHandler
}
argv0 = sys.argv[0]
-BRCTL = "/usr/lib/vswitch/xs-original/brctl"
+BRCTL = "/usr/lib/openvswitch/xs-original/brctl"
VSCTL = "/usr/bin/ovs-vsctl"
-OVSDB_SERVER = "unix:/var/run/ovsdb-server"
+OVSDB_SERVER = "unix:/var/run/openvswitch/db.sock"
# Execute the real brctl program, passing the same arguments that were passed
# to us.
HP_HPASMD_LOG = '/var/spool/compaq/hpasmd.log'
VAR_LOG_DIR = '/var/log/'
VNCTERM_CORE_DIR = '/var/xen/vncterm'
-VSWITCH_CORE_DIR = '/var/xen/vswitch'
-OVS_VSWITCH_CONF = '/etc/ovs-vswitchd.conf.db'
-OVS_VSWITCH_DBCACHE = '/var/xapi/network.dbcache'
+OPENVSWITCH_CORE_DIR = '/var/xen/openvswitch'
+OPENVSWITCH_CONF = '/etc/openvswitch/conf.db'
+OPENVSWITCH_DBCACHE = '/var/xapi/network.dbcache'
+OPENVSWITCH_LOG_DIR = '/var/log/openvswitch'
XENSOURCE_INVENTORY = '/etc/xensource-inventory'
OEM_CONFIG_DIR = '/var/xsconfig'
OEM_CONFIG_FILES_RE = re.compile(r'^.*xensource-inventory$')
CAP_SYSTEM_SERVICES = 'system-services'
CAP_TAPDISK_LOGS = 'tapdisk-logs'
CAP_VNCTERM = 'vncterm'
-CAP_VSWITCH_CONFIG = 'vswitch-config'
-CAP_VSWITCH_LOGS = 'vswitch-logs'
-CAP_VSWITCH_STATUS = 'vswitch-status'
+CAP_OPENVSWITCH_CONFIG = 'openvswitch-config'
+CAP_OPENVSWITCH_LOGS = 'openvswitch-logs'
+CAP_OPENVSWITCH_STATUS = 'openvswitch-status'
CAP_WLB = 'wlb'
CAP_X11_LOGS = 'X11'
CAP_X11_AUTH = 'X11-auth'
max_time=20)
cap(CAP_TAPDISK_LOGS, PII_NO, max_size=64*KB)
cap(CAP_VNCTERM, PII_MAYBE, checked = False)
-cap(CAP_VSWITCH_CONFIG, PII_YES,
+cap(CAP_OPENVSWITCH_CONFIG, PII_YES,
min_size=0, max_size=20*MB)
-cap(CAP_VSWITCH_LOGS, PII_YES, max_size=20*MB)
-cap(CAP_VSWITCH_STATUS, PII_YES, max_size=19*KB,
+cap(CAP_OPENVSWITCH_LOGS, PII_YES, max_size=20*MB)
+cap(CAP_OPENVSWITCH_STATUS, PII_YES, max_size=19*KB,
max_time=30)
cap(CAP_WLB, PII_NO, max_size=3*MB,
max_time=20)
CAP_NETWORK_CONFIG, CAP_NETWORK_STATUS, CAP_PROCESS_LIST, CAP_HIGH_AVAILABILITY,
CAP_PAM, CAP_PERSISTENT_STATS, CAP_MULTIPATH,
CAP_SYSTEM_LOGS, CAP_SYSTEM_SERVICES, CAP_TAPDISK_LOGS,
- CAP_VNCTERM, CAP_VSWITCH_CONFIG, CAP_VSWITCH_LOGS, CAP_VSWITCH_STATUS, CAP_WLB,
+ CAP_VNCTERM, CAP_OPENVSWITCH_CONFIG,
+ CAP_OPENVSWITCH_LOGS, CAP_OPENVSWITCH_STATUS, CAP_WLB,
CAP_X11_LOGS, CAP_X11_AUTH, CAP_XAPI_DEBUG, CAP_XAPI_SUBPROCESS,
CAP_XENSERVER_CONFIG, CAP_XENSERVER_DOMAINS, CAP_XENSERVER_DATABASES,
CAP_XENSERVER_INSTALL, CAP_XENSERVER_LOGS, CAP_XEN_INFO, CAP_XHA_LIVESET, CAP_YUM]
tree_output(CAP_VNCTERM, VNCTERM_CORE_DIR)
- file_output(CAP_VSWITCH_CONFIG, [OVS_VSWITCH_CONF])
- file_output(CAP_VSWITCH_CONFIG, [OVS_VSWITCH_DBCACHE])
+ file_output(CAP_OPENVSWITCH_CONFIG, [OPENVSWITCH_CONF])
+ file_output(CAP_OPENVSWITCH_CONFIG, [OPENVSWITCH_DBCACHE])
- file_output(CAP_VSWITCH_LOGS,
- [ VAR_LOG_DIR + x for x in
- [ 'ovs-brcompatd.log', 'ovs-vswitchd.log', 'ovsdb-server.log', 'vswitch-cfg-update.log', 'vswitch-xsplugin.log' ] +
+ file_output(CAP_OPENVSWITCH_LOGS,
+ [ OPENVSWITCH_LOG_DIR + x for x in
+ [ 'ovs-brcompatd.log', 'ovs-vswitchd.log', 'ovsdb-server.log',
+ 'openvswitch-cfg-update.log', 'openvswitch-xsplugin.log' ] +
[ f % n for n in range(1, 20) \
for f in ['ovs-brcompatd.log.%d', 'ovs-brcompatd.log.%d.gz',
'ovs-vswitchd.log.%d', 'ovs-vswitchd.log.%d.gz',
'ovsdb-server.log.%d', 'ovsdb-server.log.%d.gz']]])
- cmd_output(CAP_VSWITCH_STATUS, [OVS_DPCTL, 'show'])
- tree_output(CAP_VSWITCH_STATUS, VSWITCH_CORE_DIR)
+ cmd_output(CAP_OPENVSWITCH_STATUS, [OVS_DPCTL, 'show'])
+ tree_output(CAP_OPENVSWITCH_STATUS, OPENVSWITCH_CORE_DIR)
for d in dp_list():
- cmd_output(CAP_VSWITCH_STATUS, [OVS_OFCTL, 'show', d])
- cmd_output(CAP_VSWITCH_STATUS, [OVS_OFCTL, 'status', d])
- cmd_output(CAP_VSWITCH_STATUS, [OVS_OFCTL, 'dump-flows', d])
- cmd_output(CAP_VSWITCH_STATUS, [OVS_DPCTL, 'dump-flows', d])
+ cmd_output(CAP_OPENVSWITCH_STATUS, [OVS_OFCTL, 'show', d])
+ cmd_output(CAP_OPENVSWITCH_STATUS, [OVS_OFCTL, 'status', d])
+ cmd_output(CAP_OPENVSWITCH_STATUS, [OVS_OFCTL, 'dump-flows', d])
+ cmd_output(CAP_OPENVSWITCH_STATUS, [OVS_DPCTL, 'dump-flows', d])
cmd_output(CAP_WLB, [XE, 'pool-retrieve-wlb-diagnostics'])
-### Configuration options for vswitch
+### Configuration options for openvswitch
# Copyright (C) 2009, 2010 Nicira Networks, Inc.
#
# COREFILE_PATTERN: Pattern used to determine path and filename for
# core files when FORCE_COREFILES is 'y'. This is Linux specific.
# See the manpage for "core".
-# COREFILE_PATTERN="/var/log/%e-%t"
+# COREFILE_PATTERN="/var/xen/openvswitch/%e-%t"
# OVSDB_SERVER_REMOTES: Space-separated list of methods on which to have
# ovsdb-server listen or connect for a JSON-RPC connection.
-# OVSDB_SERVER_REMOTES="punix:/var/run/ovsdb-server db:Open_vSwitch,managers"
+# OVSDB_SERVER_REMOTES="punix:/var/run/openvswitch/db.sock db:Open_vSwitch,managers"
# OVSDB_SERVER_DB: File for which ovsdb-server uses for storage.
-# OVSDB_SERVER_DB=/etc/ovs-vswitchd.conf.db
+# OVSDB_SERVER_DB=/etc/openvswitch/conf.db
# OVSDB_SERVER_PIDFILE: File in which to store the pid of the running
# ovsdb-server.
-# OVSDB_SERVER_PIDFILE=/var/run/ovsdb-server.pid
+# OVSDB_SERVER_PIDFILE=/var/run/openvswitch/ovsdb-server.pid
# OVSDB_SERVER_RUN_DIR: Set the directory in which ovsdb-server should be
# run. This mainly affects where core files will be placed.
-# OVSDB_SERVER_RUN_DIR=/var/xen/vswitch
+# OVSDB_SERVER_RUN_DIR=/var/xen/openvswitch
# OVSDB_SERVER_PRIORITY: "nice" priority at which to run ovsdb-server and
# related processes.
# OVSDB_SERVER_PRIORITY=-10
# OVSDB_SERVER_LOGFILE: File to send the FILE_LOGLEVEL log messages to.
-# OVSDB_SERVER_LOGFILE=/var/log/ovsdb-server.log
+# OVSDB_SERVER_LOGFILE=/var/log/openvswitch/ovsdb-server.log
# OVSDB_SERVER_FILE_LOGLEVEL: Log level at which to log into the
# OVSDB_SERVER_LOG file. If this is null or not set the logfile will
# VSWITCHD_OVSDB_SERVER: Method to have ovs-vswitchd initiate a JSON-RPC
# connection to an ovsdb-server instance.
-# VSWITCHD_OVSDB_SERVER=unix:/var/run/ovsdb-server
+# VSWITCHD_OVSDB_SERVER=unix:/var/run/openvswitch/db.sock
# VSWITCHD_OVSDB_SCHEMA: Schema file to use for generating a new OVSDB
# ovs-vswitchd database.
-# VSWITCHD_OVSDB_SCHEMA=/usr/share/vswitch/vswitch.ovsschema
+# VSWITCHD_OVSDB_SCHEMA=/usr/share/openvswitch/vswitch.ovsschema
# VSWITCHD_PIDFILE: File in which to store the pid of the running
# ovs-vswitchd.
-# VSWITCHD_PIDFILE=/var/run/ovs-vswitchd.pid
+# VSWITCHD_PIDFILE=/var/run/openvswitch/ovs-vswitchd.pid
# VSWITCHD_RUN_DIR: Set the directory in which ovs-vswitchd should be
# run. This mainly affects where core files will be placed.
-# VSWITCHD_RUN_DIR=/var/xen/vswitch
+# VSWITCHD_RUN_DIR=/var/xen/openvswitch
# VSWITCHD_PRIORITY: "nice" priority at which to run ovs-vswitchd and related
# processes.
# VSWITCHD_MLOCKALL=yes
# VSWITCHD_LOGFILE: File to send the FILE_LOGLEVEL log messages to.
-# VSWITCHD_LOGFILE=/var/log/ovs-vswitchd.log
+# VSWITCHD_LOGFILE=/var/log/openvswitch/ovs-vswitchd.log
# VSWITCHD_FILE_LOGLEVEL: Log level at which to log into the
# VSWITCHD_LOG file. If this is null or not set the logfile will
# If this is the empty string, ovs-brcompatd will not be started and
# the brcompat_mod kernel module will not be inserted. Note that
# the default is to use brcompat!
-# BRCOMPATD_PIDFILE=/var/run/ovs-brcompatd.pid
+# BRCOMPATD_PIDFILE=/var/run/openvswitch/ovs-brcompatd.pid
# BRCOMPATD_RUN_DIR: Set the directory in which ovs-brcompatd should be
# run. This mainly affects where core files will be placed.
-# BRCOMPATD_RUN_DIR=/var/xen/vswitch
+# BRCOMPATD_RUN_DIR=/var/xen/openvswitch
# BRCOMPATD_PRIORITY: "nice" priority at which to run ovs-vswitchd and related
# processes.
# BRCOMPATD_PRIORITY=-10
# BRCOMPATD_LOGFILE: File to send the FILE_LOGLEVEL log messages to.
-# BRCOMPATD_LOGFILE=/var/log/ovs-brcompatd.log
+# BRCOMPATD_LOGFILE=/var/log/openvswitch/ovs-brcompatd.log
# BRCOMPATD_FILE_LOGLEVEL: Log level at which to log into the
# BRCOMPATD_LOG file. If this is null or not set the logfile will