Unable to reach host gateway from lxd container

Hi,

I am facing issues with juju initiated lxd containers in all deployed machines.

There are two bridges br-ens160(juju created) and lxdbr0(default lxd)

From br-ens0:

The containers are taking DHCP IPs of the VLAN where juju and maas reside.

I can ping the containers from the parent host and vice-versa but I can’t ping them from any other host on the VLAN nor the containers can ping other hosts and the gateway.

Due to this the juju machine state of the containers is still pending.

From lxdbr0:

I can ping the gateway as well as other hosts on the network. This one has a different subnet.

1

While trying with juju model-config container-networking-method=local i get

Kindly help.

Were you ever able to solve this, I am having the exact same problem with trying to deploy Openstack Wallaby on Ubuntu Focal.

You definitely want to keep using the default container-networking-method=provider.

We would need more information regarding the network set-up here.

I am able to launch LXD instances on MAAS-deployed machines.

Using Juju 2.9 and MAAS 2.8.6:

  • juju status
Machine  State    DNS          Inst id              Series  AZ     Message
0        started  172.16.99.3  m-03                 focal   zone1  Deployed
0/lxd/0  started  172.16.99.4  juju-6011c4-0-lxd-0  focal   zone1  Container started
  • Machine 0 interfaces.
5: br-ens4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 52:54:00:14:1c:22 brd ff:ff:ff:ff:ff:ff
    inet 172.16.99.3/24 brd 172.16.99.255 scope global br-ens4
       valid_lft forever preferred_lft forever
    inet6 fe80::5054:ff:fe14:1c22/64 scope link
       valid_lft forever preferred_lft forever
7: 0lxd0-0@if6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-ens4 state UP group default qlen 1000
    link/ether c2:78:c7:ce:db:6c brd ff:ff:ff:ff:ff:ff link-netnsid 0
  • Machine 0 routes.
default via 172.16.99.254 dev br-ens4 proto static
10.134.70.0/24 dev lxdbr0 proto kernel scope link src 10.134.70.1 linkdown
172.16.99.0/24 dev br-ens4 proto kernel scope link src 172.16.99.3
  • The subnet deployed to has MAAS-managed DHCP. When I look at the subnet listing in MAAS, I can see the assigned address.