missing dependency of qemu-efi-aarch64 when testing arm platforms

Bug #1940112 reported by Taihsiang Ho
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Checkbox Provider - Base
Fix Released
Undecided
dann frazier
uvtool (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

[Description]
When testing virtualization/kvm_check_vm job on arm platforms, `qemu-efi-aarch64` is required.

[Steps to Reproduce]
1. Install checkbox[1]
2. Invoke the testing command: sudo checkbox-cli run com.canonical.certification::device com.canonical.certification::virtualization/kvm_check_vm

[1]
checkbox_ppa=${CHECKBOX_PPA-ppa:hardware-certification/public}
sudo add-apt-repository -y ${checkbox_ppa}
sudo apt-add-repository -y ppa:firmware-testing-team/ppa-fwts-stable
sudo apt update
sudo apt install -y canonical-certification-server

[Expected Result]
Job passes.

[Actual Result]
DEBUG:root:Executing UVT KVM Test
WARNING:root:UVT_IMAGE_OR_SOURCE is not set
DEBUG:root:uvt-simplestreams-libvirt sync
DEBUG:root:Command uvt-simplestreams-libvirt sync release=bionic arch=arm64:
DEBUG:root: Command returned no output
DEBUG:root:Command ssh-keygen -f /var/tmp/checkbox-ng/sessions/session_title-2021-08-10T16.25.44.session/session-share/tmpxnqqkr7p/id_rsa -t rsa -N '':
DEBUG:root: STDOUT: Generating public/private rsa key pair.
Your identification has been saved in /var/tmp/checkbox-ng/sessions/session_title-2021-08-10T16.25.44.session/session-share/tmpxnqqkr7p/id_rsa.
Your public key has been saved in /var/tmp/checkbox-ng/sessions/session_title-2021-08-10T16.25.44.session/session-share/tmpxnqqkr7p/id_rsa.pub.
The key fingerprint is:
SHA256:VU2NH8RMU7xRbUISh8ArpSJbLHhzdalVmWeq5ulMMe4 root@howzit
The key's randomart image is:
+---[RSA 2048]----+
| ..+=OOB*|
| . *.+o*=*|
| . . . *.. + ++|
| . = = +.. . ..|
| . B .S.o. |
| . .oo |
| oo. |
| +o |
| .E |
+----[SHA256]-----+

DEBUG:root:Creating VM
DEBUG:root:Checking for local image
DEBUG:root:No user provided image found.
DEBUG:root:I will attempt to sync the image from ubuntu.com
ERROR:root:Command uvt-kvm create --ssh-public-key-file /var/tmp/checkbox-ng/sessions/session_title-2021-08-10T16.25.44.session/session-share/tmpxnqqkr7p/id_rsa.pub pwxmuzkw arch=arm64 returnd a code of 1
ERROR:root: STDOUT:
ERROR:root: STDERR: uvt-kvm: error: libvirt: Failed to open file '/usr/share/AAVMF/AAVMF_CODE.fd': No such file or directory

DEBUG:root:Destroy VM
ERROR:root:Command virsh destroy pwxmuzkw returnd a code of 1
ERROR:root: STDOUT:

ERROR:root: STDERR: error: failed to get domain 'pwxmuzkw'
error: Domain not found: no domain with matching name 'pwxmuzkw'

FAIL: VM was not started and/or checked

Revision history for this message
Taihsiang Ho (tai271828) wrote :

Additional information: by install checkbox with the same step, the issue won't be reproduced.

Revision history for this message
Taihsiang Ho (tai271828) wrote :

20.04 does not have this issue. The package info is shown below[1].

[1]

ubuntu@howzit:~$ dpkg -l qemu-efi-aarch64 uvtool uvtool-libvirt
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-================-==============================-============-============================================================
ii qemu-efi-aarch64 0~20191122.bd85bf54-2ubuntu3.2 all UEFI firmware for 64-bit ARM virtual machines
ii uvtool 0~git169-0ubuntu1 all Library and tools for using Ubuntu Cloud images
ii uvtool-libvirt 0~git169-0ubuntu1 all Library and tools for using Ubuntu Cloud Images with libvirt

ubuntu@howzit:~$ uname -a; lsb_release -a
Linux howzit 5.4.0-81-generic #91-Ubuntu SMP Thu Jul 15 19:10:30 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.2 LTS
Release: 20.04
Codename: focal
ubuntu@howzit:~$ dpkg -l *checkbox* *plainbox*
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-======================================-========================-============-=======================================================
ii checkbox-ng 1.14.0~ppa~ubuntu20.04.1 all CheckBoxNG test runner
un plainbox <none> <none> (no description available)
ii plainbox-provider-certification-server 0.55.0~ppa~ubuntu20.04.1 all Server Certification provider for Plainbox
ii plainbox-provider-checkbox 0.59.0~ppa~ubuntu20.04.1 arm64 CheckBox provider for PlainBox
ii plainbox-provider-resource-generic 0.49.0~ppa~ubuntu20.04.1 arm64 CheckBox generic resource jobs provider
ii python3-checkbox-ng 1.14.0~ppa~ubuntu20.04.1 all CheckBoxNG test runner (Python 3 library)
ii python3-checkbox-support 0.51.0~ppa~ubuntu20.04.1 all collection of Python modules used by PlainBox providers
un python3-plainbox <none> <none> (no description available)
ubuntu@howzit:~$

Revision history for this message
Taihsiang Ho (tai271828) wrote :

`qemu-efi-aarch64` is "Recommends" of `qemu-system-arm`

Package: qemu-system-arm
Architecture: amd64 arm arm64 armel armhf i386 ia64 kfreebsd-amd64 kfreebsd-i386 mips mipsel mips64 mips64el powerpc powerpcspe ppc64 ppc64el r
iscv64 s390x sparc sparc64 x32
Multi-Arch: foreign
Depends: ${shlibs:Depends}, ${misc:Depends}, qemu-system-common (>> 1:2.12~), qemu-system-data (>> ${source:Version}~),
Recommends: qemu-system-gui (= ${binary:Version}), qemu-utils,
# aarch64 arm uses bootroms
 ipxe-qemu (>= 1.0.0+git-20131111.c3d1e78-1~),
 ipxe-qemu-256k-compat-efi-roms,
 qemu-efi-aarch64, qemu-efi-arm

Revision history for this message
Andrew Cloke (andrew-cloke) wrote :

We believe this is a packaging issue with checkbox provider. If checkbox provider requires qemu-efi-aarch64 in order to function properly, then it should an explicit dependency - i.e. not "recommends".

dann frazier (dannf)
Changed in plainbox-provider-checkbox:
assignee: nobody → dann frazier (dannf)
Revision history for this message
dann frazier (dannf) wrote :

I'm marking this as impacting Ubuntu uvtool, because it seems like the correct place to fix this. /usr/share/AAVMF/AAVMF_CODE.fd is provided by qemu-efi-aarch64. qemu-system-arm doesn't strictly need qemu-efi-aarch64 - you can boot instances w/o UEFI firmware - so it only Recommends it in focal (promoted from just a Suggests in bionic). However, uvt-kvm explicitly references /usr/share/AAVMF/AAVMF_CODE.fd in its arm64 libvirt template, so it seems like uvt-kvm should have a direct Depends on qemu-efi-aarch64 [arm64].

summary: - [18.04] missing dependency of qemu-efi-aarch64 when testing arm
- platforms
+ missing dependency of qemu-efi-aarch64 when testing arm platforms
Changed in plainbox-provider-checkbox:
status: New → Invalid
assignee: dann frazier (dannf) → nobody
Changed in uvtool (Ubuntu):
assignee: nobody → dann frazier (dannf)
Revision history for this message
Robie Basak (racb) wrote :

> qemu-system-arm doesn't strictly need qemu-efi-aarch64 - you can boot instances w/o UEFI firmware - so it only Recommends it in focal (promoted from just a Suggests in bionic). However, uvt-kvm explicitly references /usr/share/AAVMF/AAVMF_CODE.fd in its arm64 libvirt template, so it seems like uvt-kvm should have a direct Depends on qemu-efi-aarch64 [arm64].

Maybe a Recommends or even a Suggests would be better? Because uvtool doesn't use its arm64 libvirt template by default either I don't think? I'm a little hesitant to agree to a Depends or even a Recommends just because it seems like most uvtool users are on amd64 guests and so don't need it and a Depends or Recommends would be pulled in unnecessarily.

Debian policy says:

Recommends

    This declares a strong, but not absolute, dependency.

    The Recommends field should list packages that would be found together with this one in all but unusual installations.

In other words, maybe this is an "unusual installation" situation for uvtool in Ubuntu generally, and so should be declared a dependency of the thing that needs this "unusual installation" instead?

I'm open to you arguing otherwise!

Revision history for this message
dann frazier (dannf) wrote (last edit ):

Oh good point Robie, I hadn't considered that uvtool is Arch: all. A Suggests is probably appropriate in this case, though that won't solve the original problem. Perhaps the best we can do is to just have the checkbox virt test detect the missing package and give the user a hint on how to install it. Or perhaps we make qemu-efi-aarch64 a Recommends of checkbox. While your argument against having it be a strong dependency of uvtool would also apply to checkbox, installing a package unnecessary for most archs maybe less of a concern for the test environments it targets.

Changed in plainbox-provider-checkbox:
status: Invalid → New
dann frazier (dannf)
no longer affects: uvtool (Ubuntu Impish)
no longer affects: uvtool (Ubuntu Focal)
no longer affects: uvtool (Ubuntu Bionic)
no longer affects: uvtool (Ubuntu Jammy)
Revision history for this message
Robie Basak (racb) wrote :

> Oh good point Robie, I hadn't considered that uvtool is Arch: all.

And apologies from me - I had missed that you were requesting an only-on-arm64 dependency! :)

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in uvtool (Ubuntu):
status: New → Confirmed
dann frazier (dannf)
Changed in plainbox-provider-checkbox:
status: New → In Progress
Changed in uvtool (Ubuntu):
assignee: dann frazier (dannf) → nobody
Changed in plainbox-provider-checkbox:
assignee: nobody → dann frazier (dannf)
Matias Piipari (mz2)
tags: added: cbox-51
Jeff Lane  (bladernr)
tags: added: servcert-216
Changed in plainbox-provider-checkbox:
milestone: none → 0.64.0
Taihsiang Ho (tai271828)
Changed in plainbox-provider-checkbox:
status: In Progress → Fix Committed
Changed in plainbox-provider-checkbox:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.