[lxc-users] bionic image not getting IPv4 address

David Favor david at davidfavor.com
Thu May 3 13:09:44 UTC 2018


Fajar A. Nugraha wrote:
> On Thu, May 3, 2018 at 10:14 AM, David Favor <david at davidfavor.com> wrote:
>> Be aware there is a bug in Bionic packaging, so if you upgrade
>> machine level OS from any previous OS version to Bionic, LXD
>> networking becomes broken... so badly... no Ubuntu or LXD developer
>> has figured out a fix.
> 
> Wait, what?
> 
> I've upgraded three physical machines (and a custom AWS AMI) from
> 16.04 (somewhat minimal install, with lxd) to 18.04. All have lxdbr0
> working fine. Of course that also means I don't have netplan installed
> (since 16.04 doesn't have it, and the upgrade process doesn't install
> it), which is perfect for me. I like old fashioned
> /etc/network/interfaces.d/*.cfg.

This is tricky... Netplan forced abuse is similar to systemd... No one
likes systemd + it works abysmally + it was crammed down everyone's
throat.

It appears Netplan will be the same.

Eventually some update will likely wipe out old networking + force upgrade
to Netplan.

To avoid the side effects, likely best to just stop/move all your containers
to a new machine. Then do a fresh Bionic install. Since Bionic is LTS, you
can run Bionic for 5 years.

After you have your fresh Bionic install working, then just move all
your containers back.

Note: Be sure you read text of this bug before starting this process:

    https://github.com/lxc/lxd/issues/4522

    Which includes a fix for maintaining correct uid/gid mapping
    when moving containers between machines.

    In short, you must actually start/stop containers on all machines
    where containers are moved, else uid/gid mapping get lost.

This might not apply if you've done a complete remove of APT LXD + then
done a fresh install of LXD via SNAP...

    On both machines.

> Not sure about 17.04/17.10 to 18.04 though.
> 
>> LXD via SNAP (which is only LXD install option on Bionic).
> 
> Not true. It's not the ONLY option.
> 
> # apt policy lxd
> lxd:
>   Installed: 3.0.0-0ubuntu4
>   Candidate: 3.0.0-0ubuntu4
>   Version table:
>  *** 3.0.0-0ubuntu4 500
>         500 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages
>         100 /var/lib/dpkg/status
> 

Currently APT packages are being maintained for backwards compatibility.

And be aware. The APT packages no longer receive updates, so for example
the patches produced this week fixing many LXD bugs will only be available
to you, if you switch to SNAP.

LXD 3.0 initial (no patches) is the last APT supported LXD release.

This is covered somewhere on the LXD site.

I host 100s of high traffic, high speed, WordPress sites, so having all
LXD updates (bug fixes) is essential.

If updates aren't essential for you, running LXD which will never update
might be acceptable.


More information about the lxc-users mailing list