--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 xs-network-uuids 99be2da4-6c33-6f8e-49ea-3bc592fe3c85;45cbbb43-113d-a712-3231-c6463f253cef
+ br-set-external-id xapi1 xs-network-uuids 45cbbb43-113d-a712-3231-c6463f253cef;99be2da4-6c33-6f8e-49ea-3bc592fe3c85
/sbin/ifup xapi1
action_up: bring up bond0
/sbin/ifconfig bond0 up
--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 xs-network-uuids 99be2da4-6c33-6f8e-49ea-3bc592fe3c85;45cbbb43-113d-a712-3231-c6463f253cef
+ br-set-external-id xapi1 xs-network-uuids 45cbbb43-113d-a712-3231-c6463f253cef;99be2da4-6c33-6f8e-49ea-3bc592fe3c85
--if-exists del-br xapi2
--may-exist add-br xapi2 xapi1 4
- br-set-external-id xapi2 xs-network-uuids 99be2da4-6c33-6f8e-49ea-3bc592fe3c85;45cbbb43-113d-a712-3231-c6463f253cef
+ br-set-external-id xapi2 xs-network-uuids 45cbbb43-113d-a712-3231-c6463f253cef;99be2da4-6c33-6f8e-49ea-3bc592fe3c85
set Interface xapi2 MAC="00:22:19:22:4b:af"
/sbin/ifup xapi2
action_up: bring up bond0
# log("Network PIF %s not currently attached (%s)" % (rec['uuid'],pifrec['uuid']))
# continue
nwrec = db().get_network_record(rec['network'])
- xs_network_uuids += [nwrec['uuid']]
+
+ uuid = nwrec['uuid']
+ if pif_is_vlan(nwpif):
+ xs_network_uuids.append(uuid)
+ else:
+ xs_network_uuids.insert(0, uuid)
vsctl_argv = []
vsctl_argv += ['# configure xs-network-uuids']
def update_bridge_id(name, ids):
id = get_bridge_id(name, ids.get("xs-network-uuids"))
- if ids.get("bridge-id") != id and id:
- set_external_id("Bridge", name, "bridge-id", id)
+
+ if not id:
+ return
+
+ primary_id = id.split(";")[0]
+
+ if ids.get("bridge-id") != primary_id:
+ set_external_id("Bridge", name, "bridge-id", primary_id)
def update_iface_id(name, ids):
id = get_iface_id(name, ids.get("xs-vif-uuid"))