multi-homed host static routes formating
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Opinion
|
Wishlist
|
Unassigned | ||
curtin |
New
|
Undecided
|
Unassigned |
Bug Description
MAAS Version 2.1.1+bzr5544-
Instruction to replicate:
2 Subnets
192.168.21.0
192.168.22.0
Set default GW
192.168.21.254
192.168.22.254
route add both to 192.168.1.0
Deploy host then see /etc/network/
auto eno1
iface eno1 inet static
gateway 192.168.21.254
dns-nameservers 192.168.1.1 192.168.3.1 8.8.8.8
address 192.168.21.44/24
mtu 1500
auto eno2
iface eno2 inet static
dns-nameservers 192.168.1.1 192.168.3.1 8.8.8.8
address 192.168.22.44/24
mtu 1500
post-up route add -net 192.168.1.0 netmask 255.255.255.0 gw 192.168.21.254 metric 0 || true
pre-down route del -net 192.168.1.0 netmask 255.255.255.0 gw 192.168.21.254 metric 0 || truepost-up route add -net 192.168.1.0 netmask 255.255.255.0 gw 192.168.22.254 metric 0 || true
pre-down route del -net 192.168.1.0 netmask 255.255.255.0 gw 192.168.22.254 metric 0 || true
The result:
ubuntu@
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 192.168.21.254 0.0.0.0 UG 0 0 0 eno1
192.168.1.0 192.168.21.254 255.255.255.0 UG 0 0 0 eno1
192.168.21.0 * 255.255.255.0 U 0 0 0 eno1
192.168.22.0 * 255.255.255.0 U 0 0 0 eno2
ubuntu@
Problem:
Example above Line 14 reads in single string and should be two lines
pre-down route del -net 192.168.1.0 netmask 255.255.255.0 gw 192.168.21.254 metric 0 || true
post-up route add -net 192.168.1.0 netmask 255.255.255.0 gw 192.168.22.254 metric 0 || true
Changed in curtin: | |
status: | Incomplete → New |
Changed in maas: | |
status: | Incomplete → Opinion |
This looks like a problem in curtin's rendering of /etc/network/ interfaces, but I don't know if it's a problem that has already been addressed. (You are using a MAAS release a couple of minor revisions behind; there is a newer one in xenial-proposed.)
So that we can confirm if this is a new issue or not, can you post the output of `apt-cache policy curtin` on the MAAS server?
Thanks in advance.