[one-users] V4.4: Bridge Configuration/physical device attach in VLAN driver on existing bridge

Michael Kutzner michael.kutzner at virtion.de
Fri Dec 13 02:02:54 PST 2013


Hello,

we had some problems in the past deploying VMs when a bridge interface was
already existing (static configuration e.g.) using a different interface as 
physical than defined in the virtual network in ON.

Example:
- A bridge br10 was existing with a local interface eth0 attached.
- The virtual network in opennebula was configured to use eth1.
  (due to some historical or physical reasons eth0 was used on that host
  and the bridge was „preconfigured“)

The ON driver (opennebula-4.4.0/src/vnm_mad/remotes/802.1Q/HostManaged.rb)
now checks the following:
- bridge exists: no, create bridge
  This works fine as the bridge is already existing
- device is attached?
  No, attach it (so we have eth0 and eth1 attached to the bridge interface afterwards)
  This leads to some small (or bigger) problems (e.g. creating a loop on the switches and making
  the network practically unusable).

Attached you find a small patch which does the following:
- bridge exists?
  Yes, do nothing
- no: create bridge, add interface

This will also cover the scenario that you can change the physical device in the virtual
network definition after having deployed certain VMs.

Hopefully I did it right and made the changes in the right place.

I dont know, if anybody else had that problem, but I wanted to share this information.

Best, Michael

-------------- next part --------------
A non-text attachment was scrubbed...
Name: diff.8021q_bridge
Type: application/octet-stream
Size: 1424 bytes
Desc: not available
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20131213/cfe20d65/attachment-0001.obj>


More information about the Users mailing list