From: Ben Pfaff Date: Thu, 21 May 2009 20:25:40 +0000 (-0700) Subject: xenserver: Remove bridge configuration files when they become stale. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=50c8c6eb441f47f1e285c9f2872be9957bf256dd;p=openvswitch xenserver: Remove bridge configuration files when they become stale. interface-reconfigure communicates with the vif script using files in /etc/openvswitch, but it didn't delete them when they were stale. This commit fixes the problem. --- diff --git a/xenserver/opt_xensource_libexec_interface-reconfigure b/xenserver/opt_xensource_libexec_interface-reconfigure index 3b99820f..3de1099d 100755 --- a/xenserver/opt_xensource_libexec_interface-reconfigure +++ b/xenserver/opt_xensource_libexec_interface-reconfigure @@ -842,6 +842,11 @@ def action_up(pif): f.close() f.apply() f.commit() + else: + try: + os.unlink("%s/br-%s" % (vswitch_config_dir, bridge)) + except OSError: + pass if bond_master: argv += configure_bond(bond_master) modify_config(argv)