[developer] Need a manual way to automatically discover virtual interfaces / bridges

Bug #1508746 reported by Andres Rodriguez on 2015-10-22
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

Now that MAAS only automatically discovers physical interfaces, vlan interfaces and bonds, we need a way for maas to automatically create virbr0/br0 interfaces as this is very helpful for developers.

Related branches

Changed in maas:
milestone: none → 1.9.0
importance: Undecided → High
summary: - [develper] Need a manual way to automatically discover virtual
+ [developer] Need a manual way to automatically discover virtual
interfaces / bridges
Mike Pontillo (mpontillo) wrote :

I'm not convinced we need another code change for this. Since this is for a dev/test use case, can't you just automate this with a script to call the API?

It would be possible to have an option to customize the filtering. But it would be likely that by the time "apt-get install" is finished and the default cluster registers with the region, it's too late to modify a special setting for this. (Unless no interfaces are being added at all; that's the only time re-registering causes any changes.)

I think the real solution to this is to separate state from configuration in the database. That is, when the state of the cluster interfaces is discovered and presented to MAAS, nothing should be configured (and thus become "configuration" rather than "state") until the user approves it. Right now, discovered interfaces are entered *directly* into the configuration, and *that* is the root cause of this bug. (you could compare this to, if you install BIND for the first time, if the first time you ran the daemon it suddenly decided to rewrite a bunch of your configuration files in /etc - that would be just plain wrong!)

Changed in maas:
status: New → Opinion
Mike Pontillo (mpontillo) wrote :

I'm actually thinking of fixing this as part of bug #1505030, to some extent.

If we want to intelligently create fabrics, we need to make sure we don't create more than one fabric if we find (for example) a bridge or bond interface composed of (for example) eth1 and eth2.

That means we can actually infer whether or not we should include a bridge, based on whether or not the bridge is backed by a physical interface! I think bridges for LXCs and/or virtual machines will not be backed by a physical Ethernet interface, whereas a managed bridge will include at least one physical interface.

This still may not solve your issue, if you're creating a bridge interface on your development cluster interface solely for managing virtual machines.

Mike Pontillo (mpontillo) wrote :

My latest iteration for bug #1505030 includes bridge interfaces if they meet at least one of the following two conditions:

(1) It is bridging at least one physical Ethernet interface
(2) A VLAN interface depends on it

I think we need (1) because we can assume that admins who create a bridge interface and add a physical interface to it are using the bridge in conjunction with physical hardware which they might want to manage with MAAS. We need (2) because by pulling the VLAN into MAAS, we also need the underlying interface, otherwise we won't have a subnet on the "untagged" VLAN.

Changed in maas:
assignee: nobody → Mike Pontillo (mpontillo)
status: Opinion → In Progress
Andres Rodriguez (andreserl) wrote :

I don't think this solves the issue I have because here's the thing.

1. I have virbr0 which is a virtual bridge that i use for my development testing.
2. Whenever I add a cluster interface in the UI, I have to manually input virbr0 as the interface, the IP address, etc etc.
3. However, provided that the cluster could parse that information and send it to the region, I could simply display a drop down meny saying:

virbr0, virbr1, virbr2 as options to add a new clsuter interface. And if the interface is not there, I can manually add it.

Andres Rodriguez (andreserl) wrote :

This would allow to autofill some fields

Changed in maas:
status: In Progress → Opinion
Changed in maas:
assignee: Mike Pontillo (mpontillo) → nobody
Mike Pontillo (mpontillo) wrote :

Okay; when the linked branch lands there will be a "manual way to automatically discover" bridges (basically a workaround); all you need to do is make sure they are bridged to a physical interface, or add a VLAN interface on top of them.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers