[Bug 1927519] Re: Mitigate libvirt: error : unable to set AppArmor profile 'libvirt-<vm-uuid>' for '/usr/bin/kvm-spice': No such file or directory
Christian Ehrhardt
1927519 at bugs.launchpad.net
Thu Nov 11 13:43:38 UTC 2021
Thanks Alejandro for letting me know, in that case let us apply it to
Jammy now and SRU from there without waiting for the new version we will
get into 22.04 later.
Working on this together with the slightly more complex 1948880 for Jammy now.
PPA: https://launchpad.net/~ci-train-ppa-service/+archive/ubuntu/4710
MR: https://code.launchpad.net/~paelzer/ubuntu/+source/libvirt/+git/libvirt/+merge/411755
--
You received this bug notification because you are a member of Ubuntu
OpenStack, which is subscribed to Ubuntu Cloud Archive.
https://bugs.launchpad.net/bugs/1927519
Title:
Mitigate libvirt: error : unable to set AppArmor profile 'libvirt-<vm-
uuid>' for '/usr/bin/kvm-spice': No such file or directory
Status in Ubuntu Cloud Archive:
New
Status in Ubuntu Cloud Archive queens series:
New
Status in Ubuntu Cloud Archive stein series:
New
Status in Ubuntu Cloud Archive ussuri series:
New
Status in libvirt package in Ubuntu:
In Progress
Status in libvirt source package in Bionic:
Confirmed
Status in libvirt source package in Focal:
Confirmed
Status in libvirt source package in Hirsute:
Confirmed
Status in libvirt source package in Impish:
Confirmed
Status in libvirt source package in Jammy:
In Progress
Bug description:
[Impact]
Some times libvirt fails to start a vm with the following error :
libvirt: error : unable to set AppArmor profile 'libvirt-b05b297f-952f-42d6-b04e-f9a13767db54' for '/usr/bin/kvm-spice': No such file or directory
This happens because for some reason file
/etc/apparmor.d/libvirt/libvirt-<vm-uuid> has 0 size.
Although, we do not now why the above file gets truncated and therefore we do not know the root cause, I open this bug to come up with a way to mitigate the issue.
E.g. when libvirt sees that this file is 0-size to delete it and create it again.
[Test case]
To reproduce this behaviour, create a vm and stop it, note the uuid.
Then :
## touch /etc/apparmor.d/libvirt/libvirt-<vm-uuid>
# touch /etc/apparmor.d/libvirt/libvirt-b05b297f-952f-42d6-b04e-f9a13767db54
# ls -la libvirt-b05b297f-952f-42d6-b04e-f9a13767db54
-rw-r--r-- 1 root root 0 May 6 18:46 libvirt-b05b297f-952f-42d6-b04e-f9a13767db54
Try to start the vm, it will fail with :
libvirt: error : unable to set AppArmor profile 'libvirt-b05b297f-952f-42d6-b04e-f9a13767db54' for '/usr/bin/kvm-spice': No such file or directory
To be able to start the vm again just delete the libvirt-<vm-uuid>
file.
[Regression Potential]
TBD
[Other]
Similar reported bug : https://bugs.debian.org/cgi-
bin/bugreport.cgi?bug=890084
To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-archive/+bug/1927519/+subscriptions
More information about the Ubuntu-openstack-bugs
mailing list