Verify KVM Guest Boots Fails with traceback

Bug #1662580 reported by Michael Reed
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Checkbox Provider - Base
Fix Released
Critical
Jeff Lane 

Bug Description

Currently this test case fails when running within the canonical-certification-server framework. However when I run this test manually it passes.

Executing KVM Test
DEBUG:root:Checking QEMU version for arm64 arch
DEBUG:root:Starting KVM Test
DEBUG:root:No image specified, downloading one now.
DEBUG:root:Acquiring cloud image from: http://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-arm64.tar.gz
Traceback (most recent call last):
  File "/tmp/nest-cgdp20_1.7007398bb2463d62371992a24fe15a5c6a2024514a57448d1151ab0beae02024/virtualization", line 583, in <module>
    main()
  File "/tmp/nest-cgdp20_1.7007398bb2463d62371992a24fe15a5c6a2024514a57448d1151ab0beae02024/virtualization", line 580, in main
    args.func(args)
  File "/tmp/nest-cgdp20_1.7007398bb2463d62371992a24fe15a5c6a2024514a57448d1151ab0beae02024/virtualization", line 535, in test_kvm
    result = kvm_test.start()
  File "/tmp/nest-cgdp20_1.7007398bb2463d62371992a24fe15a5c6a2024514a57448d1151ab0beae02024/virtualization", line 457, in start
    self.image = self.download_image()
  File "/tmp/nest-cgdp20_1.7007398bb2463d62371992a24fe15a5c6a2024514a57448d1151ab0beae02024/virtualization", line 324, in download_image
    resp = urllib.request.urlretrieve(full_url, cloud_iso)
UnboundLocalError: local variable 'cloud_iso' referenced before assignment
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 67, in apport_excepthook
    binary = os.path.realpath(os.path.join(os.getcwd(), sys.argv[0]))
FileNotFoundError: [Errno 2] No such file or directory

Original exception was:
Traceback (most recent call last):
  File "/tmp/nest-cgdp20_1.7007398bb2463d62371992a24fe15a5c6a2024514a57448d1151ab0beae02024/virtualization", line 583, in <module>
    main()
  File "/tmp/nest-cgdp20_1.7007398bb2463d62371992a24fe15a5c6a2024514a57448d1151ab0beae02024/virtualization", line 580, in main
    args.func(args)
  File "/tmp/nest-cgdp20_1.7007398bb2463d62371992a24fe15a5c6a2024514a57448d1151ab0beae02024/virtualization", line 535, in test_kvm
    result = kvm_test.start()
  File "/tmp/nest-cgdp20_1.7007398bb2463d62371992a24fe15a5c6a2024514a57448d1151ab0beae02024/virtualization", line 457, in start
    self.image = self.download_image()
  File "/tmp/nest-cgdp20_1.7007398bb2463d62371992a24fe15a5c6a2024514a57448d1151ab0beae02024/virtualization", line 324, in download_image
    resp = urllib.request.urlretrieve(full_url, cloud_iso)
UnboundLocalError: local variable 'cloud_iso' referenced before assignment

Related branches

Revision history for this message
Michael Reed (mreed8855) wrote :

$ sudo apt-cache policy canonical-certification-server
canonical-certification-server:
  Installed: 0.31.0~ppa~ubuntu16.04.1
  Candidate: 0.31.0~ppa~ubuntu16.04.1
  Version table:
 *** 0.31.0~ppa~ubuntu16.04.1 500
        500 http://ppa.launchpad.net/hardware-certification/public/ubuntu xenial/main arm64 Packages
        100 /var/lib/dpkg/status

Revision history for this message
Michael Reed (mreed8855) wrote :

When I run the following command it passes.

sudo qemu-system-aarch64 -m 1024 -display none -nographic -net nic -net user,net=10.0.0.0/8,host=10.0.0.1,hostfwd=tcp::2222-:22 -cpu host -enable-kvm -machine virt,gic_version=host -kernel /boot/vmlinuz -initrd /boot/initrd.img -drive file=xenial-server-cloudimg-arm64.img,if=none,id=disk.0 -device virtio-blk-device,drive=disk.0 -drive file=seed.iso,if=none,id=disk.1 -device virtio-blk-device,drive=disk.1 -append "console=ttyAMA0 earlyprintk=serial ro rootfstype=ext4 root=LABEL=cloudimg-rootfs rootdelay=10"

Revision history for this message
Michael Reed (mreed8855) wrote :

I saw the same issue when I tried using the dev ppa (ppa:checkbox-dev/ppa)

0.31.0~rc2+201701301956~ubuntu16.04.1

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

Ok... not sure why this broke, then again I'm not entirely sure how these changes got into the script, I removed them...

So since they kept coming back (I "think" these are the ones that were mistakenly added in before), I'll just go ahead and complete them...

The issue was that some changes broke the data being passed to urllib to grab the image from the server.

I have a fix, testing it now.

Changed in plainbox-provider-checkbox:
status: New → In Progress
importance: Undecided → Critical
assignee: nobody → Jeff Lane (bladernr)
Jeff Lane  (bladernr)
tags: added: blocks-hwcert-server scripts
Revision history for this message
Jeff Lane  (bladernr) wrote :

FWIW, this is not just ARM64... something updated and broke the script across the board. Fixes in the link branch work on AMD64 and should also work on ARM and Power.

summary: - Verify KVM Guest Boots Fails on Arm64
+ Verify KVM Guest Boots Fails with traceback
Changed in plainbox-provider-checkbox:
status: In Progress → Fix Committed
milestone: none → 0.35.0
Pierre Equoy (pieq)
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.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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