lxc-destroy fails on btrfs subvolumes
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_
lxc_container: utils.c: _recursive_
lxc_container: utils.c: _recursive_
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/
After "sudo btrfs subvolume delete /srv/lxc/
ProblemType: Bug
DistroRelease: Ubuntu 15.04
Package: lxc 1.1.1-0ubuntu4
ProcVersionSign
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
Changed in lxc (Ubuntu): | |
status: | New → Triaged |
importance: | Medium → High |
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 |
tags: |
added: verification-done removed: verification-needed |
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: share/lxc/ vivid/rootfs/ var/lib/ machines share/lxc/ vivid2/ rootfs/ var/lib/ machines share/lxc/ vivid3/ rootfs/ var/lib/ machines share/lxc/ vivid4/ rootfs/ var/lib/ machines
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/
ID 395 gen 45995 top level 258 path faux/.local/
ID 396 gen 46011 top level 258 path faux/.local/
ID 397 gen 46014 top level 258 path faux/.local/