Skip to content

Boot tests fails with: No module named 'qmp' #2288

@lzap

Description

@lzap

This was likely caused by https://github.com/osbuild/images/pull/2278/changes when seed was not bumped and it got it into main branch. The error is:

$ ./test/scripts/boot-image "./build/rhel_10.3-x86_64-image_installer-unattended_iso" "./test/configs/unattended-iso.json"
Testing image at ./build/rhel_10.3-x86_64-image_installer-unattended_iso/bootiso/installer.iso
go: downloading github.com/gocomply/scap v0.1.3
QEMU: qemu-system-x86_64 -M q35,accel=kvm -cpu Haswell-v4 -device virtio-scsi-pci,id=scsi -device scsi-hd,drive=disk0 -bios /usr/share/OVMF/OVMF_CODE.fd -m 2048 -serial stdio -monitor none -object rng-random,filename=/dev/urandom,id=rng0 -device virtio-rng-pci,rng=rng0 -device virtio-net-pci,netdev=net.0,id=net.0 -netdev user,id=net.0,hostfwd=tcp::47213-:22 -qmp unix:/tmp/vmtest-pleu03zb-disk.img/qmp.socket,server,nowait -drive file=/var/tmp/tmpb89g6ct5/disk.img,if=none,id=disk0,cache=unsafe,format=raw -nographic -cdrom ./build/rhel_10.3-x86_64-image_installer-unattended_iso/bootiso/installer.iso
Traceback (most recent call last):
  File "/home/fedora/~/builds-openstack/redhat/services/products/image-builder/ci/images/./test/scripts/boot-image", line 587, in <module>
    main()
    ~~~~^^
  File "/home/fedora/~/builds-openstack/redhat/services/products/image-builder/ci/images/./test/scripts/boot-image", line 550, in main
    boot_qemu_iso(arch, image_path, build_config_path)
    ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/fedora/~/builds-openstack/redhat/services/products/image-builder/ci/images/./test/scripts/boot-image", line 285, in boot_qemu_iso
    return _boot_qemu_iso(arch, installer_iso_path, config_file, privkey_path)
  File "/home/fedora/~/builds-openstack/redhat/services/products/image-builder/ci/images/./test/scripts/boot-image", line 306, in _boot_qemu_iso
    vm.start(wait_event="qmp:RESET", snapshot=False, use_ovmf=True, timeout_sec=ISO_BOOT_TIMEOUT)
    ~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/fedora/~/builds-openstack/redhat/services/products/image-builder/ci/images/test/scripts/vmtest/vm.py", line 278, in start
    self.wait_qmp_event(qmp_event, timeout_sec=timeout_sec)
    ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/fedora/~/builds-openstack/redhat/services/products/image-builder/ci/images/test/scripts/vmtest/vm.py", line 292, in wait_qmp_event
    import qmp  # pylint: disable=import-outside-toplevel
    ^^^^^^^^^^
ModuleNotFoundError: No module named 'qmp'

Locally it works, I am unable to simulate the error. It looks like the python version should be the correct one: python3.

I will try to figure out a quick workaround in #2287 and if it does not work, we will have to revert. @achilleas-k

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions