maas bridge script handles VLAN NICs incorrectly
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Fix Released
|
High
|
Andrew McDermott | ||
juju-core |
Fix Released
|
High
|
Andrew McDermott | ||
1.25 |
Fix Released
|
High
|
Andrew McDermott |
Bug Description
In Juju 1.25 and master (soon to be 2.0-alpha1), but specifically *not* in the maas-spaces branch, the add-juju-bridge.py script we use on the MAAS provider does not render the changes to /etc/network/
Here's an example of /e/n/i on a KVM node deployed with MAAS 1.9rc4 through juju, before the bridge script changes it:
auto eth0
iface eth0 inet static
gateway 10.20.19.2
address 10.20.19.103/24
mtu 1500
auto eth0.100
iface eth0.100 inet static
address 10.100.19.103/24
vlan-raw-device eth0
mtu 1500
vlan_id 100
auto eth0.250
iface eth0.250 inet static
address 10.250.19.103/24
vlan-raw-device eth0
mtu 1500
vlan_id 250
auto eth0.50
iface eth0.50 inet static
address 10.50.19.103/24
vlan-raw-device eth0
mtu 1500
vlan_id 50
dns-nameservers 10.10.19.2
dns-search maas-19
And here is how it looks like after the script:
iface eth0 inet manual
auto juju-br0
iface juju-br0 inet static
bridge_ports eth0
gateway 10.20.19.2
address 10.20.19.103/24
mtu 1500
auto juju-br0.100
iface juju-br0.100 inet static
address 10.100.19.103/24
vlan-raw-device eth0
mtu 1500
vlan_id 100
auto juju-br0.250
iface juju-br0.250 inet static
address 10.250.19.103/24
vlan-raw-device eth0
mtu 1500
vlan_id 250
auto juju-br0.50
iface juju-br0.50 inet static
address 10.50.19.103/24
vlan-raw-device eth0
mtu 1500
vlan_id 50
dns-nameservers 10.10.19.2
dns-search maas-19
This causes errors by ifup at boot when the script is trying to activate the modified /e/n/i (e.g. cannot add juju-br0.100 using eth0 as raw device, as eth0.100 already exists).
In comparison, here is the same /e/n/i after it got modified by the improved bridge script in the maas-spaces feature branch:
iface eth0 inet manual
auto br-eth0
iface br-eth0 inet static
gateway 10.20.19.2
address 10.20.19.103/24
mtu 1500
bridge_ports eth0
iface eth0.100 inet manual
address 10.100.19.103/24
vlan-raw-device eth0
mtu 1500
vlan_id 100
auto br-eth0.100
iface br-eth0.100 inet static
address 10.100.19.103/24
mtu 1500
bridge_ports eth0.100
iface eth0.250 inet manual
address 10.250.19.103/24
vlan-raw-device eth0
mtu 1500
vlan_id 250
auto br-eth0.250
iface br-eth0.250 inet static
address 10.250.19.103/24
mtu 1500
bridge_ports eth0.250
iface eth0.50 inet manual
address 10.50.19.103/24
vlan-raw-device eth0
mtu 1500
vlan_id 50
auto br-eth0.50
iface br-eth0.50 inet static
address 10.50.19.103/24
mtu 1500
bridge_ports eth0.50
dns-nameservers 10.10.19.2
dns-search maas-19
The new script has an issue with multiple "dns-*" options, but I'll file a separate bug for it.
no longer affects: | juju-core/2.0 |
Changed in juju-core: | |
milestone: | 1.25.3 → 2.0-alpha2 |
Changed in juju-core: | |
status: | Triaged → In Progress |
assignee: | nobody → Andrew McDermott (frobware) |
Changed in juju-core: | |
milestone: | 2.0-alpha2 → 2.0-beta1 |
Changed in juju-core: | |
status: | In Progress → Fix Committed |
Changed in juju-core: | |
status: | Fix Committed → Fix Released |
affects: | juju-core → juju |
Changed in juju: | |
milestone: | 2.0-beta1 → none |
milestone: | none → 2.0-beta1 |
Changed in juju-core: | |
assignee: | nobody → Andrew McDermott (frobware) |
importance: | Undecided → High |
status: | New → Fix Released |
I think the minimal fix we need for 1.25 is to have the following /e/n/i after the script:
iface eth0 inet manual
auto juju-br0
iface juju-br0 inet static
gateway 10.20.19.2
address 10.20.19.103/24
mtu 1500
bridge_ports eth0
auto eth0.100
iface eth0.100 inet static
address 10.100.19.103/24
vlan-raw-device eth0
mtu 1500
vlan_id 100
auto eth0.250
iface eth0.250 inet static
address 10.250.19.103/24
vlan-raw-device eth0
mtu 1500
vlan_id 250
auto eth0.50
iface eth0.50 inet static
address 10.50.19.103/24
vlan-raw-device eth0
mtu 1500
vlan_id 50
dns-nameservers 10.10.19.2
dns-search maas-19