[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-API] [PATCH 6 of 7] [PATCH] xenserver: Ensure that Bridge.other-config:hwaddr and Interface.MAC are set as appropriate
# HG changeset patch # User Ian Campbell <ian.campbell@xxxxxxxxxx> # Date 1278595887 -3600 # Node ID 3b8f86be50f280a34d78e5e24e98d30620ecc551 # Parent 6e16272df854306c6931c4ed1f022c90cebfb430 [PATCH] xenserver: Ensure that Bridge.other-config:hwaddr and Interface.MAC are set as appropriate. >From 16f2ae571fc7d21f13c9ddbe4e948d8f35552ae5 Mon Sep 17 00:00:00 2001 Date: Fri, 26 Mar 2010 09:35:32 -0700 Otherwise bridges can end up with a generated MAC address using Nicira OID which has an impact when using DHCP on that devices. tests/interface-reconfigure.at updated by Ben Pfaff. Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx> Signed-off-by: Ben Pfaff <blp@xxxxxxxxxx> --- tests/interface-reconfigure.at | 8 ++++---- ...ensource_libexec_InterfaceReconfigureVswitch.py | 17 ++++++++++++----- 2 files changed, 16 insertions(+), 9 deletions(-) diff -r 6e16272df854 -r 3b8f86be50f2 scripts/InterfaceReconfigureVswitch.py --- a/scripts/InterfaceReconfigureVswitch.py Thu Jul 08 14:31:26 2010 +0100 +++ b/scripts/InterfaceReconfigureVswitch.py Thu Jul 08 14:31:27 2010 +0100 @@ -297,6 +297,10 @@ vsctl_argv += ['# add physical device %s' % iface] vsctl_argv += ['--', '--may-exist', 'add-port', bridge, iface] + vsctl_argv += ['# configure Bridge MAC'] + vsctl_argv += ['--', 'set', 'Bridge', bridge, + 'other-config:hwaddr=%s' % vsctl_escape(db().get_pif_record(pif)['MAC'])] + vsctl_argv += set_br_external_ids(pif) vsctl_argv += ['## done configuring datapath %s' % bridge] @@ -337,10 +341,6 @@ vsctl_argv += ['--', 'br-set-external-id', pif_bridge_name(pif), 'network-uuids', ';'.join(xs_network_uuids)] - vsctl_argv += ['# configure MAC'] - vsctl_argv += ['--', 'set', 'Interface', pif_ipdev_name(pif), - 'MAC=%s' % vsctl_escape(dprec['MAC'])] - return vsctl_argv # @@ -374,6 +374,8 @@ vsctl_argv += c extra_ports += e + dpname = pif_bridge_name(self._dp) + if pif_is_vlan(self._pif): # XXX this is only needed on XS5.5, because XAPI misguidedly # creates the fake bridge (via bridge ioctl) before it calls us. @@ -382,7 +384,7 @@ # configure_datapath() set up the underlying datapath bridge. # Stack a VLAN bridge on top of it. vsctl_argv += ['--', '--may-exist', 'add-br', - bridge, pif_bridge_name(self._dp), pifrec['VLAN']] + bridge, dpname, pifrec['VLAN']] vsctl_argv += set_br_external_ids(self._pif) @@ -392,6 +394,11 @@ vsctl_argv += ["# reconfigure ipdev %s" % ipdev] vsctl_argv += ['--', 'add-port', bridge, ipdev] + if ipdev != dpname: + vsctl_argv += ['# configure Interface MAC'] + vsctl_argv += ['--', 'set', 'Interface', pif_ipdev_name(self._pif), + 'MAC=%s' % vsctl_escape(dprec['MAC'])] + self._vsctl_argv = vsctl_argv self._extra_ports = extra_ports scripts/InterfaceReconfigureVswitch.py | 17 ++++++++++++----- 1 files changed, 12 insertions(+), 5 deletions(-) Attachment:
txtqwme_bEHbH.txt _______________________________________________ xen-api mailing list xen-api@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/mailman/listinfo/xen-api
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |