xensource: Add kluge to make interface-reconfigure work better.
authorBen Pfaff <blp@nicira.com>
Fri, 11 Dec 2009 00:43:10 +0000 (16:43 -0800)
committerBen Pfaff <blp@nicira.com>
Fri, 11 Dec 2009 00:43:10 +0000 (16:43 -0800)
This change makes xsconsole able to reconfigure the management interface
on some XenServer hosts.  It's not clear why it is needed--apparently
xapi is creating the bridge behind our back.

xenserver/opt_xensource_libexec_interface-reconfigure

index 8119ee86e6eb8700a72c3dbd355383267aa2753d..9a3ef822308686c1ecdcf9bec9d1293cdecd6b18 100755 (executable)
@@ -1375,6 +1375,9 @@ def configure_datapath(pif):
         if len(offload):
             run_command(['/sbin/ethtool', '-K', dev] + offload)
 
+    # XXX It seems like the following should not be necessary...
+    cfgmod_argv += ['--', '--if-exists', 'del-br', bridge]
+                    
     if pif_is_vlan(pif):
         datapath = pif_datapath(pif)
         vlan = db.get_pif_record(pif)['VLAN']