Skip to content

Commit 34edecc

Browse files
Justin PettitAndrew Evans
authored andcommitted
xenserver: Remove support for XenServer versions older than 5.6 FP1.
Commit 404c169 breaks compatibility with XenServers older than 5.6 FP1. This commit removes the last vestiges of support for those older XenServer versions. Signed-off-by: Justin Pettit <jpettit@nicira.com>
1 parent 54f16a1 commit 34edecc

13 files changed

Lines changed: 21 additions & 304 deletions

tests/interface-reconfigure.at

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -737,7 +737,6 @@ Applying changes to /etc/sysconfig/network-scripts/ifcfg-xapi3 configuration
737737
set Bridge xenbr3 other-config:hwaddr="00:15:17:a0:29:81"
738738
set Bridge xenbr3 fail_mode=standalone
739739
br-set-external-id xenbr3 xs-network-uuids 2902ae1b-8013-897a-b697-0b200ea3aaa5;db7bdc03-074d-42ae-fc73-9b06de1d57f6
740-
--if-exists del-br xapi3
741740
--may-exist add-br xapi3 xenbr3 123
742741
br-set-external-id xapi3 xs-network-uuids 2902ae1b-8013-897a-b697-0b200ea3aaa5;db7bdc03-074d-42ae-fc73-9b06de1d57f6
743742
set Interface xapi3 MAC="00:15:17:a0:29:81"
@@ -909,7 +908,6 @@ Applying changes to /etc/sysconfig/network-scripts/ifcfg-xapi2 configuration
909908
set Bridge xapi1 other-config:hwaddr="00:22:19:22:4b:af"
910909
set Bridge xapi1 fail_mode=standalone
911910
br-set-external-id xapi1 xs-network-uuids 45cbbb43-113d-a712-3231-c6463f253cef;99be2da4-6c33-6f8e-49ea-3bc592fe3c85
912-
--if-exists del-br xapi2
913911
--may-exist add-br xapi2 xapi1 4
914912
br-set-external-id xapi2 xs-network-uuids 45cbbb43-113d-a712-3231-c6463f253cef;99be2da4-6c33-6f8e-49ea-3bc592fe3c85
915913
set Interface xapi2 MAC="00:22:19:22:4b:af"

xenserver/README

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,6 @@ files are:
5151
Daemon to monitor the external_ids columns of the Bridge and
5252
Interface OVSDB tables.
5353

54-
usr_share_openvswitch_scripts_refresh-xs-network-uuids
55-
56-
Script to refresh Bridge table external-ids:xs-network-uuids
57-
values, which can get out-of-sync following a pool join.
58-
5954
usr_share_openvswitch_scripts_sysconfig.template
6055

6156
Template for Open vSwitch's /etc/sysconfig/openvswitch

xenserver/automake.mk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,5 @@ EXTRA_DIST += \
2424
xenserver/usr_lib_xsconsole_plugins-base_XSFeatureVSwitch.py \
2525
xenserver/usr_sbin_xen-bugtool \
2626
xenserver/usr_share_openvswitch_scripts_ovs-external-ids \
27-
xenserver/usr_share_openvswitch_scripts_refresh-xs-network-uuids \
2827
xenserver/usr_share_openvswitch_scripts_sysconfig.template \
2928
xenserver/uuid.py

xenserver/etc_init.d_openvswitch

Lines changed: 2 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -75,21 +75,6 @@ case ${NETWORK_MODE:=openvswitch} in
7575
;;
7676
esac
7777

78-
# General config variables in /etc/sysconfig/openvswitch
79-
if [ -f /etc/xensource-inventory ]; then
80-
if test "$PRODUCT_VERSION" = "5.5.0"; then
81-
# XenServer 5.5.0 needs ovs-brcompatd and /proc/net simulation.
82-
: ${ENABLE_BRCOMPAT:=y}
83-
: ${ENABLE_FAKE_PROC_NET:=y}
84-
else
85-
# Later versions don't need them.
86-
: ${ENABLE_BRCOMPAT:=n}
87-
: ${ENABLE_FAKE_PROC_NET:=n}
88-
fi
89-
else
90-
: ${ENABLE_BRCOMPAT:=y}
91-
: ${ENABLE_FAKE_PROC_NET:=y}
92-
fi
9378
: ${ENABLE_MONITOR:=y}
9479
: ${FORCE_COREFILES:=y}
9580

@@ -124,36 +109,15 @@ fi
124109
: ${VSWITCHD_VALGRIND_LOG:=}
125110
: ${VSWITCHD_VALGRIND_OPT:=}
126111

127-
# Config variables specific to ovs-brcompatd
128-
: ${BRCOMPATD_PIDFILE:=/var/run/openvswitch/ovs-brcompatd.pid}
129-
: ${BRCOMPATD_RUN_DIR:=/var/xen/openvswitch}
130-
: ${BRCOMPATD_PRIORITY:=-10}
131-
: ${BRCOMPATD_LOGFILE:=/var/log/openvswitch/ovs-brcompatd.log}
132-
: ${BRCOMPATD_FILE_LOGLEVEL:=INFO}
133-
: ${BRCOMPATD_SYSLOG_LOGLEVEL:=ERR}
134-
: ${BRCOMPATD_MEMLEAK_LOGFILE:=}
135-
: ${BRCOMPATD_STRACE_LOG:=}
136-
: ${BRCOMPATD_STRACE_OPT:=}
137-
: ${BRCOMPATD_VALGRIND_LOG:=}
138-
: ${BRCOMPATD_VALGRIND_OPT:=}
139-
140112
# Full paths to executables & modules
141113
ovsdb_server="/usr/sbin/ovsdb-server"
142114
ovsdb_tool="/usr/bin/ovsdb-tool"
143115
vswitchd="/usr/sbin/ovs-vswitchd"
144-
brcompatd="/usr/sbin/ovs-brcompatd"
145116
dpctl="/usr/bin/ovs-dpctl"
146117
appctl="/usr/bin/ovs-appctl"
147118
ofctl="/usr/bin/ovs-ofctl"
148119
vsctl="/usr/bin/ovs-vsctl"
149120

150-
if [ "$ENABLE_FAKE_PROC_NET" = "y" ]; then
151-
if [ "$ENABLE_BRCOMPAT" != "y" ]; then
152-
warning "FAKE_PROC_NET required BRCOMPAT which was disabled. Force enabling."
153-
ENABLE_BRCOMPAT="y"
154-
fi
155-
fi
156-
157121
if test "$ENABLE_MONITOR" = "y"; then
158122
monitor_opt="--monitor"
159123
else
@@ -189,15 +153,9 @@ function insert_modules_if_required {
189153
action "Inserting llc module" modprobe llc
190154
action "Inserting openvswitch module" modprobe openvswitch_mod
191155
fi
192-
if [ "$ENABLE_BRCOMPAT" = "y" ] && [ -n "$BRCOMPATD_PIDFILE" ] && ! lsmod | grep -q "brcompat_mod"; then
193-
action "Inserting brcompat module" modprobe brcompat_mod
194-
fi
195156
}
196157

197158
function remove_modules {
198-
if lsmod | grep -q "brcompat_mod"; then
199-
action "Removing brcompat module" rmmod brcompat_mod.ko
200-
fi
201159
if lsmod | grep -q "openvswitch_mod"; then
202160
action "Removing openvswitch module" rmmod openvswitch_mod.ko
203161
fi
@@ -280,26 +238,14 @@ function start_ovsdb_server {
280238
}
281239

282240
function start_vswitchd {
283-
local fake_proc_net_opt=
284-
if [ "$ENABLE_FAKE_PROC_NET" = "y" ]; then
285-
fake_proc_net_opt="--fake-proc-net"
286-
fi
287-
288241
local mlockall_opt=
289242
if [ "$VSWITCHD_MLOCKALL" != "no" ]; then
290243
mlockall_opt="--mlockall"
291244
fi
292245

293-
start_daemon VSWITCHD "$vswitchd" $fake_proc_net_opt $mlockall_opt \
294-
"$VSWITCHD_OVSDB_SERVER"
246+
start_daemon VSWITCHD "$vswitchd" $mlockall_opt "$VSWITCHD_OVSDB_SERVER"
295247
}
296248

297-
function start_brcompatd {
298-
start_daemon BRCOMPATD "$brcompatd" \
299-
--appctl-command="$appctl --target=/var/run/openvswitch/ovs-vswitchd.\`cat $VSWITCHD_PIDFILE\`.ctl %s" \
300-
"$VSWITCHD_OVSDB_SERVER"
301-
}
302-
303249
function stop_daemon {
304250
local DAEMON=$1
305251
local BINARY=$2
@@ -414,9 +360,6 @@ function start {
414360
set_system_ids
415361

416362
start_vswitchd
417-
if [ "${ENABLE_BRCOMPAT}" = "y" ] ; then
418-
start_brcompatd
419-
fi
420363

421364
if [ -f /etc/xensource-inventory ]; then
422365
# Start daemon to monitor external ids
@@ -429,7 +372,6 @@ function start {
429372
}
430373

431374
function stop {
432-
stop_daemon BRCOMPATD "$brcompatd"
433375
stop_daemon VSWITCHD "$vswitchd"
434376
stop_daemon OVSDB_SERVER "$ovsdb_server"
435377
if [ -e /var/run/openvswitch/ovs-external-ids.pid ]; then
@@ -510,20 +452,13 @@ case "$1" in
510452
shift
511453
strace -p $(cat "$VSWITCHD_PIDFILE") "$@"
512454
;;
513-
strace-brcompatd)
514-
shift
515-
strace -p $(cat "$BRCOMPATD_PIDFILE") "$@"
516-
;;
517455
status)
518456
status -p "$OVSDB_SERVER_PIDFILE" ovsdb-server &&
519-
status -p "$VSWITCHD_PIDFILE" ovs-vswitchd &&
520-
(test "$ENABLE_BRCOMPAT" != "y" ||
521-
status -p "$BRCOMPATD_PIDFILE" ovs-brcompatd)
457+
status -p "$VSWITCHD_PIDFILE" ovs-vswitchd
522458
;;
523459
version)
524460
/usr/sbin/ovsdb-server -V
525461
/usr/sbin/ovs-vswitchd -V
526-
/usr/sbin/ovs-brcompatd -V
527462
;;
528463
force-reload-kmod)
529464
force_reload_kmod

xenserver/etc_logrotate.d_openvswitch

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (C) 2009, 2010 Nicira Networks, Inc.
1+
# Copyright (C) 2009, 2010, 2011 Nicira Networks, Inc.
22
#
33
# Copying and distribution of this file, with or without modification,
44
# are permitted in any medium without royalty provided the copyright
@@ -16,8 +16,5 @@
1616
if [ -e /var/run/openvswitch/ovsdb-server.pid ]; then
1717
/usr/bin/ovs-appctl -t ovsdb-server vlog/reopen
1818
fi
19-
if [ -e /var/run/openvswitch/ovs-brcompatd.pid ]; then
20-
/usr/bin/ovs-appctl -t ovs-brcompatd vlog/reopen
21-
fi
2219
endscript
2320
}

xenserver/etc_profile.d_openvswitch.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (C) 2009, 2010 Nicira Networks, Inc.
1+
# Copyright (C) 2009, 2010, 2011 Nicira Networks, Inc.
22
#
33
# Copying and distribution of this file, with or without modification,
44
# are permitted in any medium without royalty provided the copyright
@@ -42,7 +42,7 @@ function monitorlogs {
4242
done
4343
grep="$grep'"
4444
fi
45-
cmd="tail -F /var/log/messages /var/log/openvswitch/ovs-vswitchd.log /var/log/openvswitch/ovs-brcompatd.log /var/log/openvswitch/ovsdb-server /var/log/xensource.log $grep | tee /var/log/monitorlogs.out"
45+
cmd="tail -F /var/log/messages /var/log/openvswitch/ovs-vswitchd.log /var/log/openvswitch/ovsdb-server /var/log/xensource.log $grep | tee /var/log/monitorlogs.out"
4646
printf "cmd: $cmd\n"
4747
eval "$cmd"
4848
}

xenserver/etc_xensource_scripts_vif

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,7 @@ remove_from_bridge()
145145
# Nothing to do
146146
;;
147147
openvswitch)
148-
# If ovs-brcompatd is running, it might already have deleted the
149-
# port. Use --if-exists to suppress the error that would otherwise
150-
# arise in that case.
151-
$vsctl --timeout=30 -- --if-exists del-port $dev
148+
$vsctl --timeout=30 -- del-port $dev
152149
;;
153150
esac
154151
}

xenserver/openvswitch-xen.spec

Lines changed: 5 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,6 @@ install -m 755 xenserver/etc_xensource_scripts_vif \
7575
$RPM_BUILD_ROOT/usr/share/openvswitch/scripts/vif
7676
install -m 755 xenserver/usr_share_openvswitch_scripts_ovs-external-ids \
7777
$RPM_BUILD_ROOT/usr/share/openvswitch/scripts/ovs-external-ids
78-
install -m 755 xenserver/usr_share_openvswitch_scripts_refresh-xs-network-uuids \
79-
$RPM_BUILD_ROOT/usr/share/openvswitch/scripts/refresh-xs-network-uuids
8078
install -m 755 xenserver/usr_sbin_xen-bugtool \
8179
$RPM_BUILD_ROOT/usr/share/openvswitch/scripts/xen-bugtool
8280
install -m 755 xenserver/usr_share_openvswitch_scripts_sysconfig.template \
@@ -111,77 +109,6 @@ install -d -m 755 $RPM_BUILD_ROOT/var/lib/openvswitch
111109
rm -rf $RPM_BUILD_ROOT
112110

113111
%post
114-
if [ ! -f /etc/xensource-inventory ]; then
115-
printf "XenSource inventory not present in /etc/xensource-inventory"
116-
exit 1
117-
fi
118-
. /etc/xensource-inventory
119-
120-
if [ "$1" = "1" ]; then
121-
if md5sum -c --status <<EOF
122-
ca141d60061dcfdade73e75abc6529b5 /usr/sbin/brctl
123-
b8e9835862ef1a9cec2a3f477d26c989 /etc/xensource/scripts/vif
124-
51970ad613a3996d5997e18e44db47da /opt/xensource/libexec/interface-reconfigure
125-
5654c8c36699fcc8744ca9cd5b855414 /usr/sbin/xen-bugtool
126-
EOF
127-
then
128-
printf "\nVerified host scripts from XenServer 5.5.0.\n\n"
129-
elif md5sum -c --status <<EOF
130-
ca141d60061dcfdade73e75abc6529b5 /usr/sbin/brctl
131-
b8e9835862ef1a9cec2a3f477d26c989 /etc/xensource/scripts/vif
132-
51970ad613a3996d5997e18e44db47da /opt/xensource/libexec/interface-reconfigure
133-
f6519085c2fc5f7bc4eccc294ed62000 /usr/sbin/xen-bugtool
134-
EOF
135-
then
136-
printf "\nVerified host scripts from XenServer 5.5.0-24648p (Update 1)\n"
137-
printf "or 5.5.0-25727p (Update 2).\n\n"
138-
elif md5sum -c --status <<EOF
139-
ca141d60061dcfdade73e75abc6529b5 /usr/sbin/brctl
140-
02cf136237ed85fcbcc1efc15ce0591c /opt/xensource/libexec/interface-reconfigure
141-
3a192ee70ebf2153c90051b3af95f331 /opt/xensource/libexec/InterfaceReconfigureBridge.py
142-
f71cadf1464caefa7943de0ab47fdd8a /opt/xensource/libexec/InterfaceReconfigure.py
143-
d70f08f235fb1bfd49a0580e440f15a0 /opt/xensource/libexec/InterfaceReconfigureVswitch.py
144-
f5c85ca825b1e6f5a0845530981cd836 /etc/xensource/scripts/vif
145-
facb851606f82ca2bcc760a4d91bbe33 /usr/sbin/xen-bugtool
146-
EOF
147-
then
148-
printf "\nVerified host scripts from XenServer 5.5.900-29381p.\n\n"
149-
else
150-
cat <<EOF
151-
152-
The original XenServer scripts replaced by this package are not those
153-
of any supported version of XenServer. This could lead to unexpected
154-
behavior of your server. Unless you are sure you know what you are
155-
doing, it is highly recommended that you remove this package
156-
immediately after the install completes, which will restore the
157-
XenServer scripts that you were previously using.
158-
159-
EOF
160-
fi
161-
fi
162-
163-
# On XenServer 5.5.0, we need refresh-xs-network-uuids to run whenever
164-
# XAPI starts or restarts. (On XenServer 5.6.0, XAPI calls the
165-
# "update" method of the vswitch-cfg-update plugin whenever it starts
166-
# or restarts, so this is no longer necessary.)
167-
if test "$PRODUCT_VERSION" = "5.5.0"; then
168-
RNU=/usr/share/openvswitch/scripts/refresh-xs-network-uuids
169-
XSS=/opt/xensource/libexec/xapi-startup-script
170-
if test -e $XSS && (test ! -L $XSS || test "`readlink $XSS`" != $RNU); then
171-
echo "$XSS is already in use, refusing to overwrite"
172-
exit 1
173-
fi
174-
rm -f $XSS
175-
ln -s $RNU $XSS
176-
177-
# If /etc/xensource/network.conf doesn't exist (it was added in 5.6.0),
178-
# then interface-reconfigure will be unhappy when we run it below.
179-
if test ! -e /etc/xensource/network.conf; then
180-
echo bridge > /etc/xensource/network.conf
181-
fi
182-
fi
183-
184-
185112
if test ! -e /var/xapi/network.dbcache; then
186113
if test "$1" = 1; then
187114
printf "Creating xapi database cache... "
@@ -302,12 +229,6 @@ fi
302229

303230
%postun
304231
if [ "$1" = "0" ]; then # $1 = 1 for upgrade
305-
. /etc/xensource-inventory
306-
if test "$PRODUCT_VERSION" = "5.5.0"; then
307-
XSS=/opt/xensource/libexec/xapi-startup-script
308-
rm -f $XSS
309-
fi
310-
311232
rm -f /usr/lib/xsconsole/plugins-base/XSFeatureVSwitch.pyc \
312233
/usr/lib/xsconsole/plugins-base/XSFeatureVSwitch.pyo
313234

@@ -344,13 +265,8 @@ if [ "$1" = "0" ]; then # $1 = 1 for upgrade
344265
rm -f /etc/openvswitch/vswitchd.cacert
345266
rm -f /var/xapi/network.dbcache
346267

347-
if test "$PRODUCT_VERSION" != "5.5.0"; then
348-
# Configure system to use bridge
349-
echo bridge > /etc/xensource/network.conf
350-
else
351-
# Get rid of network.conf entirely, to make the system pristine.
352-
rm -f /etc/xensource/network.conf
353-
fi
268+
# Configure system to use bridge
269+
echo bridge > /etc/xensource/network.conf
354270

355271
printf "\nYou MUST reboot the server now to complete the change to\n"
356272
printf "standard Xen networking. Attempts to modify networking on the\n"
@@ -367,7 +283,6 @@ fi
367283
/etc/logrotate.d/openvswitch
368284
/etc/profile.d/openvswitch.sh
369285
/lib/modules/%{xen_version}/kernel/extra/openvswitch/openvswitch_mod.ko
370-
/lib/modules/%{xen_version}/kernel/extra/openvswitch/brcompat_mod.ko
371286
/usr/share/openvswitch/python/ovs/__init__.py
372287
/usr/share/openvswitch/python/ovs/daemon.py
373288
/usr/share/openvswitch/python/ovs/db/__init__.py
@@ -391,7 +306,6 @@ fi
391306
/usr/share/openvswitch/python/ovs/util.py
392307
/usr/share/openvswitch/python/uuid.py
393308
/usr/share/openvswitch/scripts/ovs-external-ids
394-
/usr/share/openvswitch/scripts/refresh-xs-network-uuids
395309
/usr/share/openvswitch/scripts/interface-reconfigure
396310
/usr/share/openvswitch/scripts/InterfaceReconfigure.py
397311
/usr/share/openvswitch/scripts/InterfaceReconfigureBridge.py
@@ -401,7 +315,6 @@ fi
401315
/usr/share/openvswitch/scripts/sysconfig.template
402316
/usr/share/openvswitch/scripts/ovs-save
403317
/usr/share/openvswitch/vswitch.ovsschema
404-
/usr/sbin/ovs-brcompatd
405318
/usr/sbin/ovs-vswitchd
406319
/usr/sbin/ovsdb-server
407320
/usr/bin/ovs-appctl
@@ -419,7 +332,6 @@ fi
419332
/usr/share/man/man1/ovsdb-tool.1.gz
420333
/usr/share/man/man5/ovs-vswitchd.conf.db.5.gz
421334
/usr/share/man/man8/ovs-appctl.8.gz
422-
/usr/share/man/man8/ovs-brcompatd.8.gz
423335
/usr/share/man/man8/ovs-dpctl.8.gz
424336
/usr/share/man/man8/ovs-ofctl.8.gz
425337
/usr/share/man/man8/ovs-parse-leaks.8.gz
@@ -429,7 +341,10 @@ fi
429341
/usr/share/man/man8/ovs-vsctl.8.gz
430342
/usr/share/man/man8/ovs-vswitchd.8.gz
431343
/var/lib/openvswitch
344+
%exclude /lib/modules/%{xen_version}/kernel/extra/openvswitch/brcompat_mod.ko
432345
%exclude /usr/lib/xsconsole/plugins-base/*.py[co]
346+
%exclude /usr/sbin/ovs-brcompatd
347+
%exclude /usr/share/man/man8/ovs-brcompatd.8.gz
433348
%exclude /usr/share/openvswitch/scripts/*.py[co]
434349
%exclude /usr/share/openvswitch/python/*.py[co]
435350
%exclude /usr/share/openvswitch/python/ovs/*.py[co]

0 commit comments

Comments
 (0)