I’ve noticed a bug with latest and previous LXD versions that instances will get stuck after deletion is requested, the container will stick around in the RUNNING
state.
$ lxc delete -f bc-crate-1d0aa532-add0-40b9-a7a8-b44689be5824
Error: Error deleting storage volume: Failed to run: zfs destroy -r master/containers/bc-crate-1d0aa532-add0-40b9-a7a8-b44689be5824: cannot destroy 'master/containers/bc-crate-1d0aa532-add0-40b9-a7a8-b44689be5824': dataset is busy
After running this command the container is stopped, but the problem still persists trying to delete. I’ve had to use the advice at https://github.com/openzfs/zfs/issues/1810 to kill processes, but this has to be done manually and isn’t ideal. Any ideas why this might be happening?
I’m using LXD 4.7/18137 on the snap package. Here is the containers configuration:
architecture: x86_64
config:
image.architecture: amd64
image.description: Debian buster amd64 (20200713_05:24)
image.name: debian-buster-amd64-default-20200713_05:24
image.os: debian
image.release: buster
image.serial: "20200713_05:24"
image.variant: default
limits.cpu: "2"
limits.memory: 1152MB
security.devlxd: "false"
volatile.base_image: d689cfcbfa67b88219c7750b53267b0f01a4c497e8f1d3445773e0b13fe84ca1
volatile.eth0.hwaddr: 00:16:3e:49:6f:87
volatile.idmap.base: "0"
volatile.idmap.current: '[{"Isuid":true,"Isgid":false,"Hostid":1000000,"Nsid":0,"Maprange":1000000000},{"Isuid":false,"Isgid":true,"Hostid":1000000,"Nsid":0,"Maprange":1000000000}]'
volatile.idmap.next: '[{"Isuid":true,"Isgid":false,"Hostid":1000000,"Nsid":0,"Maprange":1000000000},{"Isuid":false,"Isgid":true,"Hostid":1000000,"Nsid":0,"Maprange":1000000000}]'
volatile.last_state.idmap: '[{"Isuid":true,"Isgid":false,"Hostid":1000000,"Nsid":0,"Maprange":1000000000},{"Isuid":false,"Isgid":true,"Hostid":1000000,"Nsid":0,"Maprange":1000000000}]'
volatile.last_state.power: STOPPED
devices:
crated:
connect: unix:/run/crated.sock
gid: "1000"
listen: unix:/tmp/bc-daemon-1d0aa532-add0-40b9-a7a8-b44689be5824-crated.sock
type: proxy
uid: "1000"
eth0:
ipv4.address: 10.98.0.11
name: eth0
network: lxdbr0
parent: ""
type: nic
ephemeral: false
profiles:
- default
stateful: false
description: ""