KVM test failure but see guest kernel output

Bug #1777765 reported by Ike Panhc
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Checkbox Provider - Base
Expired
Undecided
Unassigned

Bug Description

Running `sudo certify-18.04` on arm64 platform and KVM test fails.
But in the log we can see guest kernel output

http://kernel.ubuntu.com/~ikepanhc/checkbox/d06-uose1806/submission_2018-06-18T03.08.02.153262.html#13-1-log

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

I looked into this a bit and found it to be reproducible on this platform. I disabled the cloud-init service so that the guest OS would complete booting. I then manually ran "cloud-init init" to reproduce the hang, then attached strace to see where it might be hung.

root@ubuntu:/var/log# strace -p 1255
strace: Process 1255 attached
getrandom(^Cstrace: Process 1255 detached
 <detached ...>

Ah.. maybe this system just lacks entropy. Indeed, there is no rng device in the guest:

root@(none):/# cat /sys/devices/virtual/misc/hw_random/rng_available

root@(none):/# cat /sys/devices/virtual/misc/hw_random/rng_current
none

So, I attached the virtio-rng device to the guest by adding "-device virtio-rng-pci" to the qemu command line. Unfortunately, the driver for this device isn't in the initramfs, so I manually added it:

echo "virtio-rng" >> /etc/initramfs-tools/modules
mkinitramfs -o /boot/initrd.img-4.15.0-24-generic 4.15.0-24-generic

I also installed haveged on the host to try and generate more entropy - but I don't know if that made any real difference. I wouldn't recommend doing that as part of cert unless we know it is necessary.

Perhaps its possible to simply avoid the need for entropy w/ a cloud-init config - that might be a simpler way to go about this.

Changed in checkbox-ng:
status: New → Invalid
Revision history for this message
Jeff Lane  (bladernr) wrote :

Moved to P-P-C and re-opened so we can dig into this. Not sure it's recreatable or not outside of arm but we have two things here:

1 we can try to figure this out and figure out a fix for it in the virtualization script
2 there's a plan to redo the virtualization script KVM bits to be far more simplified.

I think we need to do 1 first and can keep this in mind for 2 later to avoid a regression.

affects: checkbox-ng → plainbox-provider-checkbox
Changed in plainbox-provider-checkbox:
status: Invalid → Confirmed
Revision history for this message
Maksim Beliaev (beliaev-maksim) wrote :

Bug was migrated to GitHub: https://github.com/canonical/checkbox/issues/164.
Bug is no more monitored here.

Changed in plainbox-provider-checkbox:
status: Confirmed → Expired
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.