Support vlan_group workaround implemented in XenServer kernels.
[sliver-openvswitch.git] / xenserver / openvswitch-xen.spec
index 05229de..7f2cabd 100644 (file)
@@ -117,12 +117,10 @@ install xenserver/uuid.py $RPM_BUILD_ROOT/usr/share/openvswitch/python
 rm \
     $RPM_BUILD_ROOT/usr/bin/ovs-controller \
     $RPM_BUILD_ROOT/usr/bin/ovs-discover \
-    $RPM_BUILD_ROOT/usr/bin/ovs-kill \
     $RPM_BUILD_ROOT/usr/bin/ovs-openflowd \
     $RPM_BUILD_ROOT/usr/bin/ovs-pki \
     $RPM_BUILD_ROOT/usr/share/man/man8/ovs-controller.8 \
     $RPM_BUILD_ROOT/usr/share/man/man8/ovs-discover.8 \
-    $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
 
@@ -132,29 +130,6 @@ install -d -m 755 $RPM_BUILD_ROOT/var/lib/openvswitch
 rm -rf $RPM_BUILD_ROOT
 
 %post
-# Do not run the first block if we are in the XenServer installer
-if runlevel >/dev/null 2>&1; then
-    if test ! -e /var/xapi/network.dbcache; then
-        if test "$1" = 1; then
-            printf "Creating xapi database cache...  "
-        else
-            printf "warning: Open vSwitch is being re-installed or upgraded,\n"
-            printf "         but the xapi database cache is missing.\n"
-            printf "Re-creating xapi database cache...  "
-        fi
-
-        if /usr/share/openvswitch/scripts/interface-reconfigure rewrite; then
-            printf "done.\n"
-        else
-            printf "FAILED\n"
-            printf "Open vSwitch can only be installed on a XenServer that\n"
-            printf "has connectivity to xapi on the pool master.  Please\n"
-            printf "fix connectivity to the pool master, then try again.\n"
-            exit 1
-        fi
-    fi
-fi
-
 if grep -F net.ipv4.conf.all.arp_filter /etc/sysctl.conf >/dev/null 2>&1; then :; else
     cat >>/etc/sysctl.conf <<EOF
 # This works around an issue in xhad, which binds to a particular
@@ -248,10 +223,10 @@ for s in openvswitch openvswitch-xapi-update; do
     chkconfig $s on || printf "Could not enable $s init script."
 done
 
-# Configure system to use Open vSwitch
-echo vswitch > /etc/xensource/network.conf
-
 if [ "$1" = "1" ]; then    # $1 = 2 for upgrade
+    # Configure system to use Open vSwitch
+    echo vswitch > /etc/xensource/network.conf
+
     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"
@@ -374,6 +349,7 @@ fi
 /usr/share/openvswitch/scripts/xen-bugtool-tc-class-show
 /usr/share/openvswitch/scripts/ovs-save
 /usr/share/openvswitch/vswitch.ovsschema
+/usr/sbin/ovs-vlan-bug-workaround
 /usr/sbin/ovs-vswitchd
 /usr/sbin/ovsdb-server
 /usr/bin/ovs-appctl
@@ -396,6 +372,7 @@ fi
 /usr/share/man/man8/ovs-parse-leaks.8.gz
 /usr/share/man/man1/ovs-pcap.1.gz
 /usr/share/man/man1/ovs-tcpundump.1.gz
+/usr/share/man/man8/ovs-vlan-bug-workaround.8.gz
 /usr/share/man/man8/ovs-vlan-test.8.gz
 /usr/share/man/man8/ovs-vsctl.8.gz
 /usr/share/man/man8/ovs-vswitchd.8.gz