xenserver: Do not set or remove vSwitchVersion xapi parameter anymore.
authorBen Pfaff <blp@nicira.com>
Tue, 28 Jul 2009 22:35:57 +0000 (15:35 -0700)
committerBen Pfaff <blp@nicira.com>
Wed, 29 Jul 2009 18:23:30 +0000 (11:23 -0700)
The other-config:vSwitchVersion parameter was used to announce the Open
vSwitch version installed on a XenServer host, but this had the problem
that it could not be read or updated if the connection to the pool master
was down.  Because of this problem, the only user of this parameter in
Open vSwitch was removed (in commit 3cdc31a4c3a "xenserver: Retrieve
vSwitch version from binary in xsconsole").  So this commit finished the
process and removes the parameter entirely.

This should fix hangs on Open vSwitch installation and removal due to
waiting on the connection to the pool master.

xenserver/vswitch-xen.spec

index e24f893..028a6ce 100644 (file)
@@ -165,8 +165,6 @@ EOF
 fi
 
 %post
-source /etc/xensource-inventory
-
 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
@@ -182,10 +180,6 @@ net.ipv4.conf.all.arp_filter = 1
 EOF
 fi
 
-xe host-param-set \
-    "other-config:vSwitchVersion=%{version}" uuid="$INSTALLATION_UUID" ||
-    echo "Could not set vSwitchVersion config parameter"
-
 # Ensure ovs-vswitchd.conf exists
 touch /etc/ovs-vswitchd.conf
 
@@ -273,18 +267,6 @@ if [ "$1" = "0" ]; then     # $1 = 1 for upgrade
     rm -f /var/log/vswitch*
     rm -f /etc/ovs-vswitchd.cacert
 
-    if [ ! -f /etc/xensource-inventory ]; then
-        printf "XenSource inventory not present in /etc/xensource-inventory\n"
-        printf "Could not remove vSwitchVersion from XAPI database.\n"
-        exit 1
-    else
-        source /etc/xensource-inventory
-        xe host-param-remove \
-            param-name=other-config param-key=vSwitchVersion \
-            uuid="$INSTALLATION_UUID" ||
-            echo "Could not clear vSwitchVersion config parameter."
-    fi
-
     printf "\nYou MUST reboot the server now to complete the change to\n"
     printf "standard Xen networking.  Attempts to modify networking on the\n"
     printf "server or any hosted VM will fail until after the reboot and\n"