xenserver: Fix issue with deleting network UUID on VLAN destruction
authorJustin Pettit <jpettit@nicira.com>
Wed, 4 Nov 2009 05:19:47 +0000 (21:19 -0800)
committerJustin Pettit <jpettit@nicira.com>
Wed, 4 Nov 2009 05:46:29 +0000 (21:46 -0800)
In XenServer, a VLAN is considered an additional network with its own
UUID.  The interface-reconfigure script properly adds this network UUID
to the configuration script, but commit 774428 removed the code that
would remove this information on VLAN destruction.  Ian Campbell was the
author of that commit and felt that reverting this part was safe.

Bug #1973

xenserver/opt_xensource_libexec_interface-reconfigure

index 82c386368e4abe23d70aa2eb723921d93bf95dc4..59036a561fc29e3555446f1398d21ad3b39717e3 100755 (executable)
@@ -1518,10 +1518,10 @@ def action_down(pif):
     ifdown(ipdev)
 
     if dp:
-        #nw = db.get_pif_record(pif)['network']
-        #nwrec = db.get_network_record(nw)
-        #cfgmod_argv += ['# deconfigure xs-network-uuids']
-        #cfgmod_argv += ['--del-entry=bridge.%s.xs-network-uuids=%s' % (bridge,nwrec['uuid'])]
+        nw = db.get_pif_record(pif)['network']
+        nwrec = db.get_network_record(nw)
+        cfgmod_argv += ['# deconfigure xs-network-uuids']
+        cfgmod_argv += ['--del-entry=bridge.%s.xs-network-uuids=%s' % (bridge,nwrec['uuid'])]
 
         log("deconfigure ipdev %s on %s" % (ipdev,bridge))
         cfgmod_argv += ["# deconfigure ipdev %s" % ipdev]