Lxd snap stuck in 4.0/stable/ubuntu-20.04

Hi

I have a problem with the preinstalled lxd snap in Ubuntu.
The lxd snap doesn’t refesh/refresh channel is strange (in 4.0/stable and not latest/stabel)

sudo snap refresh --list
All snaps up to date.

sudo snap refresh lxd
snap "lxd" has no updates available


sudo systemctl status snap.lxd.activate.service
● snap.lxd.activate.service - Service for snap application lxd.activate
     Loaded: loaded (/etc/systemd/system/snap.lxd.activate.service; enabled; vendor preset: enabled)
     Active: inactive (dead) since Tue 2020-12-29 12:02:01 EET; 2min 43s ago
    Process: 1063 ExecStart=/usr/bin/snap run lxd.activate (code=exited, status=0/SUCCESS)
   Main PID: 1063 (code=exited, status=0/SUCCESS)

Dec 29 12:01:52 ubuntu systemd[1]: Starting Service for snap application lxd.activate...
Dec 29 12:01:57 ubuntu lxd.activate[1063]: => Starting LXD activation
Dec 29 12:01:57 ubuntu lxd.activate[1063]: ==> Loading snap configuration
Dec 29 12:01:57 ubuntu lxd.activate[1063]: ==> Checking for socket activation support
Dec 29 12:01:58 ubuntu lxd.activate[1215]: tool_linux.go:157: cannot read /proc/self/exe: readlink /proc/self/exe: no such file or directory
Dec 29 12:01:59 ubuntu lxd.activate[1063]: ==> Setting LXD socket ownership
Dec 29 12:01:59 ubuntu lxd.activate[1063]: ==> Checking if LXD needs to be activated
Dec 29 12:02:01 ubuntu systemd[1]: snap.lxd.activate.service: Succeeded.
Dec 29 12:02:01 ubuntu systemd[1]: Finished Service for snap application lxd.activate.

sudo snap info lxd
name:      lxd
summary:   System container manager and API
publisher: Canonical✓
store-url: https://snapcraft.io/lxd
contact:   https://github.com/lxc/lxd/issues
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: https://images.linuxcontainers.org

  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`):
     - ceph.builtin: Use snap-specific ceph configuration [default=false]
     - criu.enable: Enable experimental live-migration support [default=false]
     - daemon.debug: Increases logging to debug level [default=false]
     - daemon.group: Group of users that can interact with LXD [default=lxd]
     - daemon.preseed: A YAML configuration to feed `lxd init` on initial start
     - lxcfs.pidfd: Start per-container process tracking [default=false]
     - lxcfs.loadavg: Start tracking per-container load average [default=false]
     - lxcfs.cfs: Consider CPU shares for CPU usage [default=false]
     - openvswitch.builtin: Run a snap-specific OVS daemon [default=false]
     - shiftfs.enable: Enable shiftfs support [default=auto]

  Documentation: https://lxd.readthedocs.io
commands:
  - lxd.benchmark
  - lxd.buginfo
  - lxd.check-kernel
  - lxd.lxc
  - lxd.lxc-to-lxd
  - lxd
  - lxd.migrate
services:
  lxd.activate: oneshot, enabled, inactive
  lxd.daemon:   simple, enabled, inactive
snap-id:      J60k4JY0HppjwOjW8dZdYc8obXKxujRu
tracking:     4.0/stable/ubuntu-20.04
refresh-date: 56 days ago, at 22:53 EET
channels:
  latest/stable:    4.9         2020-12-18 (18772) 74MB -
  latest/candidate: 4.9         2020-12-18 (18772) 74MB -
  latest/beta:      ↑
  latest/edge:      git-ee2375f 2020-12-18 (18782) 74MB -
  4.9/stable:       4.9         2020-12-18 (18772) 74MB -
  4.9/candidate:    4.9         2020-12-18 (18772) 74MB -
  4.9/beta:         ↑
  4.9/edge:         ↑
  4.8/stable:       4.8         2020-12-08 (18546) 74MB -
  4.8/candidate:    4.8         2020-12-07 (18546) 74MB -
  4.8/beta:         ↑
  4.8/edge:         ↑
  4.7/stable:       4.7         2020-11-12 (18251) 72MB -
  4.7/candidate:    4.7         2020-11-12 (18251) 72MB -
  4.7/beta:         ↑
  4.7/edge:         ↑
  4.0/stable:       4.0.4       2020-11-03 (18150) 71MB -
  4.0/candidate:    4.0.4       2020-11-04 (18165) 71MB -
  4.0/beta:         ↑
  4.0/edge:         git-295e020 2020-12-19 (18789) 71MB -
  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.12      2020-08-18 (16879) 38MB -
  2.0/candidate:    2.0.12      2020-08-17 (16879) 38MB -
  2.0/beta:         ↑
  2.0/edge:         git-82c7d62 2020-08-17 (16867) 39MB -
installed:          4.0.4                  (18150) 71MB -

lxd --version
4.0.4

sudo snap changes
ID   Status  Spawn               Ready               Summary
12   Done    today at 11:17 EET  today at 11:17 EET  Running service command

I will use this lxd server for the containers as lxd backup and I noticed the issue after issuing this:

lxc copy bin00:bryssel bryssel --refresh --verbose
Error: Failed instance creation: Unknown configuration key: volatile.uuid

For the part of updating LXD, the latest 4.0/stable version is 4.0.4, released on 3rd Nov 2020.

You can check this with

$ snap info lxd
...
  4.0/stable:       4.0.4       2020-11-03 (18150) 71MB -
...
$ 

If you do not already have that version of LXD (build 18150), then show the full output of snap info lxd.

I am not familiar with the last error message.

1 Like

The error message comes from the target server (local) being on a version older than the source (bin00) and so rejecting the key set on the source instance.

1 Like

Thank you for replies.

That error message rejecting the lxc copy was obviously from the older version as Stéphane replied.

The target is running on Ubuntu 20.04.1. Currently source lxd snap package is running on Ubuntu 18.04.5 where lxd snap is not installed or refreshed automatically. I do upgrades to the source lxd snap manually. My strategy however was that I upgrade the target lxd (lxd backups) normally from the distribution installed image default Ubuntu 20.04.1 snap channel. I was surprised the default Ubuntu 20.04.1 was using channel 4.0/stable and not latest/stable. Is this channel 4.0/stable normal for Ubuntu 20.04.1 distribution?

According to this the I don’t need to do anything

but how about the new snap lxd releases? Should I keep the target (backup server) in the channel 4.0/stable or ‘snap install lxd --channel=latest/stable’ ?

I expected to see the new feature releases on the backup server and then prepare manually upgrades for development sources and production. I am not 100% sure about my upgrade strategy.

Thanks

Ubuntu 20.04 is an LTS release and so by default it uses the LXD LTS (4.0) release as well.

There’s more info about the different release channels here:

You can switch channels using:

sudo snap refresh lxd --channel=latest/stable

However keep in mind that you will not be able to switch back to the LTS 4.0 channel due to schema changes.

1 Like

What version of LXD on the source server?

lxd --version
4.9

I was going to do ‘sudo snap refresh lxd --channel=latest/stable’ but If I was now doing ‘sudo snap refresh lxd --channel=4.9/stable’ which is also latest release - will the channel be the latest/stable or am I again stuck in 4.9/stable without further latest updates ?

Managing the LXD Snap page you wrote this:

LXD 4.9 is the latest feature release (non-LTS) at this time. If you use 4.9/stable then your machine will remain on that release until you manually change it. Whereas using latest/stable will enable auto upgrades to the latest feature release in the future.

1 Like