Project

General

Profile

Actions

action #18980

closed

[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 7 years ago. Updated over 4 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
pevik
Category:
Feature requests
Target version:
Start date:
2017-05-05
Due date:
% Done:

0%

Estimated time:

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 1 (0 open1 closed)

Related to openQA Tests - action #18860: [qam] SLE12 GA and SLE12SP1 doesnt start virtio_console correctlyResolvedosukup2017-04-28

Actions
Actions #1

Updated by osukup almost 7 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

Actions #2

Updated by okurz almost 7 years ago

  • Category set to Feature requests
Actions #3

Updated by rpalethorpe almost 7 years ago

  • Assignee deleted (rpalethorpe)
Actions #4

Updated by pevik over 6 years ago

  • Assignee set to pevik
Actions #5

Updated by pevik over 6 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

Actions #6

Updated by pevik over 6 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
Actions #7

Updated by rpalethorpe over 6 years ago

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

Solved for LTP test runner at least.

Actions #8

Updated by pevik over 6 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)
Actions #11

Updated by pvorel over 5 years 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).

Actions #12

Updated by pvorel over 5 years ago

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

Updated by osukup over 5 years 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*)

Actions #15

Updated by pvorel over 4 years ago

  • Description updated (diff)
Actions

Also available in: Atom PDF