Page MenuHomeVyOS Platform

Testsuite: serial console GRUB check reads the wrong path on image installs
Closed, ResolvedPublic

Description

scripts/check-qemu-install verifies the GRUB console type by reading

/boot/grub/grub.cfg.d/20-vyos-defaults-autoload.cfg

on the installed system. Locally that file is never there. The installer
writes it with grub.set_console_type(..., DIR_DST_ROOT)
(src/op_mode/image_installer.py), i.e. onto the persistence partition, and on
a running image-based install /boot belongs to the booted image, not to that
partition. This is why vyos.system.grub.set_console_type() defaults root_dir
to disk.find_persistence() rather than "/".

The cat fails, basic_cli_tests() raises, and the harness aborts with
"The ISO image is not considered usable!" before a single smoketest runs.

Reproduced locally on amd64 with console_type "ttyS", so it is not specific
to the ttyAMA0 platforms the check was written for. It appears with
c7eef9dd (Testsuite: T8375: verify proper serial console settings) in the
tree; whether upstream CI hits the same path has not been checked.

Reading the same file under the persistence directory returns the expected
value and the run completes:

persist=$(python3 -c "from vyos.system.disk import find_persistence; print(find_persistence())")
grep "set console_type" $persist/boot/grub/grub.cfg.d/20-vyos-defaults-autoload.cfg
set console_type="ttyS"

Details

Version
-
Is it a breaking change?
Perfectly compatible
Issue type
Bug (incorrect behavior)