Bug#1108947: setup-testbed: runs systemd-detect-virt from the host
From
Helmut Grohne@21:1/5 to
All on Tue Jul 8 14:00:01 2025
Package: autopkgtest
Version: 5.49
Severity: minor
Hi,
while looking into an unrelated(?) testbed failure, I noticed that setup-testbed runs systemd-detect-virt. In theory, this is the right
thing to do, but there are several problems with the way this is being
done.
For one thing, the hosts systemd-detect-virt is being run. As there is
no dependency on systemd, it may be missing and then install rng-tools
due to a detection failure.
For another, we may prepare a vm image from a container and then
rng-tools may go missing even though it would be useful.
There likely is no perfect solution here and what we currently have is
an approximation of reality. Any way this is being changed bears a risk
of breaking someone's use case due to the existing false positives and
false negatives.
I'm not sure how to improve this. Wrapping it in `chroot "$root"` would plausibly result in it always being detected as a container. The choice
of installing rng-tools feels more backend-specific than anything else
though incus can do both containers and VMs.
I you end up figuring that there is no path forward here, please close
the bug. In that case it still documents non-obvious behaviour.
Helmut
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)