error: open /var/lib/lxd/containers: no such file or directory

Bug #1602025 reported by Seth Arnold
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
lxd (Ubuntu)
Fix Released
High
Unassigned

Bug Description

Today's apt-get update && apt-get -u dist-upgrade returned some lxd errors:

Setting up liblxc1 (2.0.3-0ubuntu1~ubuntu16.04.1) ...
Setting up lxc-common (2.0.3-0ubuntu1~ubuntu16.04.1) ...
Installing new version of config file /etc/apparmor.d/abstractions/lxc/container-base ...
Installing new version of config file /etc/apparmor.d/abstractions/lxc/start-container ...
Setting up python3-lxc (2.0.3-0ubuntu1~ubuntu16.04.1) ...
Setting up lxc1 (2.0.3-0ubuntu1~ubuntu16.04.1) ...
Installing new version of config file /etc/init/lxc-instance.conf ...
Installing new version of config file /etc/init/lxc.conf ...
Setting up lxc dnsmasq configuration.
Setting up lxd (2.0.3-0ubuntu1~ubuntu16.04.2) ...
Job for lxd-containers.service failed because the control process exited with error code. See "systemctl status lxd-containers.service" and "journalctl -xe" for details.
lxd-containers.service couldn't start.
Job for lxd-containers.service failed because the control process exited with error code. See "systemctl status lxd-containers.service" and "journalctl -xe" for details.
lxd-containers.service couldn't restart.
Setting up lxc-templates (2.0.3-0ubuntu1~ubuntu16.04.1) ...
Setting up lxc (2.0.3-0ubuntu1~ubuntu16.04.1) ...
Processing triggers for libc-bin (2.23-0ubuntu3) ...
sarnold@wopr:~$ systemctl status lxd-containers.service
● lxd-containers.service - LXD - container startup/shutdown
   Loaded: loaded (/lib/systemd/system/lxd-containers.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Mon 2016-07-11 15:21:40 PDT; 18s ago
     Docs: man:lxd(1)
  Process: 18531 ExecStart=/usr/bin/lxd activateifneeded (code=exited, status=1/FAILURE)
 Main PID: 18531 (code=exited, status=1/FAILURE)

Jul 11 15:21:40 wopr systemd[1]: Starting LXD - container startup/shutdown...
Jul 11 15:21:40 wopr lxd[18531]: error: open /var/lib/lxd/containers: no such file or directory
Jul 11 15:21:40 wopr systemd[1]: lxd-containers.service: Main process exited, code=exited, status=1/FAILURE
Jul 11 15:21:40 wopr systemd[1]: Failed to start LXD - container startup/shutdown.
Jul 11 15:21:40 wopr systemd[1]: lxd-containers.service: Unit entered failed state.
Jul 11 15:21:40 wopr systemd[1]: lxd-containers.service: Failed with result 'exit-code'.

Thanks

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: lxd 2.0.3-0ubuntu1~ubuntu16.04.2
ProcVersionSignature: Ubuntu 4.4.0-22.40-generic 4.4.8
Uname: Linux 4.4.0-22-generic x86_64
NonfreeKernelModules: zfs zunicode zcommon znvpair zavl
ApportVersion: 2.20.1-0ubuntu2.1
Architecture: amd64
Date: Mon Jul 11 15:22:58 2016
InstallationDate: Installed on 2016-04-04 (98 days ago)
InstallationMedia: Ubuntu-Server 16.04 LTS "Xenial Xerus" - Beta amd64 (20160325)
ProcEnviron:
 TERM=rxvt-unicode
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: lxd
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Seth Arnold (seth-arnold) wrote :
Revision history for this message
Agustin Covarrubias (agucova) wrote :

I'm having the same problem (same error), on a fresh installed ubuntu server 16.04. I just did apt-get update && apt-get upgrade, and it appeared. (No previous changes to the system at all).

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in lxd (Ubuntu):
status: New → Confirmed
Revision history for this message
Stéphane Graber (stgraber) wrote :

Hmm, I'm unfortunately on vacation for a little while so not sure when I can actually look into this again (we had a problem like this in 2.0.2 but 2.0.3 is supposed to have the fix...).

Just creating the directory should fix the issue for now.

Revision history for this message
Tycho Andersen (tycho-s) wrote :

I think we just fixed it for the tests, but not for actual LXD. I can see how it would happen on an untouched system, but I just did a successful upgrade from 2.0.2 to 2.0.3 myself (on a fresh system where I hadn't started LXD yet, so the directory didn't exist).

Revision history for this message
Tycho Andersen (tycho-s) wrote :

I think https://github.com/lxc/lxd/pull/2199 should fix it, but I'm trying to figure out why I can't reproduce.

Changed in lxd (Ubuntu):
importance: Undecided → High
Changed in lxd (Ubuntu):
status: Confirmed → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lxd - 2.0.4-0ubuntu2

---------------
lxd (2.0.4-0ubuntu2) yakkety; urgency=medium

  * Cherry-pick from upstream:
    - 0002-Fix-for-newer-shellcheck (Fixes adt with yakkety's shellcheck)

 -- Stéphane Graber <email address hidden> Tue, 16 Aug 2016 15:00:49 -0400

Changed in lxd (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.