using juju 2.0 beta 11 and MAAS 2.0 RC1
If a host enlisted into MAAS has more than one interface configured with a subnet, then when a container is deployed to that host, the containers are missing a default gateway.
When deploying containers to a host with a single interface configured, the default gateway exists.
Example from a container below. Also attached are screenshots of my subnets and configuration for this host in maas
ubuntu@juju-01ca8f-2-lxd-0:~$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
7: eth0@if8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 00:16:3e:cf:09:7e brd ff:ff:ff:ff:ff:ff link-netnsid 0
inet 192.168.2.3/24 brd 192.168.2.255 scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::216:3eff:fecf:97e/64 scope link
valid_lft forever preferred_lft forever
9: eth1@if10: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 00:16:3e:8b:c4:d5 brd ff:ff:ff:ff:ff:ff link-netnsid 0
inet 10.20.0.197/24 brd 10.20.0.255 scope global eth1
valid_lft forever preferred_lft forever
inet6 fe80::216:3eff:fe8b:c4d5/64 scope link
valid_lft forever preferred_lft forever
ubuntu@juju-01ca8f-2-lxd-0:~$ cat /etc/network/interfaces
auto eth0 eth1 lo
iface lo inet loopback
dns-nameservers 10.20.0.11
dns-search maas
iface eth0 inet static
address 192.168.2.3/24
iface eth1 inet static
address 10.20.0.197/24
Noting that juju 2.0 beta 7 did not have this issue. The default gateway gets added to containers even using multiple interfaces. The issue appears to have been introduced with beta 8.