[Pkg-libvirt-maintainers] Bug#1094583: Bug#1094583: libvirt-daemon-driver-qemu: apparmor template missing from filesystem
Kevin Otte
nivex at nivex.net
Sat Feb 1 16:51:07 GMT 2025
Since this is a test machine, I don't think I'd tried to start a VM
until this week. This only came up because I finally had some time to
work on a different VM related bug.
I was going to try and strip out only the relevant transaction, but it
looks like there were multiple and I'm not entirely certain if they
relate, so I've attached the whole log file. There's probably a lot of
noise, but I'd rather provide too much info than omit something important.
I'm used to the changed file prompt on /etc/libvirt/qemu.conf as I
usually get it even on stable updates. I add a `spice_listen = "::1"` in
there to force IPv6 for my environment.
Unfortunately I did start to flail a bit to try and get things going
again, so the outputs may not be quite as useful. Not knowing what those
transfer files were and seeing fairly old timestamps on them, I deleted
the whole /etc/apparmor.d/libvirt directory in hopes of having an `apt
--reinstall` regenerate it. I then also ran a `dpkg --force-confmiss -i
/tmp/libvirt-daemon-driver-qemu_11.0.0-1_amd64.deb` to get the missing
files back. I did not do this for any of the other packages, so those
file states may still be of use:
kjotte at saratoga:~$ sudo find /etc/libvirt/ -ls | grep -i conf
131543 4 -rw-r--r-- 1 root root 2169 Jul 1 2022
/etc/libvirt/qemu-lockd.conf.dpkg-transfer
131321 40 -rw------- 1 root root 39031 Dec 17 14:58
/etc/libvirt/qemu.conf.dpkg-old
132450 4 -rw-r--r-- 1 root root 1041 Jan 17 17:39
/etc/libvirt/network.conf
132849 4 -rw-r--r-- 1 root root 547 Sep 2 05:47
/etc/libvirt/libvirt.conf
132617 20 -rw-r--r-- 1 root root 17826 Feb 26 2023
/etc/libvirt/libvirtd.conf.dpkg-transfer
132860 4 -rw-r--r-- 1 root root 1041 Sep 16 15:41
/etc/libvirt/network.conf.dpkg-transfer
131527 4 -rw-r--r-- 1 root root 2169 Jan 17 17:39
/etc/libvirt/qemu-lockd.conf
132821 40 -rw------- 1 root root 37466 Sep 16 15:41
/etc/libvirt/qemu.conf.dpkg-transfer
131820 40 -rw------- 1 root root 39126 Jan 28 11:18
/etc/libvirt/qemu.conf
131544 4 -rw-r--r-- 1 root root 2465 Jul 1 2022
/etc/libvirt/qemu-sanlock.conf.dpkg-transfer
131541 4 -rw-r--r-- 1 root root 1175 Jul 1 2022
/etc/libvirt/lxc.conf.dpkg-transfer
131539 4 -rw-r--r-- 1 root root 2465 Jul 1 2022
/etc/libvirt/libxl-sanlock.conf.dpkg-transfer
131538 4 -rw-r--r-- 1 root root 2169 Jul 1 2022
/etc/libvirt/libxl-lockd.conf.dpkg-transfer
132847 4 -rw-r--r-- 1 root root 4095 Sep 2 05:47
/etc/libvirt/virtlogd.conf.dpkg-transfer
132848 4 -rw-r--r-- 1 root root 450 Sep 2 05:47
/etc/libvirt/libvirt-admin.conf
131528 4 -rw-r--r-- 1 root root 2465 Jan 17 17:39
/etc/libvirt/qemu-sanlock.conf
131546 4 -rw-r--r-- 1 root root 3058 Jul 1 2022
/etc/libvirt/virtlockd.conf.dpkg-transfer
131540 4 -rw-r--r-- 1 root root 2268 Jul 1 2022
/etc/libvirt/libxl.conf.dpkg-transfer
kjotte at saratoga:~$ sudo find /etc/apparmor.d/ -ls | grep -i virt
131519 4 -rw-r--r-- 1 root root 1807 Sep 16 15:41
/etc/apparmor.d/usr.lib.libvirt.virt-aa-helper.dpkg-transfer
131779 0 -rw-r--r-- 1 root root 0 Aug 31 2022
/etc/apparmor.d/local/usr.lib.libvirt.virt-aa-helper
131784 0 -rw-r--r-- 1 root root 0 Aug 31 2022
/etc/apparmor.d/local/usr.sbin.libvirtd
131999 4 -rw-r--r-- 1 root root 1898 Jan 17 17:39
/etc/apparmor.d/usr.lib.libvirt.virt-aa-helper
132803 8 -rw-r--r-- 1 root root 4735 Sep 16 15:41
/etc/apparmor.d/usr.sbin.libvirtd.dpkg-transfer
132574 8 -rw-r--r-- 1 root root 4780 Jan 17 17:39
/etc/apparmor.d/usr.sbin.libvirtd
786438 4 drwxr-xr-x 2 root root 4096 Jan 30 16:43
/etc/apparmor.d/libvirt
786469 4 -rw-r--r-- 1 root root 303 Jan 28 21:18
/etc/apparmor.d/libvirt/libvirt-88e89a0c-232f-4abc-b3ac-56cd87b1a707
786471 4 -rw-r--r-- 1 root root 303 Jan 28 21:21
/etc/apparmor.d/libvirt/libvirt-328ff1d4-b514-4d66-be07-8403e4c206b0
786478 4 -rw-r--r-- 1 root root 303 Jan 28 21:35
/etc/apparmor.d/libvirt/libvirt-d736d34f-ec0c-476c-b320-b198ae86bb47
786482 4 -rw-r--r-- 1 root root 303 Jan 30 11:23
/etc/apparmor.d/libvirt/libvirt-ff762a15-9f28-491e-9bec-4ef668fa277f
786461 4 -rw-r--r-- 1 root root 192 Jan 15 03:06
/etc/apparmor.d/libvirt/TEMPLATE.qemu
132513 12 -rw-r--r-- 1 root root 9258 Jan 17 17:39
/etc/apparmor.d/abstractions/libvirt-qemu
132798 8 -rw-r--r-- 1 root root 4610 Sep 16 15:41
/etc/apparmor.d/abstractions/libvirt-lxc.dpkg-transfer
132809 12 -rw-r--r-- 1 root root 9063 Sep 16 15:41
/etc/apparmor.d/abstractions/libvirt-qemu.dpkg-transfer
On 2/1/25 10:43, Andrea Bolognani wrote:
> On Fri, Jan 31, 2025 at 03:17:08PM -0500, Kevin Otte wrote:
>> Thanks for the pointer to /var/log/apt/term.log*
>>
>> On a previous upgrade to 10.7.0-3 from 9.0.0-4+deb12u1, I see a bunch of
>> messages about "Preparing transfer of config file ... (from
>> libvirt-daemon-system to X)" where X included libvirt-daemon-common,
>> libvirt-daemon-driver-{xen,lxx,qemu,network}.
>>
>> It looks like that transfer failed somehow because there are a bunch of
>> {conffile}.dpkg-transfer files on the filesystem.
>
> Okay, that tracks. It's surprising that you were able to start VMs at
> all after that point though, I would have expected trouble to have
> begun back then.
>
> Can you please provide the full log for the relevant apt transaction?
>
>> $ sudo find /etc/libvirt/ -name '*dpkg*'
>> /etc/libvirt/qemu-lockd.conf.dpkg-transfer
>> /etc/libvirt/qemu.conf.dpkg-old
>> /etc/libvirt/libvirtd.conf.dpkg-transfer
>> /etc/libvirt/network.conf.dpkg-transfer
>> /etc/libvirt/qemu.conf.dpkg-transfer
>> /etc/libvirt/qemu-sanlock.conf.dpkg-transfer
>> /etc/libvirt/lxc.conf.dpkg-transfer
>> /etc/libvirt/libxl-sanlock.conf.dpkg-transfer
>> /etc/libvirt/libxl-lockd.conf.dpkg-transfer
>> /etc/libvirt/virtlogd.conf.dpkg-transfer
>> /etc/libvirt/virtlockd.conf.dpkg-transfer
>> /etc/libvirt/libxl.conf.dpkg-transfer
>
> Thanks. Can you please provide the output of
>
> $ sudo find /etc/libvirt/ -ls | grep -i conf
> $ sudo find /etc/apparmor.d/ -ls | grep -i virt
>
> so that I can get a clearer picture? I should have asked for this to
> begin with, sorry :)
>
>> I wonder if the transfer was impacted by /etc/libvirt/qemu.conf having been
>> modified. At the prompt I chose "Y: install the package maintainer's
>> version" to ease the upgrade with the intent to go back re-modify it later.
>
> It's weird that you got the prompt at all: if I'm reading the code
> correctly, that shouldn't have happened. Of course that's arguably in
> itself a problem...
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: term.log.5.gz
Type: application/gzip
Size: 112948 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-libvirt-maintainers/attachments/20250201/ce3949c6/attachment-0001.gz>
More information about the Pkg-libvirt-maintainers
mailing list