teemtee / tmt

Test Management Tool
MIT License
85 stars 129 forks source link

Vagrant box 35-cloud-base doesn't boot #961

Open lukaszachy opened 2 years ago

lukaszachy commented 2 years ago

tmt run provision -h v -i https://app.vagrantup.com/fedora/boxes/35-cloud-base/versions/35.20211026.0/providers/libvirt.box doesn't go past the 'booting...' It seems as problem with tmt's cloud-init stuff - testcloud instance create https://app.vagrantup.com/fedora/boxes/35-cloud-base/versions/35.20211026.0/providers/libvirt.box does boot (but I cannot login:)

I have the same behaviour with 1.8.0 and current master (a0c7c28)

In libvirt's console I see (snip):

[    0.715704] systemd[1]: Running in initial RAM disk.

Welcome to Fedora Linux 35 (Cloud Edition) dracut-055-5.fc35 (Initramfs)!

[    0.716814] systemd[1]: No hostname configured, using default hostname.
[    0.717340] systemd[1]: Hostname set to <fedora>.
[    0.717800] systemd[1]: Initializing machine ID from VM UUID.
[    0.775212] systemd[1]: Queued start job for default target Initrd Default Target.
[    0.775933] systemd[1]: Started Dispatch Password Requests to Console Directory Watch.
[  OK  ] Started Dispatch Password …ts to Console Directory Watch.
[    0.777091] systemd[1]: Reached target Local Encrypted Volumes.
-----  Cut a lot of systemd [ OK ] output  ----
        Starting dracut initqueue hook...
[    1.076170] virtio_blk virtio3: [vda] 20971520 512-byte logical blocks (10.7 GB/10.0 GiB)
[    1.078712] virtio_blk virtio4: [vdb] 575 512-byte logical blocks (294 kB/288 KiB)
[    1.090657]  vdb: vdb1
[    1.435149] input: ImExPS/2 Generic Explorer Mouse as /devices/platform/i8042/serio1/input/input3
[  132.739692] dracut-initqueue[356]: Warning: dracut-initqueue: timeout, still waiting for following initqueue hooks:
[  132.744735] dracut-initqueue[356]: Warning: /lib/dracut/hooks/initqueue/finished/devexists-\x2fdev\x2fdisk\x2fby-uuid\x2f970bcbc4-5a19-4428-a2ac-24741982d6fa.sh: "if ! grep -q After=remote-fs-pre.target /run/systemd/generator/systemd-cryptsetup@*.service 2>/dev/null; then
[  132.747554] dracut-initqueue[356]:     [ -e "/dev/disk/by-uuid/970bcbc4-5a19-4428-a2ac-24741982d6fa" ]
[  132.748741] dracut-initqueue[356]: fi"
[  132.750834] dracut-initqueue[356]: Warning: dracut-initqueue: starting timeout scripts
----- Cut a lot of repeated text  ----
[  198.259852] dracut-initqueue[356]: Warning: dracut-initqueue: timeout, still waiting for following initqueue hooks:
[  198.269883] dracut-initqueue[356]: Warning: /lib/dracut/hooks/initqueue/finished/devexists-\x2fdev\x2fdisk\x2fby-uuid\x2f970bcbc4-5a19-4428-a2ac-24741982d6fa.sh: "if ! grep -q After=remote-fs-pre.target /run/systemd/generator/systemd-cryptsetup@*.service 2>/dev/null; then
[  198.276740] dracut-initqueue[356]:     [ -e "/dev/disk/by-uuid/970bcbc4-5a19-4428-a2ac-24741982d6fa" ]
[  198.277778] dracut-initqueue[356]: fi"
[  198.279704] dracut-initqueue[356]: Warning: dracut-initqueue: starting timeout scripts
[  198.280889] dracut-initqueue[356]: Warning: Could not boot.
         Starting Dracut Emergency Shell...
Warning: /dev/disk/by-uuid/970bcbc4-5a19-4428-a2ac-24741982d6fa does not exist

Generating "/run/initramfs/rdsosreport.txt"

Entering emergency mode. Exit the shell to continue.
Type "journalctl" to view system logs.
You might want to save "/run/initramfs/rdsosreport.txt" to a USB stick or /boot
after mounting them and attach it to a bug report.

Press Enter for maintenance
(or press Control-D to continue):
lukaszachy commented 2 years ago

Any idea what can be wrong @frantisekz ? I think this is a nice-to-have though - but it would be great if one can use any vagrant box (or those where cloud init package exists)

frantisekz commented 2 years ago

I'll take a closer look on Sunday/Monday. If I had to guess, the cloud-init that's part of the .box file isn't configured properly (not all necessary modules are enabled). The way forward would be to rely on libguestfs, detect insufficient cloud-init and make the needed conf changes to the image before booting it up. I am planning to work on this.

For the tmt emergency shell, this sounds like an issue at tmt's side (I'll examine this more closely too).

frantisekz commented 1 year ago

Heh... got to this after literally year.

Implemented changes testcloud-side: https://pagure.io/testcloud/c/d7332239bb17af661fd2d4f3ccfc1f332f9d663c?branch=master

It would require slight change tmt side, do you still need/want this @lukaszachy ?

psss commented 2 months ago

@lukaszachy, is this one still relevant?