[lxc-users] Issue upgrading from LXD apt to snap

Sean McNamara smcnam at gmail.com
Thu Apr 12 03:54:51 UTC 2018


Hi,

I'm on Ubuntu 16.04; the last working version of LXD I had was 2.21
from backports.

I wanted to upgrade to 3.0 but it isn't in the backports repo yet, it
seems, so I went ahead and installed the snap. Then I removed the
original package, perhaps not realizing until it was too late that I
wasn't suppposed to do that.

It seems the lxd.migrate command that you're *supposed* to run (which
I wasn't aware of until recently) requires the original lxd server to
be running -- that is, in my case, the one installed via apt. However,
that one now won't start. It says:

error: The database schema is more recent than LXD's schema.

I wish the lxd binary had more flexibility and information about:

 - How do I identify the directory where this lxd command is looking
for its database/config files?
 - How do I *tell it* to use a specific (non-default) directory for
its database/config files?
 - What environment variables should I check, if those are applicable?

That info should go in `lxd --help`, IMO. As of now I'm stuck on this
error. I assume I have a working LXD database in the normal /var
location that somehow got updated to database schema for version 3.0,
but I can't start *either* version of LXD now.

When I try to start /usr/bin/lxd, I get the above error. When I try to
start /snap/lxd/bin/lxd, it just hangs trying to connect:

# /snap/lxd/current/bin/lxd -d
DBUG[04-12|03:54:05] Connecting to a local LXD over a Unix socket
DBUG[04-12|03:54:05] Sending request to LXD                   etag=
method=GET url=http://unix.socket/1.0

How can I salvage my original LXD config / containers in /var/lib/lxd
and make it work with the snap?

Thanks,

Sean


More information about the lxc-users mailing list