undeletable containers in "ERROR" state

Bug #1576065 reported by Martin Pitt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lxd (Ubuntu)
Fix Released
High
Unassigned

Bug Description

Both on my amd64 laptop and on arm64 scalingstack instances I run into undeletable containers in error state over time:

$ lxc list
+---------------------+-------+------+------+------------+-----------+
| NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS |
+---------------------+-------+------+------+------------+-----------+
| adt-virt-lxd-kntimp | ERROR | | | PERSISTENT | 0 |
+---------------------+-------+------+------+------------+-----------+
| adt-virt-lxd-rxwyjf | ERROR | | | PERSISTENT | 0 |
+---------------------+-------+------+------+------------+-----------+

$ lxc delete adt-virt-lxd-kntimp
error: couldn't detect filesystem for '/var/lib/lxd/containers/adt-virt-lxd-kntimp': no such file or directory

Indeed this directory does not exist any more, so it's gone from disk but still present in the database. It usually works to "sudo mkdir" this directory and "lxc delete" again.

I'll attach the corresponding /var/log/lxd/<container>/lxd.log files for these two. I don't think that they contain anything interesting, though. fork{exec,start}.log in these are empty, and lxc.conf is nothing fancy.

I keep these two failed containers around for a while (i. e. don't do the mkdir/delete trick), in case you want to investigate anything on them.

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: lxd 2.0.0-0ubuntu4
ProcVersionSignature: Ubuntu 4.4.0-22.38-generic 4.4.8
Uname: Linux 4.4.0-22-generic x86_64
ApportVersion: 2.20.1-0ubuntu2
Architecture: amd64
CurrentDesktop: i3
Date: Thu Apr 28 09:24:33 2016
EcryptfsInUse: Yes
SourcePackage: lxd
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Martin Pitt (pitti) wrote :
Revision history for this message
Martin Pitt (pitti) wrote :
Revision history for this message
Stéphane Graber (stgraber) wrote :

Not sure what's the source of the problem, but one thing we should do is allow for containers in such state to be removed.

Revision history for this message
Stéphane Graber (stgraber) wrote :

Tracking the workaround here: https://github.com/lxc/lxd/issues/1967

It could be that the initial cause of this was two concurrent container removals, somehow leading to both of them failing towards the end.

Changed in lxd (Ubuntu):
status: New → Triaged
Changed in lxd (Ubuntu):
importance: Undecided → High
Changed in lxd (Ubuntu):
status: Triaged → Fix Committed
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.