[ovs-dev] [PATCH 1/2] xenserver: Use xe-switch-network-stack in RPM spec file.
Justin Pettit
jpettit at nicira.com
Wed May 4 06:23:04 UTC 2011
The proper way to switch the networking back-end is to use the
"xe-switch-network-stack" command rather than directly modifying
"/etc/xensource/network.conf". Use that method in the spec file.
---
xenserver/openvswitch-xen.spec | 18 ++++++++----------
1 files changed, 8 insertions(+), 10 deletions(-)
diff --git a/xenserver/openvswitch-xen.spec b/xenserver/openvswitch-xen.spec
index b7b987e..89dfd77 100644
--- a/xenserver/openvswitch-xen.spec
+++ b/xenserver/openvswitch-xen.spec
@@ -226,12 +226,11 @@ done
if [ "$1" = "1" ]; then # $1 = 2 for upgrade
# Configure system to use Open vSwitch
- echo vswitch > /etc/xensource/network.conf
+ xe-switch-network-backend vswitch
- 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"
- printf "leave the server in a state requiring manual recovery.\n\n"
+ printf "\nAttempts to modify networking on the server or any hosted\n"
+ printf "VM will fail until after the reboot and could leave the\n"
+ printf "server in a state requiring manual recovery.\n\n"
else
mode=$(cat /etc/xensource/network.conf)
@@ -311,12 +310,11 @@ if [ "$1" = "0" ]; then # $1 = 1 for upgrade
rmdir -p /usr/lib/openvswitch/xs-saved 2>/dev/null
# Configure system to use bridge
- echo bridge > /etc/xensource/network.conf
+ xe-switch-network-backend bridge
- 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"
- printf "could leave the server in a state requiring manual recovery.\n\n"
+ printf "\nAttempts to modify networking on the server or any hosted\n"
+ printf "VM will fail until after the reboot and could leave the\n"
+ printf "server in a state requiring manual recovery.\n\n"
fi
%files
--
1.7.1
More information about the dev
mailing list