xenserver: dbcache should always exist so don't bother checking.
authorBen Pfaff <blp@nicira.com>
Mon, 14 Mar 2011 21:14:34 +0000 (14:14 -0700)
committerBen Pfaff <blp@nicira.com>
Mon, 14 Mar 2011 21:37:34 +0000 (14:37 -0700)
Open vSwitch introduced the on-disk database cache a long time ago.  Since
then, Citrix has integrated it upstream into XenServer's
interface-reconfigure and even into their installer.  OVS no longer
supports XenServer before 5.6.100, so it is no longer necessary to check
for and create the database cache if it isn't there.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Bug #3388.

xenserver/openvswitch-xen.spec

index 450cd34..ab06a06 100644 (file)
@@ -130,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