[ovs-dev] [PATCH 1/3] xenserver: Make refresh-network-uuids use "interface-reconfigure rewrite".

Ben Pfaff blp at nicira.com
Fri Jun 4 12:47:45 PDT 2010


Commit 823c5699 "interface-reconfigure: callout to datapath backend class
method on rewrite" changed "interface-reconfigure write" to do what
refresh-network-uuids does.  We can't entirely get rid of
refresh-network-uuids, so this commit rewrites it as a trivial wrapper
around interface-reconfigure.
---
 xenserver/README                                   |    5 +--
 ...share_openvswitch_scripts_refresh-network-uuids |   23 +------------------
 2 files changed, 4 insertions(+), 24 deletions(-)

diff --git a/xenserver/README b/xenserver/README
index 255e5e6..93be526 100644
--- a/xenserver/README
+++ b/xenserver/README
@@ -51,9 +51,8 @@ files are:
 
     usr_share_openvswitch_scripts_refresh-network-uuids
 
-        Script to refresh bridge.<bridge>.network-uuids keys, which
-        can get out-of-sync following a pool join.  Running this script
-        is an alternative to rebooting the host.
+        Script to refresh Bridge table external-ids:network-uuids
+        values, which can get out-of-sync following a pool join.
 
     usr_share_openvswitch_scripts_sysconfig.template
 
diff --git a/xenserver/usr_share_openvswitch_scripts_refresh-network-uuids b/xenserver/usr_share_openvswitch_scripts_refresh-network-uuids
index 55a8ba8..42ebe06 100755
--- a/xenserver/usr_share_openvswitch_scripts_refresh-network-uuids
+++ b/xenserver/usr_share_openvswitch_scripts_refresh-network-uuids
@@ -1,21 +1,2 @@
-#! /usr/bin/python
-
-import sys
-sys.path.insert(0, "/opt/xensource/libexec")
-from InterfaceReconfigure import *
-from InterfaceReconfigureVswitch import *
-
-db_init_from_xenapi(None)
-
-vsctl_argv = []
-for pif in db().get_all_pifs():
-    pifrec = db().get_pif_record(pif)
-    if not pif_is_vlan(pif) and pifrec['currently_attached']:
-        vsctl_argv += set_br_external_ids(pif)
-
-#log("modifying configuration:")
-#for c in vsctl_argv:
-#    log("  %s" % c)
-
-if vsctl_argv != []:
-    datapath_modify_config(vsctl_argv)
+#! /bin/sh
+exec /opt/xensource/libexec/interface-reconfigure rewrite
-- 
1.7.1





More information about the dev mailing list