Merge ~rodsmith/plainbox-provider-checkbox:fix-arm64-virt into plainbox-provider-checkbox:master

Proposed by Rod Smith
Status: Merged
Approved by: Jeff Lane 
Approved revision: dd956d899c5d31f73bd258558f9c0f3030a111dd
Merged at revision: 8650fceb4be9424814c36e505c818256f94e73fd
Proposed branch: ~rodsmith/plainbox-provider-checkbox:fix-arm64-virt
Merge into: plainbox-provider-checkbox:master
Diff against target: 14 lines (+2/-1)
1 file modified
bin/virtualization (+2/-1)
Reviewer Review Type Date Requested Status
Jeff Lane  Approve
Review via email: mp+331008@code.launchpad.net

Description of the change

Fix the virtualization script to not double-up the final component when a URL specifies a .tar.gz file, as is used on ARM64 and ARMHF platforms.

To post a comment you must log in.
Revision history for this message
Jeff Lane  (bladernr) wrote :

I'm not sure this is necessary. KVM images all end in .img. The tar.gz and tar.xz images we mirror are all for LXD testing and not covered by the KVM checks.

Where are these .tar.gz images coming from?

review: Needs Information
Revision history for this message
Rod Smith (rodsmith) wrote :

Yes, it is necessary. The virtualization test is built to use .tar.gz files for ARM (probably because older pre-EFI environments required a standalone kernel file to boot). If you don't explicitly set a file via KVM_IMAGE, it downloads a .tar.gz file from cloud-images.ubuntu.com. See, for example:

https://certification.canonical.com/hardware/201704-25505/submission/122661/test/380/result/9151571/

This MR, along with the other two that go with it, make minimal changes to the virtualization script and change everything else to make it work with the MAAS server the way it does with cloud-images.ubuntu.com.

It might be possible to engineer it another way, to make it all work with .img files; but my initial attempt at that failed because the virtualization script failed on a raw .img file. Also, if virtualizing in a non-EFI environment really does require a separate kernel file in a tarball, this approach would fail in such an environment.

Revision history for this message
Jeff Lane  (bladernr) wrote :

Thanks. It all makes sense now.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/bin/virtualization b/bin/virtualization
2index b67a5fa..17ab9b7 100755
3--- a/bin/virtualization
4+++ b/bin/virtualization
5@@ -292,7 +292,8 @@ class KVMTest(object):
6 if (
7 url.path.endswith('/') or
8 url.path == '' or
9- not url.path.endswith(".img")
10+ not (url.path.endswith(".img") or
11+ url.path.endswith(".tar.gz"))
12 ):
13 # If we have a relative URL (local copies of official images)
14 # http://192.168.0.1/ or http://192.168.0.1/images/

Subscribers

People subscribed via source and target branches