[2.1+] Cannot create a bridge on an interface that also has VLAN interfaces

Bug #1661203 reported by Hamza
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
High
Mike Pontillo
curtin
Invalid
Undecided
Unassigned

Bug Description

Hi,

Context:

Ubuntu: 16.04.1
MAAS: 2.1.3

After deploying some nodes with the LACP bond i found that the network interfaces that make up the bonding also got the settings of the LACP, like this:
http://paste.openstack.org/show/597325/

I can provide you with any further details if needed.

Thank you,
Hamza

Related branches

Revision history for this message
Ryan Harper (raharper) wrote :

Hi,

Thanks for filing a bug.

Are you experiencing any networking issues with the above configuration or is your question about the format of the output?

If networking isn't functioning, please describe what's not working.

As for the formatting of the stanzas, that is by design. The ifenslave documentation mentions that in the case that if the master interface is not available, the bond will be setup with bond-* options on the slaves; thus to ensure the correct bond configuration, the slaves should include the same bond-options as the master.

From: /usr/share/doc/ifenslave/README.Debian.gz

"You can set additional bonding options by adding them to the interface
section:

        bond-mode active-backup

This would run the bonding device in active backup mode with eth0 as primary.

If the master interface is not available at the time the first slave is setup,
it will be created and setup according to bond-* options in the *slave* stanza.
For this reason, in order to get consistent results, the values of all the
bond-* options should normally be identical in the master stanza and in all the
possible slave stanzas. However, there exists some good reasons to have
different options in different stanza, for example, to change the primary slave
when hotpluging a new slave.
"

Changed in curtin:
status: New → Incomplete
Changed in maas:
status: New → Invalid
Revision history for this message
Hamza (h16mara) wrote :

Ryan Thank you for your clarification. My networking works fine so far i was referring to the output format. I never saw it before i thought it is not the expected behavior.

But i noticed something else a bit relevant. If we apply my networking scenario which consists of
1. creating one LACP bond ("bond0")
2. creating two network VLAN interfaces on the bond ("bond0.10, bond0.20")
3. creating two network bridge each on one network VLAN ("br-mgmt, br-storage")

Using MAAS UI or CLI works fine but if i want to add another bridge directly on the bond ("bond0") MAAS will deny it:

parent=$(maas $maas_profile interfaces read $system_id|jq -r --arg name "bond0" '.[] | if .name == $name then .id else empty end')
vlan_id=$(maas $maas_profile interfaces read dbcb8d|jq -r --arg name "bond0" '.[] | if .name == $name then .vlan.id else empty end')
maas $maas_profile interfaces create-bridge $system_id name=$bridge vlan=$vlan_id parent=$parent mtu=9000

if i correctly remember the error message is (i cannot apply the above commands because the nodes are on deployed state now):

[error: interface already in use]

I think you can easily check this use case and i think it would be helpful to have additional bridges on an interface that is already connected to VLAN interfaces

Thank you,
Hamza

Revision history for this message
Ryan Harper (raharper) wrote : Re: [Bug 1661203] Re: LACP bonding resulted in uncorrect settings of the primary interfaces

On Fri, Feb 3, 2017 at 2:47 AM, Hamza <email address hidden> wrote:

> Ryan Thank you for your clarification. My networking works fine so far i
> was referring to the output format. I never saw it before i thought it
> is not the expected behavior.
>
> But i noticed something else a bit relevant. If we apply my networking
> scenario which consists of
> 1. creating one LACP bond ("bond0")
> 2. creating two network VLAN interfaces on the bond ("bond0.10, bond0.20")
> 3. creating two network bridge each on one network VLAN ("br-mgmt,
> br-storage")
>
> Using MAAS UI or CLI works fine but if i want to add another bridge
> directly on the bond ("bond0") MAAS will deny it:
>
> parent=$(maas $maas_profile interfaces read $system_id|jq -r --arg name
> "bond0" '.[] | if .name == $name then .id else empty end')
> vlan_id=$(maas $maas_profile interfaces read dbcb8d|jq -r --arg name
> "bond0" '.[] | if .name == $name then .vlan.id else empty end')
> maas $maas_profile interfaces create-bridge $system_id name=$bridge
> vlan=$vlan_id parent=$parent mtu=9000
>
> if i correctly remember the error message is (i cannot apply the above
> commands because the nodes are on deployed state now):
>
> [error: interface already in use]
>
>
> I think you can easily check this use case and i think it would be helpful
> to have additional bridges on an interface that is already connected to
> VLAN interfaces
>

Hi Hamza,

If I understand you correctly, you would like to have an additional bridge,
like so

auto br-extra
iface br-extra inet manual
    mtu 9000
    bridge_ports bond0

That should be possible. I'm not familiar with the maas UI/CLI for
creating bridges over other devices, but it appears that in your
config you're already doing that, for example:

auto br-mgmt
iface br-mgmt inet static
    address 172.29.236.31/24
    mtu 9000
    bridge_ports bond0.10
    bridge_fd 15
    hwaddress ether e0:07:1b:f7:fe:f1

Revision history for this message
Blake Rouse (blake-rouse) wrote : Re: LACP bonding resulted in uncorrect settings of the primary interfaces

Looks like MAAS is blocking that because it tries to not allow you to create an invalid configuration. I think in this case you are correct in that MAAS is being to strict.

summary: - LACP bonding resulted in uncorrect settings of the primary interfaces
+ [2.1+] Cannot create a bridge on an interface that also has VLAN
+ interfaces
Changed in maas:
status: Invalid → Triaged
importance: Undecided → High
milestone: none → 2.2.0
Changed in curtin:
status: Incomplete → Invalid
Revision history for this message
Hamza (h16mara) wrote :

Hi Ryan,

Yes, i want to have an additional bridge just like you pointed but that cannot happen if the interface (bond0 in my case) already has a VLAN interface (bond0.10 or bond0.20 in my case).

Just like Blake Rouse pointed.

Regards,
Hamza

Revision history for this message
Hamza (h16mara) wrote :

Hi,

I would like to add another note regarding the order in which the network interfaces should be formatted.

If you notice the interfaces order in /etc/network/interfaces file in my first message, just underneath "bond0" there are the bridges and then the VLAN interfaces but i would be better and make more sense if we have VLAN interfaces before the bridges because the bridges depend on the VLAN interfaces.

This is the order of the creation:

1. bond0
2. VLAN interfaces
3. bridges

This is just about making /etc/network/interfaces content reflects the order of issuing the MAAS commands

Thank you,
Hamza

Changed in maas:
milestone: 2.2.0 → 2.2.0rc2
Changed in maas:
assignee: nobody → Mike Pontillo (mpontillo)
Changed in maas:
status: Triaged → Fix Committed
Changed in maas:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.