X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=inline;f=xenserver%2Fopt_xensource_libexec_interface-reconfigure;h=ff4b97669c12caa7fe2f2e361546c518c33037bb;hb=fe1e967e3bc6c04f773b150fbb358b2350d0ad8c;hp=f756bab7bc30350a26912766b071ca1eb667a5af;hpb=9a2b11752774a3d340e3f03293efcdc3e18b8fb5;p=openvswitch
diff --git a/xenserver/opt_xensource_libexec_interface-reconfigure b/xenserver/opt_xensource_libexec_interface-reconfigure
index f756bab7..ff4b9766 100755
--- a/xenserver/opt_xensource_libexec_interface-reconfigure
+++ b/xenserver/opt_xensource_libexec_interface-reconfigure
@@ -204,6 +204,8 @@ def ifup(netdev):
#
def pif_rename_physical_devices(pif):
+ if pif_is_tunnel(pif):
+ return
if pif_is_vlan(pif):
pif = pif_get_vlan_slave(pif)
@@ -415,7 +417,7 @@ def action_up(pif, force):
pifrec = db().get_pif_record(pif)
ipdev = pif_ipdev_name(pif)
- dp = DatapathFactory(pif)
+ dp = DatapathFactory()(pif)
log("action_up: %s" % ipdev)
@@ -455,7 +457,7 @@ def action_up(pif, force):
def action_down(pif):
ipdev = pif_ipdev_name(pif)
- dp = DatapathFactory(pif)
+ dp = DatapathFactory()(pif)
log("action_down: %s" % ipdev)
@@ -463,6 +465,9 @@ def action_down(pif):
dp.bring_down()
+def action_rewrite():
+ DatapathFactory().rewrite()
+
# This is useful for reconfiguring the mgmt interface after having lost connectivity to the pool master
def action_force_rewrite(bridge, config):
def getUUID():
@@ -522,6 +527,8 @@ def action_force_rewrite(bridge, config):
f.write('\t\t\n')
f.write('\t\tOpaqueRef:NULL\n')
f.write('\t\t-1\n')
+ f.write('\t\t\n')
+ f.write('\t\t\n')
f.write('\t\t%s\n' % interface)
f.write('\t\t%s\n' % mac)
f.write('\t\t\n')
@@ -666,7 +673,7 @@ def main(argv=None):
pif = db().get_pif_by_uuid(pif_uuid)
if action == "rewrite":
- pass
+ action_rewrite()
else:
if not pif:
raise Usage("No PIF given")