action #18980

[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)

Added by rpalethorpe almost 3 years ago. Updated 4 months ago.

Status:ResolvedStart date:05/05/2017
Priority:NormalDue date:
Assignee:pevik% Done:

0%

Category:Feature requests
Target version:Milestone 9
Difficulty:
Duration:

Description

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
https://github.com/os-autoinst/os-autoinst-distri-opensuse/pull/4477
(Replace check_var ARCH ppc64le by get_var OFW)


Related issues

Related to openQA Tests - action #18860: [qam] SLE12 GA and SLE12SP1 doesnt start virtio_console c... Resolved 28/04/2017

History

#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)

more info http://0pointer.de/blog/projects/serial-console.html

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

#2 Updated by okurz almost 3 years ago

  • Category set to Feature requests

#3 Updated by rpalethorpe over 2 years ago

  • Assignee deleted (rpalethorpe)

#4 Updated by pevik over 2 years ago

  • Assignee set to pevik

#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):
http://pinotage-4.arch.suse.de/tests/64#step/boot_ltp/4

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:
https://github.com/os-autoinst/os-autoinst-distri-opensuse/pull/3350

#6 Updated by pevik over 2 years ago

osukup wrote:

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

#7 Updated by rpalethorpe over 2 years ago

  • Status changed from In Progress to Resolved
  • Target version set to Milestone 9

Solved for LTP test runner at least.

#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).

#12 Updated by pvorel over 1 year ago

  • Related to action #18860: [qam] SLE12 GA and SLE12SP1 doesnt start virtio_console correctly added

#14 Updated by osukup over 1 year ago

util-linux on sle12/sle12sp1 rejects root login on any console which isnt listed in /etc/securetty , from SP2 is this file ignored

must be this file updated before using nonstandard consoles (hvc*)

#15 Updated by pvorel 4 months ago

  • Description updated (diff)

Also available in: Atom PDF