coreos / fedora-coreos-config

Base configuration for Fedora CoreOS
Other
153 stars 157 forks source link

tests/bootupd-validate: skip checking BIOS on older bootupd #3243

Closed HuijingHei closed 2 weeks ago

HuijingHei commented 3 weeks ago

See failed CI log https://github.com/openshift/os/pull/1644#issuecomment-2462331993

HuijingHei commented 3 weeks ago

Failed on centos stream 9, this is because the selinux-policy does not include the fixed upstream patch.

error log:

[coreos-assembler]$ kola run --qemu-image ./rhcos-418.96.202410281331-0-qemu.x86_64.qcow2 ext.fedora-coreos-config.boot.bootupd-validate -E ../fedora-coreos-config/
=== RUN   ext.fedora-coreos-config.boot.bootupd-validate
systemctl status kola-runext.service:
× kola-runext.service
     Loaded: loaded (/etc/systemd/system/kola-runext.service; static)
     Active: failed (Result: exit-code) since Fri 2024-11-08 06:48:22 UTC; 499ms ago
   Duration: 723ms
    Process: 2133 ExecStart=/usr/local/bin/kola-runext-bootupd-validate (code=exited, status=1/FAILURE)
   Main PID: 2133 (code=exited, status=1/FAILURE)
        CPU: 62ms

Nov 08 06:48:21 qemu0 systemd[1]: Started kola-runext.service.
Nov 08 06:48:21 qemu0 kola-runext-bootupd-validate[2133]: + . /var/opt/kola/extdata/commonlib.sh
Nov 08 06:48:21 qemu0 kola-runext-bootupd-validate[2133]: ++ IFS=' '
Nov 08 06:48:21 qemu0 kola-runext-bootupd-validate[2133]: ++ read -r -a cmdline
Nov 08 06:48:21 qemu0 kola-runext-bootupd-validate[2133]: + overwrite=
Nov 08 06:48:21 qemu0 kola-runext-bootupd-validate[2135]: ++ rpm -q --queryformat '%{VERSION}' bootupd
Nov 08 06:48:22 qemu0 kola-runext-bootupd-validate[2133]: + bootupd_version=0.2.19
Nov 08 06:48:22 qemu0 kola-runext-bootupd-validate[2133]: + required_version=0.2.22
Nov 08 06:48:22 qemu0 kola-runext-bootupd-validate[2133]: + overwrite_file
Nov 08 06:48:22 qemu0 kola-runext-bootupd-validate[2133]: + case "$(arch)" in
Nov 08 06:48:22 qemu0 kola-runext-bootupd-validate[2136]: ++ arch
Nov 08 06:48:22 qemu0 kola-runext-bootupd-validate[2137]: ++ realpath /dev/disk/by-partlabel/EFI-SYSTEM
Nov 08 06:48:22 qemu0 kola-runext-bootupd-validate[2133]: + local esp_dev=/dev/vda2
Nov 08 06:48:22 qemu0 kola-runext-bootupd-validate[2133]: + '[' '!' -b /dev/vda2 ']'
Nov 08 06:48:22 qemu0 kola-runext-bootupd-validate[2133]: + mount -v /dev/vda2 /boot/efi
Nov 08 06:48:22 qemu0 kola-runext-bootupd-validate[2138]: mount: /dev/vda2 mounted on /boot/efi.
Nov 08 06:48:22 qemu0 kola-runext-bootupd-validate[2141]: ++ head -n1
Nov 08 06:48:22 qemu0 kola-runext-bootupd-validate[2140]: ++ find /boot/efi '(' -name shim.efi -o -name shimx64.efi ')'
Nov 08 06:48:22 qemu0 kola-runext-bootupd-validate[2133]: + local shim_file=/boot/efi/EFI/centos/shimx64.efi
Nov 08 06:48:22 qemu0 kola-runext-bootupd-validate[2133]: + '[' -z /boot/efi/EFI/centos/shimx64.efi ']'
Nov 08 06:48:22 qemu0 kola-runext-bootupd-validate[2133]: + echo test
Nov 08 06:48:22 qemu0 kola-runext-bootupd-validate[2133]: + umount -v /dev/vda2
Nov 08 06:48:22 qemu0 kola-runext-bootupd-validate[2142]: umount: /boot/efi (/dev/vda2) unmounted
Nov 08 06:48:22 qemu0 kola-runext-bootupd-validate[2133]: + overwrite=1
Nov 08 06:48:22 qemu0 kola-runext-bootupd-validate[2133]: + '[' -n 1 ']'
Nov 08 06:48:22 qemu0 kola-runext-bootupd-validate[2133]: + bootupctl validate
Nov 08 06:48:22 qemu0 kola-runext-bootupd-validate[2143]: Skipped: BIOS
Nov 08 06:48:22 qemu0 kola-runext-bootupd-validate[2143]: error: internal error: Failed to find ESP device
Nov 08 06:48:22 qemu0 kola-runext-bootupd-validate[2133]: + adopt_and_update
Nov 08 06:48:22 qemu0 kola-runext-bootupd-validate[2133]: + local state_file=/boot/bootupd-state.json
Nov 08 06:48:22 qemu0 kola-runext-bootupd-validate[2133]: + '[' -f /boot/bootupd-state.json ']'
Nov 08 06:48:22 qemu0 kola-runext-bootupd-validate[2133]: + mount -o remount,rw /boot
Nov 08 06:48:22 qemu0 kola-runext-bootupd-validate[2133]: + rm -f /boot/bootupd-state.json
Nov 08 06:48:22 qemu0 kola-runext-bootupd-validate[2149]: + grep 'Adopted and updated.*'
Nov 08 06:48:22 qemu0 kola-runext-bootupd-validate[2148]: + bootupctl adopt-and-update
Nov 08 06:48:22 qemu0 kola-runext-bootupd-validate[2148]: error: internal error: Failed to find ESP device
Nov 08 06:48:22 qemu0 systemd[1]: kola-runext.service: Main process exited, code=exited, status=1/FAILURE
Nov 08 06:48:22 qemu0 systemd[1]: kola-runext.service: Failed with result 'exit-code'.
--- FAIL: ext.fedora-coreos-config.boot.bootupd-validate (43.06s)
        cluster.go:151: Error: Unit kola-runext.service exited with code 1
        cluster.go:151: 2024-11-08T06:48:23Z cli: Unit kola-runext.service exited with code 1
        harness.go:1265: kolet failed: : kolet run-test-unit failed: Process exited with status 1
FAIL, output in _kola_temp/qemu-2024-11-08-0647-1086
Error: harness: test suite failed
2024-11-08T06:48:26Z cli: harness: test suite failed
HuijingHei commented 3 weeks ago

Failed on centos stream 9, this is because the selinux-policy does not include the fixed upstream patch.

Create https://issues.redhat.com/browse/RHEL-66584 to track this.

Do we need to skip the test on centos until the bug is fixed?

HuijingHei commented 3 weeks ago

Test is passed on 418.94

[coreos-assembler]$ kola run --qemu-image ./rhcos-418.94.202411070801-0-qemu.x86_64.qcow2 ext.fedora-coreos-config.boot.bootupd-validate -E ../fedora-coreos-config/
=== RUN   ext.fedora-coreos-config.boot.bootupd-validate
--- PASS: ext.fedora-coreos-config.boot.bootupd-validate (54.32s)
PASS, output in _kola_temp/qemu-2024-11-08-0646-1049
HuijingHei commented 3 weeks ago

Turn bootupd_t into permissive mode on scos and 9.6, result is passed.

$ kola run --qemu-image ./rhcos-418.96.202410281331-0-qemu.x86_64.qcow2 ext.fedora-coreos-config.boot.bootupd-validate -E ../fedora-coreos-config/
=== RUN   ext.fedora-coreos-config.boot.bootupd-validate
--- PASS: ext.fedora-coreos-config.boot.bootupd-validate (69.77s)
PASS, output in _kola_temp/qemu-2024-11-08-1504-147
travier commented 2 weeks ago

LGTM. This situation is not great but we don't have much choice until the policy is fixed.