[Pkg-libvirt-maintainers] Bug#848314: Further fix for discussion in the scope of smoke-qemu-session

Christian Ehrhardt christian.ehrhardt at canonical.com
Fri Dec 16 09:02:23 UTC 2016


Package: libvirt
Version: 2.5.0-1
Severity: normal

This is a continuation of debbug 848247.
But you said you want to close that with next upload but I should come back.

While the tests are now working fine in local autopkgtest I was throwing
them at launchpad this night.
And I think there I had a case where the discussion on "virt-host-validate
qemu".

Maybe we should use it as an early exits as in the lxc case - to detect
incompatible environments.
I've seen this:
+ virt-host-validate qemu
  QEMU: Checking for hardware virtualization
  : PASS
  QEMU: Checking if device /dev/kvm exists
  : FAIL (Check that the 'kvm-intel' or 'kvm-amd' modules are loaded & the
BIOS has enabled virtualization)

[...]

+ virsh start sqs
error: Failed to start domain sqs
error: unsupported configuration: Domain requires KVM, but it is not
available. Check that virtualization is enabled in the host BIOS, and host
configuration is setup to load the kvm modules.

That is IMHO due to only having "isolation-container", but could even
happen in isolaton-machine dependin on the setup.

The TL;DR that I suggest is:
1. tampering with (actually more depending on) modules => needs
isolation-machine
2. if virt-host-validate qemu fails use it as an early exit (as you agreed
for the lxc case) as the env won't be good (in some way at least) to later
on in the test really start the guests

I kept the needs-root for now in my local delta, it will still use the
qemu:/// connection since the env is set.

So for now I'd suggest to add:
diff --git a/debian/tests/control b/debian/tests/control
index f965827..c4f5244 100644
--- a/debian/tests/control
+++ b/debian/tests/control
@@ -5,7 +5,7 @@ Restrictions: allow-stderr
Tests: smoke-qemu-session
Depends: libvirt-daemon-system, libvirt-clients, qemu-system, libxml2-
utils,
         qemu-kvm
-Restrictions: allow-stderr, isolation-container, needs-root
+Restrictions: allow-stderr, isolation-machine, needs-root

Tests: smoke-lxc
Depends: libvirt-daemon-system, libvirt-clients, libxml2-utils
diff --git a/debian/tests/smoke-qemu-session b/debian/tests/smoke-qemu-
session
index c238308..968a3f3 100755
--- a/debian/tests/smoke-qemu-session
+++ b/debian/tests/smoke-qemu-session
@@ -29,7 +29,7 @@ if [ $(uname -m) != "x86_64" ]; then
fi

echo echo "Running as $USER"
-virt-host-validate qemu || true
+virt-host-validate qemu || exit 0
virsh capabilities
virsh capabilities | grep -qs "arch.*x86_64"
virsh capabilities | grep -qs 'os_type>hvm'


P.S. FYI I found another issue with the smoke-lxc on s390x but haven't
debugged it yet - I'll let you know as soon as I know anything more.

-- 
Christian Ehrhardt
Software Engineer, Ubuntu Server
Canonical Ltd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-libvirt-maintainers/attachments/20161216/a222a9ed/attachment.html>


More information about the Pkg-libvirt-maintainers mailing list