From 7b09e42666aa1d345d44c112ff7f74ac8f030297 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Tue, 9 Feb 2010 11:17:16 -0800 Subject: [PATCH] xenserver: Fix failure to bring up secondary management interfaces. When a secondary management interface is configured on a XenServer, interface-reconfigure would fail to bring it up because it would attempt to add a bridge that already exists. This commit makes it tolerate that situation. --- .../opt_xensource_libexec_InterfaceReconfigureVswitch.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/xenserver/opt_xensource_libexec_InterfaceReconfigureVswitch.py b/xenserver/opt_xensource_libexec_InterfaceReconfigureVswitch.py index 690475317..006cc99fc 100644 --- a/xenserver/opt_xensource_libexec_InterfaceReconfigureVswitch.py +++ b/xenserver/opt_xensource_libexec_InterfaceReconfigureVswitch.py @@ -1,5 +1,5 @@ # Copyright (c) 2008,2009 Citrix Systems, Inc. -# Copyright (c) 2009 Nicira Networks. +# Copyright (c) 2009,2010 Nicira Networks. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published @@ -265,9 +265,9 @@ def configure_datapath(pif, parent=None, vlan=None): vsctl_argv += datapath_deconfigure_physical(dev) if parent and datapath: - vsctl_argv += ['--', 'add-br', bridge, parent, vlan] + vsctl_argv += ['--', '--may-exist', 'add-br', bridge, parent, vlan] else: - vsctl_argv += ['--', 'add-br', bridge] + vsctl_argv += ['--', '--may-exist', 'add-br', bridge] if len(physical_devices) > 1: vsctl_argv += ['# deconfigure bond %s' % pif_netdev_name(pif)] @@ -278,7 +278,7 @@ def configure_datapath(pif, parent=None, vlan=None): else: iface = pif_netdev_name(physical_devices[0]) vsctl_argv += ['# add physical device %s' % iface] - vsctl_argv += ['--', 'add-port', bridge, iface] + vsctl_argv += ['--', '--may-exist', 'add-port', bridge, iface] return vsctl_argv,extra_up_ports -- 2.45.2