[ltp][openqa][virtio][ppc64le] It appears agetty is not started on the virtio serial console on ppc64le (it can't log into the virtio_console)
|Target version:||Milestone 9|
Neither os-autoinst or QEMU throw an error when creating a virtio console device, connecting to its socket or sending data. However no I/O is recorded in QEMU's chardev log, nor is anything received from the SUT through the socket. It is a bit strange that not even data sent by os-autoinst is recorded in the log, although it might never log input data, but appears to under normal operation because echo is enabled on the TTY.
Unlike x86, ppc64le already uses /dev/hvc0 (on the SUT) for the regular serial port whereas virtio console would usually be on this device. However this should probably just mean that it uses /dev/hvc1 instead, os-autoinst would have no problem with this. Maybe SLE's systemd is not configured to start agetty on this device or the virtio_console driver works differently on ppc64le. Both seem quite strange.
This might be a product bug, but I need more information from the SUT to decide. It should just work.
UPDATE: for those who are searching here for OFW: it's ppc detectioni
(Replace check_var ARCH ppc64le by get_var OFW)
#1 Updated by osukup almost 3 years ago
systemd on SLE12SP2+ automatically starts only first found special serial device. On SLE12SP1 and SLE12GA systemd dont start any special serial dev ( and looks more and more like bug in our systemd presets bsc#1037910)
and from look to systemd-getty-generator .. console is started by generator only on:
"hvc0" "xvc0" "hvsi0" "sclp_line0" "ttysclp0" "3270!tty1";
so for correct work on ppc64le we need modify SUT image with:
echo "hvc1\n" >> /etc/securetty
systemctl enable /dev/hvc1
systemctl start /dev/hvc1
#5 Updated by pevik over 2 years ago
Do I understand it correctly, that the problem is that serial_terminal.txt is not saved in assets?
Isn't the whole problem caused just by the fact that tests on ppc64le don't use virtio-console by qemu setup?
Because 64bit and aarch64-virtio use it (both https://openqa.suse.de/tests/1058414#settings, https://openqa.suse.de/tests/1059313#settings have VIRTIO_CONSOLE=1, buthttps://openqa.suse.de/tests/1058099#settings doesn't) and they save the serial_terminal.log.
I tested it on ppc64le machine in orthos, with QEMU 2.9, which has virtio-console support.
If I try to clone job VIRTIO_CONSOLE=1 it fails early during logging (no login prompt, fails on timeout):
while login without virtio-console works well:
http://pinotage-4.arch.suse.de/tests/65#step/boot_ltp/3 (NOTE: curl failure - script_output call is caused by something else, see: #20590)
Could be the reason that enabling virtio-console on ppc6le requires changes in the test code that set a tty device?
If so the pull request implementing osukup's idea is useless:
#6 Updated by pevik over 2 years ago
systemctl enable /dev/hvc1 systemctl start /dev/hvc1
Correct commands are (see http://0pointer.de/blog/projects/serial-console.html):
systemctl enable serial-getty@hvc1 systemctl start serial-getty@hvc1
#8 Updated by pevik over 2 years ago
- Subject changed from It appears agetty is not started on the virtio serial console on ppc64le (it can't log into the virtio_console) to [ltp][openqa][virtio][ppc64le] It appears agetty is not started on the virtio serial console on ppc64le (it can't log into the virtio_console)
#11 Updated by pvorel over 1 year ago
After enabling virtio console by default (https://github.com/os-autoinst/os-autoinst/commit/7226ced3391f2fa8276f098ee3b9e6ce50243dc4)
add_serial_console('hvc1'); from tests/kernel/install_ltp.pm should be moved to some common place and called automatically (to be only on single place and don't expect tests add this manually).