No documented way to set the MAC for a bridge or bond

Bug #1664698 reported by Mike Pontillo
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Committed
Medium
Unassigned
nplan (Ubuntu)
In Progress
High
Mathieu Trudel-Lapierre

Bug Description

According to the current documentation[1], there is no way to set the MAC address for a bridge or bond interface. This is requirement for the MAAS use case.

Tentatively, I'm writing rendering the netplan with a 'macaddress' key under each bond or bridge (since that seems the most consistent with the `match` syntax).

[1]:
https://git.launchpad.net/netplan/tree/doc/netplan.md

Tags: maas

Related branches

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

For networkd, All virtual net devices support general parameters, including MACAddress
and this works as expected if netplan passes through macaddress parameters to netdevs it creates.

root@z1:/etc/systemd/network# cat br0.net*
[NetDev]
Name=br0
MACAddress=00:11:22:33:44:55
Kind=bridge
[Match]
Name=br0

[Network]
Address=192.168.2.1/24

root@z1:/etc/systemd/network# networkctl
IDX LINK TYPE OPERATIONAL SETUP
  1 lo loopback carrier unmanaged
  2 br0 ether no-carrier configuring
 16 eth0 ether routable unmanaged

3 links listed.
root@z1:/etc/systemd/network# ifconfig br0
br0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
        inet 192.168.2.1 netmask 255.255.255.0 broadcast 192.168.2.255
        ether 00:11:22:33:44:55 txqueuelen 1000 (Ethernet)
        RX packets 0 bytes 0 (0.0 B)
        RX errors 0 dropped 0 overruns 0 frame 0
        TX packets 0 bytes 0 (0.0 B)
        TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

root@z1:/etc/systemd/network# cat *bond*
[NetDev]
Name=bond0
MACAddress=aa:bb:cc:00:11:22
Kind=bond
Mode=balance-rr
[Match]
Name=bond0

[Network]
Address=10.2.71.1/24
root@z1:/etc/systemd/network# ifconfig bond0
bond0: flags=5123<UP,BROADCAST,MASTER,MULTICAST> mtu 1500
        inet 10.2.71.1 netmask 255.255.255.0 broadcast 10.2.71.255
        ether aa:bb:cc:00:11:22 txqueuelen 1000 (Ethernet)
        RX packets 0 bytes 0 (0.0 B)
        RX errors 0 dropped 0 overruns 0 frame 0
        TX packets 0 bytes 0 (0.0 B)
        TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Right, this appears well supported by networkd, but not at all by NetworkManager. I'll file a bug upstream about this.

Changed in netplan:
status: New → In Progress
importance: Undecided → High
assignee: nobody → Mathieu Trudel-Lapierre (cyphermox)
Changed in netplan:
milestone: none → netplan-17.03
Revision history for this message
Mike Pontillo (mpontillo) wrote :

Adding MAAS; we need to ensure MAAS is generating the expected Netplan once this has been defined.

tags: added: maas
Changed in maas:
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

This is complicated, it appears as though networkd and NetworkManager don't always get the MAC change even if we force re-applying the .link file via udevadm. This will need more work.

affects: netplan → nplan (Ubuntu)
Changed in nplan (Ubuntu):
milestone: netplan-17.03 → none
milestone: none → ubuntu-17.05
Revision history for this message
Mike Pontillo (mpontillo) wrote :

Curious what you mean by 're-applying'. Are you syaing it generates the correct configuration the first time, but it cannot subsequently be updated?

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

The configuration is correctly generated, but requires a reboot. Simply trying to apply the new cloned MAC even with net_setup_link does not appear to work.

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

I'm marking this a duplicate of bug 1690388: it already contains the cloud-init bits and milestones for SRU; and a bit more information about the issue at hand.

Changed in maas:
milestone: none → next
status: Triaged → Fix Committed
Changed in maas:
milestone: next → 2.6.0
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.