Closed simondeziel closed 8 months ago
@simondeziel do you only observe this on 5.0.3?
Also observed on latest/edge:
Device cloudinit removed from v1
+ lxc exec v1 -- stat /dev/sr0
stat: cannot statx '/dev/sr0': No such file or directory
+ echo '==> Stopping VM'
==> Stopping VM
+ lxc stop -f v1
Error: Failed unmounting instance: Failed to unmount LVM logical volume: Failed to unmount "/var/snap/lxd/common/lxd/storage-pools/vmpool-lvm-2563/virtual-machines/v1": device or resource busy
Try `lxc info --show-log v1` for more info
This also affects rarely hits lvm thin on 5.0/edge, see https://github.com/canonical/lxd-ci/actions/runs/8029713685/job/21936309474#step:6:1700:
+ lxc exec v1 -- stat /dev/sr0
stat: cannot statx '/dev/sr0': No such file or directory
+ echo '==> Stopping VM'
==> Stopping VM
+ lxc stop -f v1
Error: Failed unmounting instance: Failed to unmount LVM logical volume: Failed to unmount "/var/snap/lxd/common/lxd/storage-pools/vmpool-lvm-thin-2442/virtual-machines/v1": device or resource busy
Try `lxc info --show-log v1` for more info
Reproduced this
architecture: x86_64
config:
image.architecture: amd64
image.description: ubuntu 22.04 LTS amd64 (minimal daily) (20240227)
image.label: minimal daily
image.os: ubuntu
image.release: jammy
image.serial: "20240227"
image.type: disk1.img
image.version: "22.04"
volatile.base_image: c2948cec8e6573161b4a149db1438c94b0bcf786c27ccfb79bc1bbbba9ae5555
volatile.cloud-init.instance-id: f29c5bb3-d7fa-4ce4-821e-09efe9055764
volatile.eth0.hwaddr: 00:16:3e:51:82:08
volatile.last_state.power: STOPPED
volatile.last_state.ready: "false"
volatile.uuid: 788c2725-7e38-4526-be5b-cded085f7c70
volatile.uuid.generation: 788c2725-7e38-4526-be5b-cded085f7c70
volatile.vsock_id: "1334420875"
devices:
block1:
readonly: "false"
source: /tmp/lxd-test-vmpool-lvm-1312/lxd-test-block
type: disk
cloudinit:
source: cloud-init:config
type: disk
root:
path: /
pool: vmpool-lvm-1312
type: disk
LXD is keeping a file handle open to the config drive iso.
ls /proc/7005/fd -l
total 0
lr-x------ 1 root root 64 Feb 28 15:20 0 -> /dev/null
lrwx------ 1 root root 64 Feb 28 15:20 1 -> 'socket:[42874]'
lrwx------ 1 root root 64 Feb 28 15:20 10 -> /var/snap/lxd/common/lxd/database/local.db
lrwx------ 1 root root 64 Feb 28 15:20 11 -> 'socket:[45117]'
lrwx------ 1 root root 64 Feb 28 15:20 12 -> 'socket:[45114]'
lrwx------ 1 root root 64 Feb 28 15:20 13 -> 'anon_inode:[eventpoll]'
lr-x------ 1 root root 64 Feb 28 15:20 14 -> 'pipe:[45111]'
l-wx------ 1 root root 64 Feb 28 15:20 15 -> 'pipe:[45111]'
lr-x------ 1 root root 64 Feb 28 15:20 16 -> 'pipe:[45112]'
l-wx------ 1 root root 64 Feb 28 15:20 17 -> 'pipe:[45112]'
lrwx------ 1 root root 64 Feb 28 15:20 18 -> 'anon_inode:[eventfd]'
l-wx------ 1 root root 64 Feb 28 15:20 19 -> '/var/snap/lxd/common/lxd/database/global/.probe_fallocate (deleted)'
lrwx------ 1 root root 64 Feb 28 15:20 2 -> 'socket:[42874]'
lr-x------ 1 root root 64 Feb 28 15:20 20 -> /dev/null
lrwx------ 1 root root 64 Feb 28 15:20 21 -> 'socket:[45118]'
lrwx------ 1 root root 64 Feb 28 15:20 22 -> 'socket:[43731]'
l-wx------ 1 root root 64 Feb 28 15:20 24 -> /var/snap/lxd/common/lxd/database/global/open-1
lrwx------ 1 root root 64 Feb 28 15:20 25 -> 'anon_inode:[eventfd]'
l-wx------ 1 root root 64 Feb 28 15:20 26 -> /var/snap/lxd/common/lxd/database/global/open-2
l-wx------ 1 root root 64 Feb 28 15:20 27 -> /var/snap/lxd/common/lxd/database/global/open-3
lrwx------ 1 root root 64 Feb 28 15:20 28 -> 'anon_inode:[fanotify]'
lrwx------ 1 root root 64 Feb 28 15:20 29 -> 'socket:[42978]'
lrwx------ 1 root root 64 Feb 28 14:51 3 -> 'socket:[67874]'
lr-x------ 1 root root 64 Feb 28 15:20 30 -> /dev
lrwx------ 1 root root 64 Feb 28 15:20 31 -> 'socket:[45172]'
lr-x------ 1 root root 64 Feb 28 14:49 36 -> /var/snap/lxd/common/lxd/storage-pools/vmpool-lvm-1312/virtual-machines/v1/config.iso
l-wx------ 1 root root 64 Feb 28 15:20 4 -> /var/snap/lxd/common/lxd/logs/lxd.log
lrwx------ 1 root root 64 Feb 28 15:20 5 -> 'anon_inode:[eventpoll]'
lr-x------ 1 root root 64 Feb 28 15:20 6 -> 'pipe:[44515]'
l-wx------ 1 root root 64 Feb 28 15:20 7 -> 'pipe:[44515]'
lrwx------ 1 root root 64 Feb 28 15:20 8 -> 'socket:[29191]'
lrwx------ 1 root root 64 Feb 28 15:20 9 -> 'socket:[45116]'
Unrelated but should LXD/dqlite close the FD associated with fallocate support probing?
l-wx------ 1 root root 64 Feb 28 15:20 19 -> '/var/snap/lxd/common/lxd/database/global/.probe_fallocate (deleted)'
Unrelated but should LXD/dqlite close the FD associated with fallocate support probing? l-wx------ 1 root root 64 Feb 28 15:20 19 -> '/var/snap/lxd/common/lxd/database/global/.probe_fallocate (deleted)'
@simondeziel a question for @cole-miller
tests/storage-vm failed multiple times on:
It sometimes succeed however.
Additional information: