Xenial containers not getting IPv4 networking

Hi,

I noticed this via Juju, but am able to reproduce with lxc launch ubuntu:16.04 xenial-test. I then see:

$ lxc list xenial-test
+-------------+---------+------+------+-----------+-----------+
|    NAME     |  STATE  | IPV4 | IPV6 |   TYPE    | SNAPSHOTS |
+-------------+---------+------+------+-----------+-----------+
| xenial-test | RUNNING |      |      | CONTAINER | 0         |
+-------------+---------+------+------+-----------+-----------+

This isn’t the case for later series, which seem to get an IPv4 address fine. Here’s my network setup:

mthaddon@finistere:~/repos/juju-introspection-proxy/juju-introspection-proxy-charm$ lxc network show lxdbr0 
config:
  ipv4.address: 10.46.16.1/24
  ipv4.nat: "true"
  ipv6.address: none
  ipv6.nat: "false"
description: ""
name: lxdbr0
type: bridge
used_by:
- /1.0/instances/charmcraft-juju-introspection-proxy-4333878-0-0-amd64?project=charmcraft
- /1.0/instances/juju-c03f9f-0
- /1.0/instances/juju-c03f9f-1
- /1.0/instances/juju-c03f9f-2
- /1.0/instances/juju-c03f9f-3
- /1.0/instances/juju-e3ce81-0
- /1.0/instances/xenial-test
- /1.0/profiles/default
- /1.0/profiles/default?project=charmcraft
managed: true
status: Created
locations:
- none
mthaddon@finistere:~/repos/juju-introspection-proxy/juju-introspection-proxy-charm$ lxc network list
+-----------+----------+---------+---------------+------+-------------+---------+---------+
|   NAME    |   TYPE   | MANAGED |     IPV4      | IPV6 | DESCRIPTION | USED BY |  STATE  |
+-----------+----------+---------+---------------+------+-------------+---------+---------+
| enp0s31f6 | physical | NO      |               |      |             | 0       |         |
+-----------+----------+---------+---------------+------+-------------+---------+---------+
| lxdbr0    | bridge   | YES     | 10.46.16.1/24 | none |             | 11      | CREATED |
+-----------+----------+---------+---------------+------+-------------+---------+---------+
| wlp0s20f3 | physical | NO      |               |      |             | 0       |         |
+-----------+----------+---------+---------------+------+-------------+---------+---------+

Thanks, Tom

You’ve not said what the host OS version is, but this sounds like a duplicate of:

Thanks, that does look like a duplicate.

1 Like