lxc-destroy fails on btrfs subvolumes

Bug #1441068 reported by Martin Pitt
28
This bug affects 5 people
Affects Status Importance Assigned to Milestone
lxc (Ubuntu)
Fix Released
High
Unassigned
Vivid
Fix Released
Undecided
Unassigned
Wily
Fix Released
Undecided
Unassigned

Bug Description

$ sudo lxc-destroy -n adt-vivid
[sudo] password for martin:
lxc_container: utils.c: _recursive_rmdir_onedev: 147 _recursive_rmdir_onedev: failed to delete /srv/lxc/adt-vivid/rootfs/var/lib
lxc_container: utils.c: _recursive_rmdir_onedev: 147 _recursive_rmdir_onedev: failed to delete /srv/lxc/adt-vivid/rootfs/var
lxc_container: utils.c: _recursive_rmdir_onedev: 147 _recursive_rmdir_onedev: failed to delete /srv/lxc/adt-vivid/rootfs
lxc_container: lxccontainer.c: container_destroy: 2050 Error destroying rootfs for adt-vivid
Destroying adt-vivid failed

This is because the container rootfs has a btrfs subvolume:

ID 557 gen 97073 top level 266 path @srv/lxc/adt-vivid/rootfs/var/lib/machines

After "sudo btrfs subvolume delete /srv/lxc/adt-vivid/rootfs/var/lib/machines" I can remove the container.

ProblemType: Bug
DistroRelease: Ubuntu 15.04
Package: lxc 1.1.1-0ubuntu4
ProcVersionSignature: Ubuntu 3.19.0-12.12-generic 3.19.3
Uname: Linux 3.19.0-12-generic x86_64
ApportVersion: 2.17-0ubuntu1
Architecture: amd64
CurrentDesktop: Unity
Date: Tue Apr 7 11:51:51 2015
EcryptfsInUse: Yes
SourcePackage: lxc
UpgradeStatus: No upgrade log present (probably fresh install)
defaults.conf:
 lxc.network.type = veth
 lxc.network.link = lxcbr0
 lxc.network.flags = up
 lxc.network.hwaddr = 00:16:3e:xx:xx:xx
lxc.conf: lxc.lxcpath = /srv/lxc

Revision history for this message
Martin Pitt (pitti) wrote :
Changed in lxc (Ubuntu):
importance: Undecided → Medium
Changed in lxc (Ubuntu):
status: New → Triaged
importance: Medium → High
Revision history for this message
Chris West (faux) wrote :

This also occurs for limited user containers, without asking for a btrfs backing store. This is more of a problem as the limited user can't delete (or even detect) the subvolume themselves.

On a standard whole-partition-as-btrfs system, as setup by the installer, this looks like:
ID 257 gen 46021 top level 5 path @
ID 258 gen 46021 top level 5 path @home
...
ID 373 gen 35464 top level 257 path @/var/lib/machines
ID 374 gen 45983 top level 258 path faux/.local/share/lxc/vivid/rootfs/var/lib/machines
ID 395 gen 45995 top level 258 path faux/.local/share/lxc/vivid2/rootfs/var/lib/machines
ID 396 gen 46011 top level 258 path faux/.local/share/lxc/vivid3/rootfs/var/lib/machines
ID 397 gen 46014 top level 258 path faux/.local/share/lxc/vivid4/rootfs/var/lib/machines

Revision history for this message
Serge Hallyn (serge-hallyn) wrote : Re: [Bug 1441068] Re: lxc-destroy fails on btrfs subvolumes

This is fixed in upstream git HEAD, so you can get the fix from
ppa:ubuntu-lxc/daily. It should hopefully make its way into the
vivid package soon.

 status: fixcommitted

Changed in lxc (Ubuntu):
status: Triaged → Fix Committed
Changed in lxc (Ubuntu Vivid):
status: New → In Progress
Changed in lxc (Ubuntu Wily):
status: New → In Progress
Changed in lxc (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Chris J Arges (arges) wrote : Please test proposed package

Hello Martin, or anyone else affected,

Accepted lxc into vivid-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/lxc/1.1.5-0ubuntu0.15.04.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in lxc (Ubuntu Vivid):
status: In Progress → Fix Committed
tags: added: verification-needed
Changed in lxc (Ubuntu Wily):
status: In Progress → Fix Committed
Revision history for this message
Chris J Arges (arges) wrote :

Hello Martin, or anyone else affected,

Accepted lxc into wily-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/lxc/1.1.5-0ubuntu0.15.10.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Revision history for this message
Chris J Arges (arges) wrote :

Hello Martin, or anyone else affected,

Accepted lxc into wily-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/lxc/1.1.5-0ubuntu0.15.10.3 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Revision history for this message
Chris J Arges (arges) wrote :

Hello Martin, or anyone else affected,

Accepted lxc into vivid-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/lxc/1.1.5-0ubuntu0.15.04.3 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lxc - 1.1.5-0ubuntu0.15.04.3

---------------
lxc (1.1.5-0ubuntu0.15.04.3) vivid-proposed; urgency=medium

  * Cherry-pick from upstream:
    - Fix preserve_ns to work on < 3.8 kernels. (LP: #1516971)
    - Fix process title rewrite to not mangle the environment. (LP: #1517107)

lxc (1.1.5-0ubuntu0.15.04.2) vivid-proposed; urgency=medium

  * Cherry-pick from upstream:
    - Fix ubuntu-cloud template to detect compression algorithm instead
      of hardcoding xz. Also update list of supported releases and use trusty
      as the fallback release. (LP: #1515463)
  * Update lxc-tests description to make it clear that this package is
    meant to be used by developers and by automated testing.

lxc (1.1.5-0ubuntu0.15.04.1) vivid-proposed; urgency=medium

  * New upstream bugfix release (MRE) (1.1.5)
    (LP: #1497420, LP: #1436723, LP: #1441068, LP: #1504496,
     LP: #1466458, LP: #1510619)
  * Drop proxy detection from the autopkgtest exercise script.

 -- Stéphane Graber <email address hidden> Wed, 18 Nov 2015 13:41:23 -0500

Changed in lxc (Ubuntu Vivid):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lxc - 1.1.5-0ubuntu0.15.10.3

---------------
lxc (1.1.5-0ubuntu0.15.10.3) wily-proposed; urgency=medium

  * Cherry-pick from upstream:
    - Fix preserve_ns to work on < 3.8 kernels. (LP: #1516971)
    - Fix process title rewrite to not mangle the environment. (LP: #1517107)

lxc (1.1.5-0ubuntu0.15.10.2) wily-proposed; urgency=medium

  * Cherry-pick from upstream:
    - Fix ubuntu-cloud template to detect compression algorithm instead
      of hardcoding xz. Also update list of supported releases and use trusty
      as the fallback release. (LP: #1515463)
  * Update lxc-tests description to make it clear that this package is
    meant to be used by developers and by automated testing.

lxc (1.1.5-0ubuntu0.15.10.1) wily-proposed; urgency=medium

  * New upstream bugfix release (MRE) (1.1.5)
    (LP: #1497420, LP: #1441068, LP: #1466458, LP: #1510619)
  * Drop proxy detection from the autopkgtest exercise script.

 -- Stéphane Graber <email address hidden> Wed, 18 Nov 2015 13:40:28 -0500

Changed in lxc (Ubuntu Wily):
status: Fix Committed → Fix Released
Revision history for this message
Stéphane Graber (stgraber) wrote : Update Released

The verification of the Stable Release Update for lxc has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

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.