Problems during debian upgrade 9 to 10

Today I had to upgrade my server from debian 9 to 10. Unfortunately, lxd failed to upgrade smoothly.

I had lxd 3.11 from snap and a bunch of containers.

  1. Debian buster installed “new” iptables and lxd uses old iptables, now called iptables-legacy. I spent hucking amount of time trying to understand why containers failed to obtain IP address, because iptables -nvL worked as usual, showing my /etc/iptables/* rules and no automatic rules from lxd. And my complain is that lxd did not notify me about this issue but silently used legacy iptables! That’s wrong – if lxd does not work with new iptables it should tell the user to update alternatives.

  2. lxdbr0 lost important part of configuration – ipv4.nat: “true”. Spent some time figuring this out, too…

The whole iptables thing has been fixed for a few releases now.
Not sure how a LXD network would have lost a config option on system upgrade though, that seems odd.

Well, debian snap thinks that 3.11 is the latest. Even buster snap.

Did you disable access to the store somehow?

We have automated tests on Debian and they sure pull 4.0.0 just fine :slight_smile:

What does snap info lxd get you?


name:      lxd
summary:   System container manager and API
publisher: Canonical✓
license:   unset
description: |
  **LXD is a system container manager**
  With LXD you can run hundreds of containers of a variety of Linux
  distributions, apply resource limits, pass in directories, USB devices
  or GPUs and setup any network and storage you want.
  LXD containers are lightweight, secure by default and a great
  alternative to running Linux virtual machines.
  **Run any Linux distribution you want**
  Pre-made images are available for Ubuntu, Alpine Linux, ArchLinux,
  CentOS, Debian, Fedora, Gentoo, OpenSUSE and more.
  A full list of available images can be [found here](
  Can't find the distribution you want? It's easy to make your own images too, either using our
  `distrobuilder` tool or by assembling your own image tarball by hand.
  **Containers at scale**
  LXD is network aware and all interactions go through a simple REST API,
  making it possible to remotely interact with containers on remote
  systems, copying and moving them as you wish.
  Want to go big? LXD also has built-in clustering support,
  letting you turn dozens of servers into one big LXD server.
  **Configuration options**
  Supported options for the LXD snap (`snap set lxd KEY=VALUE`):
   - criu.enable: Enable experimental live-migration support [default=false]
   - daemon.debug: Increases logging to debug level [default=false]
   - Group of users that can interact with LXD [default=lxd]
   - ceph.builtin: Use snap-specific ceph configuration [default=false]
   - openvswitch.builtin: Run a snap-specific OVS daemon [default=false]
  - lxd.benchmark
  - lxd.buginfo
  - lxd.check-kernel
  - lxd.lxc
  - lxd
  - lxd.migrate
  lxd.activate: oneshot, enabled, inactive
  lxd.daemon:   simple, enabled, active
snap-id:      J60k4JY0HppjwOjW8dZdYc8obXKxujRu
tracking:     latest/stable
refresh-date: 2019-03-21
  latest/stable:    4.0.0       2020-04-15 (14594) 62MB -
  latest/candidate: 4.0.0       2020-04-15 (14594) 62MB -
  latest/beta:      ↑                                   
  latest/edge:      git-c4c1cda 2020-04-15 (14604) 62MB -
  4.0/stable:       4.0.0       2020-04-15 (14594) 62MB -
  4.0/candidate:    4.0.0       2020-04-15 (14594) 62MB -
  4.0/beta:         ↑                                   
  4.0/edge:         ↑                                   
  3.23/stable:      3.23        2020-03-30 (14133) 70MB -
  3.23/candidate:   3.23        2020-03-30 (14133) 70MB -
  3.23/beta:        ↑                                   
  3.23/edge:        ↑                                   
  3.22/stable:      3.22        2020-03-18 (13901) 70MB -
  3.22/candidate:   3.22        2020-03-19 (13911) 70MB -
  3.22/beta:        ↑                                   
  3.22/edge:        ↑                                   
  3.21/stable:      3.21        2020-02-24 (13522) 69MB -
  3.21/candidate:   3.21        2020-03-04 (13588) 69MB -
  3.21/beta:        ↑                                   
  3.21/edge:        ↑                                   
  3.20/stable:      3.20        2020-02-06 (13300) 69MB -
  3.20/candidate:   3.20        2020-02-06 (13300) 69MB -
  3.20/beta:        ↑                                   
  3.20/edge:        ↑                                   
  3.19/stable:      3.19        2020-01-27 (13162) 67MB -
  3.19/candidate:   3.19        2020-01-27 (13162) 67MB -
  3.19/beta:        ↑                                   
  3.19/edge:        ↑                                   
  3.18/stable:      3.18        2019-12-02 (12631) 57MB -
  3.18/candidate:   3.18        2019-12-02 (12631) 57MB -
  3.18/beta:        ↑                                   
  3.18/edge:        ↑                                   
  3.0/stable:       3.0.4       2019-10-10 (11348) 55MB -
  3.0/candidate:    3.0.4       2019-10-10 (11348) 55MB -
  3.0/beta:         ↑                                   
  3.0/edge:         git-81b81b9 2019-10-10 (11362) 55MB -
  2.0/stable:       2.0.11      2019-10-10  (8023) 28MB -
  2.0/candidate:    2.0.11      2019-10-10  (8023) 28MB -
  2.0/beta:         ↑                                   
  2.0/edge:         git-160221d 2020-01-13 (12854) 27MB -
installed:          3.11                   (10343) 56MB devmode

Looks like it was manually sideloaded (that’s what devmode indicates).

I don’t remember how it was done, but I’m sure I followed something like this without much fuss.

I just typed snap refresh lxd and lxd was quickly upgraded to 4.0.0 (while snap refresh told me that everything is up to date). And devmode disappeared after upgrade.