--with-iface --if-exists del-port eth2
--may-exist add-br xenbr2
--may-exist add-port xenbr2 eth2
+ set Bridge xenbr2 other-config:hwaddr="00:15:17:a0:29:80"
br-set-external-id xenbr2 network-uuids d08c8749-0c8f-9e8d-ce25-fd364661ee99
- set Interface xenbr2 MAC="00:15:17:a0:29:80"
/sbin/ifup xenbr2
/sbin/update-issue
Committing changes to /etc/sysconfig/network-scripts/route-xenbr2 configuration
--with-iface --if-exists del-port eth3
--may-exist add-br xenbr3
--may-exist add-port xenbr3 eth3
+ set Bridge xenbr3 other-config:hwaddr="00:15:17:a0:29:81"
br-set-external-id xenbr3 network-uuids 2902ae1b-8013-897a-b697-0b200ea3aaa5;db7bdc03-074d-42ae-fc73-9b06de1d57f6
- set Interface xenbr3 MAC="00:15:17:a0:29:81"
--if-exists del-br xapi3
--may-exist add-br xapi3 xenbr3 123
br-set-external-id xapi3 network-uuids 2902ae1b-8013-897a-b697-0b200ea3aaa5;db7bdc03-074d-42ae-fc73-9b06de1d57f6
--with-iface --if-exists del-port bond0
--fake-iface add-bond xapi1 bond0 eth0 eth1
set Port bond0 MAC="00:22:19:22:4b:af" bond_downdelay=200 other-config:"bond-miimon"=100 other-config:"bond-use_carrier"=1 other-config:"bond-mode"="balance-slb" bond_updelay=31000
+ set Bridge xapi1 other-config:hwaddr="00:22:19:22:4b:af"
br-set-external-id xapi1 network-uuids 99be2da4-6c33-6f8e-49ea-3bc592fe3c85;45cbbb43-113d-a712-3231-c6463f253cef
- set Interface xapi1 MAC="00:22:19:22:4b:af"
/sbin/ifup xapi1
action_up: bring up bond0
/sbin/ifconfig bond0 up
--with-iface --if-exists del-port bond0
--fake-iface add-bond xapi1 bond0 eth0 eth1
set Port bond0 MAC="00:22:19:22:4b:af" bond_downdelay=200 other-config:"bond-miimon"=100 other-config:"bond-use_carrier"=1 other-config:"bond-mode"="balance-slb" bond_updelay=31000
+ set Bridge xapi1 other-config:hwaddr="00:22:19:22:4b:af"
br-set-external-id xapi1 network-uuids 99be2da4-6c33-6f8e-49ea-3bc592fe3c85;45cbbb43-113d-a712-3231-c6463f253cef
- set Interface xapi1 MAC="00:22:19:22:4b:af"
--if-exists del-br xapi2
--may-exist add-br xapi2 xapi1 4
br-set-external-id xapi2 network-uuids 99be2da4-6c33-6f8e-49ea-3bc592fe3c85;45cbbb43-113d-a712-3231-c6463f253cef
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]
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
#
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.
# 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)
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