xenserver: Warn when upgrading OVS on a bridged system.
authorEthan Jackson <ethan@nicira.com>
Tue, 12 Apr 2011 01:29:02 +0000 (18:29 -0700)
committerBen Pfaff <blp@nicira.com>
Fri, 29 Apr 2011 21:31:50 +0000 (14:31 -0700)
xenserver/openvswitch-xen.spec

index 7a2e176..4d03991 100644 (file)
@@ -233,8 +233,17 @@ if [ "$1" = "1" ]; then    # $1 = 2 for upgrade
     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 "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 Open vSwitch install, you should reboot the\n" 
-    printf "server now.  Failure to do so may result in incorrect operation."
+
+    mode=$(cat /etc/xensource/network.conf)
+    if [ "$mode" != "vswitch" ] && [ "$mode" != "openvswitch" ]; then
+        printf "\nThe server is not configured to run Open vSwitch.  To run in\n"
+        printf "vswitch mode, you must run the following command:\n\n"
+        printf "\txe-switch-network-backend vswitch"
+    else
+        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."
+    fi
+
     printf "\n\n"
 fi
 
     printf "\n\n"
 fi