Upgraded to Ubuntu 19.04 and now lxd hangs on everything


(Мэтью Смит) #1

I shouldnt have done it, but now its done and I can’t undo it. I upgraded to 19.04 and now LXD is FUBAR. I had several containers that were webservers and now they are unreachable. lxc list hangs, lxd --debug --group lxd hangs … I’m at a loss … :confused:


(Tony Anytime) #2

I am sure it wasn’t just 19.04. I have the same problem on all my servers, 18.04
No solution yet.
apt upgrade and a reboot seems to break it.
They stop talking to each other.


#3

When you upgraded to 19.04, LXD was switched to the snap package. Can you verify whether you are running on a Deb or snap package of LXD? What are the versions?
There might be a need for sudo lxd.migrate to complete the migration to snap package.


(Мэтью Смит) #4

Simos:
I was running the the SNAP package of LXD under 18.10 and unfortunately I cannot verify my current version because any lxc/lxd command hangs. :confused:


#5

Here are the commands

which lxc
which lxd
lxc --version
lxd --version
apt policy lxd
snap info lxd

When you post the output, please use the preformatted environment (markdown).


(Мэтью Смит) #6
which lxc
/snap/bin/lxc

which lxd
/snap/bin/lxd

apt policy lxd
lxd:
  Installed: (none)
  Candidate: 1:0.7
  Version table:
     1:0.7 500
        500 http://archive.ubuntu.com/ubuntu disco/main amd64 Packages

snap info lxd
name:      lxd
summary:   System container manager and API
publisher: Canonical✓
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`):
   - 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]
   - ceph.builtin: Use snap-specific ceph configuration [default=false]
   - openvswitch.builtin: Run a snap-specific OVS daemon [default=false]
  
  [Documentation](https://lxd.readthedocs.io)
commands:
  - lxd.benchmark
  - lxd.buginfo
  - lxd.check-kernel
  - lxd.lxc
  - lxd
  - lxd.migrate
services:
  lxd.activate: oneshot, enabled, inactive
  lxd.daemon:   simple, enabled, inactive
snap-id:      J60k4JY0HppjwOjW8dZdYc8obXKxujRu
tracking:     stable
refresh-date: 3 days ago, at 22:47 EDT
channels:
  stable:        3.13        2019-05-13 (10756) 56MB -
  candidate:     3.13        2019-05-10 (10756) 56MB -
  beta:          ↑                                   
  edge:          git-2609835 2019-05-16 (10779) 56MB -
  3.0/stable:    3.0.3       2018-11-26  (9663) 53MB -
  3.0/candidate: 3.0.3       2019-01-19  (9942) 53MB -
  3.0/beta:      ↑                                   
  3.0/edge:      git-eaa62ce 2019-02-19 (10212) 53MB -
  2.0/stable:    2.0.11      2018-07-30  (8023) 28MB -
  2.0/candidate: 2.0.11      2018-07-27  (8023) 28MB -
  2.0/beta:      ↑                                   
  2.0/edge:      git-c7c4cc8 2018-10-19  (9257) 26MB -
installed:       3.13                   (10756) 56MB -

lxd --version
3.13

lxc --version
3.13

(Мэтью Смит) #7

As an aside, is there a way to copy/backup containers without using a “lxc/lxd” command? LXD isn’t the only thing broken on my server since the “upgrade” and I am thinking I may just have to start over. If this is the case, and where it seems lxc/lxd commands just cause the program to hang, I need a manual way of backing up containers


#8

It should be possible to grab the storage pool and the configuration, and insert into a brand new installation of LXD. I have not tested this so that I give you a fool-proof instructions.
Ideally, if you have a spare computer, you can try it out without erasing yet the initial server.
Note that you need at least the database/ directory and the storage pool.


(Мэтью Смит) #9

So here is how I have mine setup. LXD resides on my host hard drive but the storage pool resides on an external hard drive.

Given this info, how would you go about backing the containers up? More to the point, what to do you mean by database/ directory (where is it?).

And to be clear, I know you are postulating and don’t have a fool-proof answer but I would be grateful for any guidance.

Regards and thank you