aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2009-09-28 16:03:49 -0700
committerBen Pfaff <blp@nicira.com>2009-09-28 16:03:49 -0700
commit2b71f0116078b38b2bee0538b4633e19996badfe (patch)
tree044f291d9574a67a2b9d5b15f9ba241507d04f38
parent36becebea2d1e816a636d62a226521d0bf26bb18 (diff)
xenserver: Add script refresh-xs-network-uuids.
On pool join, the bridge.<bridge>.xs-network-uuids key is not updated properly for the primary management interface. We don't have a proper fix for this problem yet, and probably won't ever have one for XenServer 5.5.0, so this commit adds a script that works around the problem. Running the script is a shortcut for rebooting the XenServer host, which should also solve the problem. Bug #2097.
-rw-r--r--xenserver/README6
-rw-r--r--xenserver/automake.mk1
-rwxr-xr-xxenserver/root_vswitch_scripts_refresh-xs-network-uuids12
-rw-r--r--xenserver/vswitch-xen.spec3
4 files changed, 22 insertions, 0 deletions
diff --git a/xenserver/README b/xenserver/README
index 276cd6c2..5407aac9 100644
--- a/xenserver/README
+++ b/xenserver/README
@@ -50,6 +50,12 @@ files are:
needed by the controller. This is called by the "vif" script,
which is run when virtual interfaces are added and removed.
+ root_vswitch_scripts_refresh-xs-network-uuids
+
+ Script to refresh bridge.<bridge>.xs-network-uuids keys, which
+ can get out-of-sync following a pool join. Running this script
+ is an alternative to rebooting the host.
+
root_vswitch_scripts_sysconfig.template
Template for vswitch's /etc/sysconfig/vswitch configuration
diff --git a/xenserver/automake.mk b/xenserver/automake.mk
index deb79bc8..4c9c0a97 100644
--- a/xenserver/automake.mk
+++ b/xenserver/automake.mk
@@ -16,6 +16,7 @@ EXTRA_DIST += \
xenserver/opt_xensource_libexec_interface-reconfigure \
xenserver/root_vswitch_scripts_sysconfig.template \
xenserver/root_vswitch_scripts_dump-vif-details \
+ xenserver/root_vswitch_scripts_refresh-xs-network-uuids \
xenserver/usr_lib_xsconsole_plugins-base_XSFeatureVSwitch.py \
xenserver/usr_sbin_brctl \
xenserver/usr_sbin_xen-bugtool \
diff --git a/xenserver/root_vswitch_scripts_refresh-xs-network-uuids b/xenserver/root_vswitch_scripts_refresh-xs-network-uuids
new file mode 100755
index 00000000..34fe1e7e
--- /dev/null
+++ b/xenserver/root_vswitch_scripts_refresh-xs-network-uuids
@@ -0,0 +1,12 @@
+#! /bin/sh
+
+. /etc/xensource-inventory
+
+for pif in $(xe pif-list --minimal host-uuid=${INSTALLATION_UUID} currently-attached=true VLAN=-1 | sed 's/,/ /g'); do
+ printf "Refreshing PIF %s... " $pif
+ if /opt/xensource/libexec/interface-reconfigure --pif-uuid=$pif up; then
+ printf "done\n"
+ else
+ printf "error!\n"
+ fi
+done
diff --git a/xenserver/vswitch-xen.spec b/xenserver/vswitch-xen.spec
index b186e264..01f49f6d 100644
--- a/xenserver/vswitch-xen.spec
+++ b/xenserver/vswitch-xen.spec
@@ -67,6 +67,8 @@ install -m 755 xenserver/etc_xensource_scripts_vif \
$RPM_BUILD_ROOT%{_prefix}/scripts/vif
install -m 755 xenserver/root_vswitch_scripts_dump-vif-details \
$RPM_BUILD_ROOT%{_prefix}/scripts/dump-vif-details
+install -m 755 xenserver/root_vswitch_scripts_refresh-xs-network-uuids \
+ $RPM_BUILD_ROOT%{_prefix}/scripts/refresh-xs-network-uuids
install -m 755 xenserver/usr_sbin_xen-bugtool \
$RPM_BUILD_ROOT%{_prefix}/scripts/xen-bugtool
install -m 755 xenserver/usr_sbin_brctl \
@@ -329,6 +331,7 @@ fi
/root/vswitch/kernel_modules/openvswitch_mod.ko
/root/vswitch/kernel_modules/veth_mod.ko
/root/vswitch/scripts/dump-vif-details
+/root/vswitch/scripts/refresh-xs-network-uuids
/root/vswitch/scripts/interface-reconfigure
/root/vswitch/scripts/vif
/root/vswitch/scripts/xen-bugtool