2022-11-21 17:56:15 |
Lena Voytek |
bug |
|
|
added bug |
2022-11-21 17:56:29 |
Lena Voytek |
nominated for series |
|
Ubuntu Lunar |
|
2022-11-21 17:56:29 |
Lena Voytek |
bug task added |
|
libvirt (Ubuntu Lunar) |
|
2022-11-21 17:56:29 |
Lena Voytek |
nominated for series |
|
Ubuntu Kinetic |
|
2022-11-21 17:56:29 |
Lena Voytek |
bug task added |
|
libvirt (Ubuntu Kinetic) |
|
2022-11-21 17:56:38 |
Lena Voytek |
libvirt (Ubuntu Kinetic): status |
New |
In Progress |
|
2022-11-21 17:56:40 |
Lena Voytek |
libvirt (Ubuntu Kinetic): assignee |
|
Lena Voytek (lvoytek) |
|
2022-11-21 19:57:14 |
Launchpad Janitor |
merge proposal linked |
|
https://code.launchpad.net/~lvoytek/ubuntu/+source/libvirt/+git/libvirt/+merge/433390 |
|
2022-11-22 10:24:16 |
Launchpad Janitor |
merge proposal linked |
|
https://code.launchpad.net/~paelzer/ubuntu/+source/libvirt/+git/libvirt/+merge/433429 |
|
2022-11-22 14:57:17 |
Launchpad Janitor |
merge proposal linked |
|
https://code.launchpad.net/~paelzer/ubuntu/+source/libvirt/+git/libvirt/+merge/433443 |
|
2022-11-22 17:13:16 |
Lena Voytek |
description |
As a spinoff of LP: #1989100, we found that swtpm pid files were not being removed after shutting down a vm in Kinetic. Listing the directory /run/libvirt/qemu/swtpm after a few vm restarts shows all old pid files are still there:
$ sudo ls -la /run/libvirt/qemu/swtpm
drwxrwx--- 2 libvirt-qemu swtpm 80 Nov 17 13:34 .
drwxr-xr-x 5 root root 180 Nov 17 13:34 ..
-rw-r--r-- 1 root root 5 Nov 17 12:57 1-win11-swtpm.pid
-rw-r--r-- 1 root root 5 Nov 17 13:34 2-win11-swtpm.pid
...
srw------- 1 libvirt-qemu kvm 0 Nov 17 16:20 5-win11-swtpm.sock |
[Impact]
When a user shuts down a qemu vm that uses swtpm, the swtpm pid file will be left behind.
This fix should be backported to Kinetic to stop ongoing clutter from dead pid files.
The issue is fixed using a patch commit from upstream that clears out the existing swtpm pid file when the vm shuts down.
[Test Plan]
To test, install virt-manager and swtpm then create a vm:
# sudo apt install virt-manager swtpm
Create a vm in virt-manager and on the last page
> Select "Customize configuration before install"
> Click Finish
> Click Add Hardware
> Select TPM with Model "TIS" and version 2.0
> Click "Begin Installation"
Turn the vm off and on a few times then check /run/libvirt/qemu/swtpm:
# sudo ls -la /run/libvirt/qemu/swtpm
In the original version multiple pid files will show up, e.g.
drwxrwx--- 2 libvirt-qemu swtpm 80 Nov 17 13:34 .
drwxr-xr-x 5 root root 180 Nov 17 13:34 ..
-rw-r--r-- 1 root root 5 Nov 17 12:57 1-win11-swtpm.pid
-rw-r--r-- 1 root root 5 Nov 17 13:34 2-win11-swtpm.pid
With the fix only one pid file will show up per running TPM virtual machine and the folder will be empty if there are none.
[Where problems could occur]
This fix modifies the qemu_tpm stop function, which is triggered when a vm completes shutdown. So any issues that arise from this fix would happen at this point. Most likely, when an issue shows up it would be related to file system manipulation in the /run/libvirt/qemu/swtpm directory.
[Other Info]
Fix added to lunar in version 8.6.0-0ubuntu4
[Original Description]
As a spinoff of LP: #1989100, we found that swtpm pid files were not being removed after shutting down a vm in Kinetic. Listing the directory /run/libvirt/qemu/swtpm after a few vm restarts shows all old pid files are still there:
$ sudo ls -la /run/libvirt/qemu/swtpm
drwxrwx--- 2 libvirt-qemu swtpm 80 Nov 17 13:34 .
drwxr-xr-x 5 root root 180 Nov 17 13:34 ..
-rw-r--r-- 1 root root 5 Nov 17 12:57 1-win11-swtpm.pid
-rw-r--r-- 1 root root 5 Nov 17 13:34 2-win11-swtpm.pid
...
srw------- 1 libvirt-qemu kvm 0 Nov 17 16:20 5-win11-swtpm.sock |
|
2022-11-29 02:36:24 |
Launchpad Janitor |
libvirt (Ubuntu Lunar): status |
In Progress |
Fix Released |
|
2022-11-29 09:20:21 |
Christian Ehrhardt |
tags |
|
server-todo |
|
2022-12-05 20:34:59 |
Brian Murray |
libvirt (Ubuntu Kinetic): status |
In Progress |
Fix Committed |
|
2022-12-05 20:35:01 |
Brian Murray |
bug |
|
|
added subscriber Ubuntu Stable Release Updates Team |
2022-12-05 20:35:02 |
Brian Murray |
bug |
|
|
added subscriber SRU Verification |
2022-12-05 20:35:06 |
Brian Murray |
tags |
server-todo |
server-todo verification-needed verification-needed-kinetic |
|
2022-12-05 21:45:32 |
Lena Voytek |
tags |
server-todo verification-needed verification-needed-kinetic |
server-todo verification-done verification-done-kinetic |
|
2023-01-03 21:20:28 |
Launchpad Janitor |
libvirt (Ubuntu Kinetic): status |
Fix Committed |
Fix Released |
|
2023-01-03 21:20:39 |
Brian Murray |
removed subscriber Ubuntu Stable Release Updates Team |
|
|
|