From: Keith Amidon Date: Wed, 11 Mar 2009 22:28:10 +0000 (-0700) Subject: Update Xen init scripts & default config for changes to config file handling. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3e839297ac0ed193a86ae5ae4a920e3de218fbee;p=openvswitch Update Xen init scripts & default config for changes to config file handling. --- diff --git a/vswitchd/etc/init.d/vswitch b/vswitchd/etc/init.d/vswitch index b27099db..a2f6f68d 100755 --- a/vswitchd/etc/init.d/vswitch +++ b/vswitchd/etc/init.d/vswitch @@ -16,7 +16,6 @@ MEMLEAK_LOG="${MEMLEAK_LOG:-}" VSWITCH_BASE=/root/vswitch/openflow/build VSWITCHD_CONF=/etc/vswitchd.conf -BRCOMPAT_CONF=/etc/vswitchd.brcompat.conf VSWITCHD_LOG=/var/log/vswitchd.log function dp_intf { @@ -30,17 +29,6 @@ function start { if ! lsmod | grep -q "brcompat_mod"; then action "Inserting brcompat module" insmod $VSWITCH_BASE/datapath/linux-2.6/brcompat_mod.ko fi - if [ "$1" != "restart" ]; then - # If we are not doing a restart, then presumably Xen's xapi will create all the bridges, etc. - # so the existing config file will just cause vswitchd to add a lot of useless ports - # which it will then conclude don't have any associated interfaces. Therefore, we just - # nuke the config file before vswitchd is initially brought up. - # For debugging purposes, we save teh configuration file as it was when the system - # came up. - cp "$BRCOMPAT_CONF" "$BRCOMPAT_CONF.last" - rm -f "$BRCOMPAT_CONF" - touch "$BRCOMPAT_CONF" - fi ulimit -c unlimited # Ensure core dump on crash. Will be in '/'. local syslog_opt="-vANY:SYSLOG:${SYSLOG_LOGLEVEL}" local logfile_file_opt="" @@ -56,7 +44,7 @@ function start { mv "$MEMLEAK_LOG" "$MEMLEAK_LOG.last" fi fi - PATH=$VSWITCH_BASE/secchan:$PATH action "Starting vswitchd" nice -n "$PRIORITY" $VSWITCH_BASE/vswitchd/vswitchd -P/var/run/vswitchd.pid -D -vANY:CONSOLE:EMER $syslog_opt $logfile_level_opt $logfile_file_opt -F "$VSWITCHD_CONF" -F "$BRCOMPAT_CONF" -b "$BRCOMPAT_CONF" $leak_opt + PATH=$VSWITCH_BASE/secchan:$PATH action "Starting vswitchd" nice -n "$PRIORITY" $VSWITCH_BASE/vswitchd/vswitchd -P/var/run/vswitchd.pid -D -vANY:CONSOLE:EMER $syslog_opt $logfile_level_opt $logfile_file_opt --brcompat $leak_opt "$VSWITCHD_CONF" if [ "$1" = "restart" ]; then sleep 2 # Give time for vswitch to get up and running. i=0 diff --git a/vswitchd/etc/vswitchd.brcompat.conf b/vswitchd/etc/vswitchd.brcompat.conf deleted file mode 100644 index d1e4d448..00000000 --- a/vswitchd/etc/vswitchd.brcompat.conf +++ /dev/null @@ -1,4 +0,0 @@ -# vswitchd.brcompat.conf -# -# This file is normally automatically managed by the brcompat hooks. -# User-created content should go in vswitchd.conf instead. diff --git a/vswitchd/etc/vswitchd.conf b/vswitchd/etc/vswitchd.conf index de43c4f3..b5516024 100644 --- a/vswitchd/etc/vswitchd.conf +++ b/vswitchd/etc/vswitchd.conf @@ -1,143 +1 @@ # vswitchd.conf -# -# Example vswitchd user configuration file - -# The primary purpose of this configuration file is to specify -# persistent configuration for the bridges managed by vswitchd. - -# Each bridge is defined by a new "bridge" section in the -# configuration file: - -# [bridge "mybridge"] -# port = bond0 -# port = eth2 -# port = eth3 -# port = eth4 - -# The above example would define a single bridge, named "mybridge" -# containing the four ports specified. The bond0 port refers to a -# bonded set of physical ports over which traffic will be shared. -# Each bond has its own configuration section: - -# [bonding "bond0"] -# slave = eth0 -# slave = eth1 -# updelay = 10 -# downdelay = 10 - -# In this section, the slave keys list the ports to be bonded. The -# updelay and downdelay keys specify the number of milliseconds to -# wait before enabling or disabling the interface after carrier -# discovery or loss respectively. If they are not specified, they -# default to zero, resulting in immediate action. -# -# If the bridge is in a VLAN environment, VLAN configuration can be -# specified in separate sections for each port: - -# [vlan "bond0"] -# trunks = 101 -# trunks = 102 -# trunks = 103 -# -# [vlan "eth2"] -# tag = 101 -# -# [vlan "eth3"] -# tag = 102 - -# This configuration would place make the bond0 port a VLAN trunk -# carrying VLANs 101, 102, and 103. Eth2 is a member of VLAN 101 and -# will have a tag inserted in ingress and stripped on egress, with the -# same for eth3 on VLAN 102. -# -# It is sometime useful to "span" or copy traffic from one port to -# another. This is accomplished using a mirror section specific to a -# bridge: - -# [mirror "mybridge.mirror0"] -# output.port = eth4 -# select.src-port = eth2 -# select.dst-port = eth3 -# select.port = bond0 -# -# [mirror "mybridge.mirror1"] -# output.vlan = 103 -# select.vlan = 101 - -# The mirror0 configuration is a "local SPAN" configuration that would -# copy all ingress packets from eth2, all egress packets from eth3, -# and both ingress and egress packets from bond0 to the local eth4 -# port. The mirror1 configuration is a "remote SPAN" (RSPAN) -# cnofiguration that would copy all traffic seen on VLAN 101 to VLAN -# 103, where they would be flooded out bond0 since it is a trunk port -# carrying VLAN 103. -# -# Often vswitch ports are only virtual interfaces local to a host and -# as a result the vswitch does not enable spanning-tree by default. -# Spanning tree can be enabled in an "spt" section: - -# [stp "mybridge"] -# enabled = true -# port.bond0.priority = 64 -# port.bond0.path-cost = 10 -# port.eth2.enabled = false -# - -# When spanning-tree is enabled for a bridge, it is enabled for all -# ports by default. In this example configuration, only the eth2 port -# has spanning tree disabled. -# -# Network activity can also be monitored through the collection of -# netflow records. This is enabled through a netflow section: - -# [netflow "mybridge"] -# host = collector1.xyz.com:9995 -# host = collector2.xyz.com:1324 - -# This configuration will send netflow records to collector1.xyz.com -# on port 9995 and collector2.xyz.com on port 1324. -# -# Finally, vswitchd alone acts as an intelligent learning switch. -# However, it can also be configured to allow remote control of -# forwarding using the OpenFlow protocol. This is accomplished with -# additional keys in the bridge section. Note here that we've defined -# a second bridge section with the same name as the bridge section -# defined earlier. The configuration values from both sections will -# be merged. - -# [bridge "mybridge"] -# controller = ssl:controller.xyz.com:4321 -# secchan.options = --some-option --some-other-option - -# Advanced note: The sections described above are primarily to enhance -# readability. They are transformed into a hierarchical set of keys -# separated by period characters. The configuration file may also -# contain key/value pairs specified in this form. As an example, the -# example configuration discussed above could alternatively been -# specified as: - -# bridge.mybridge.port = bond0 -# bridge.mybridge.port = eth2 -# bridge.mybridge.port = eth3 -# bonding.bond0.slave = eth0 -# bonding.bond0.slave = eth1 -# bonding.bond0.updelay = 10 -# bonding.bond0.downdelay = 10 -# vlan.bond0.trunks = 101 -# vlan.bond0.trunks = 102 -# vlan.eth2.tag = 101 -# vlan.eth3.tag = 102 -# mybridge.mirror0.output.port = eth4 -# mybridge.mirror0.select.src-port = eth2 -# mybridge.mirror0.select.dst-port = eth3 -# mybridge.mirror0.select.port = bond0 -# mybridge.mirror1.output.vlan = 103 -# mybridge.mirror1.select.vlan = 101 -# stp.mybridge.enabled = true -# stp.mybridge.port.bond0.priority = 64 -# stp.mybridge.port.bond0.path-cost = 10 -# stp.mybridge.port.eth2.enabled = false -# netflow.mybridge.host = collector1.xyz.com:9995 -# netflow.mybridge.host = collector2.xyz.com:1324 -# bridge.mybridge.controller = ssl:controller.xyz.com:4321 -# bridge.mybridge.secchan.options = --some-option --some-other-option