Project

General

Profile

Actions

action #23424

closed

Unable to login with VIRTIO console in SLE12-SP1

Added by dasantiago over 6 years ago. Updated over 6 years ago.

Status:
Resolved
Priority:
High
Assignee:
Category:
-
Target version:
-
Start date:
2017-08-17
Due date:
% Done:

100%

Estimated time:

Description

Unable to login when using the VIRTIO console.

Example:

https://openqa.suse.de/tests/1115492#step/userspace_postfix/4

If we check the autoinst log, we can see:


15:16:10.8171 60880 >>> testapi::wait_serial: (?^ui:login:\s*$): ok
15:16:10.8172 60880 <<< testapi::type_string(text='root
')
15:16:10.8175 60883 <<< consoles::virtio_screen::type_string(text='root
', json_cmd_token='VpaWJjTE')
15:16:10.8178 60880 <<< testapi::wait_serial(regexp=qr/(?^ui:Password:\s*$)/, timeout=90)
15:16:10.8181 60883 <<< consoles::virtio_screen::read_until(json_cmd_token='vmhNHfCk', pattern='(?^ui:Password:\\s*$)', regexp='(?^ui:Password:\\s*$)', timeout=90)
15:17:40.8477 60880 >>> testapi::wait_serial: (?^ui:Password:\s*$): fail
15:17:40.8479 60880 <<< testapi::type_string(text='SECRET STRING', secret=1, max_interval=100)

Possible relation with https://progress.opensuse.org/issues/18980

Actions #1

Updated by dasantiago over 6 years ago

The problem is the virtio console:

VIRTIO_CONSOLE=1 -> failure:
http://tragicbox.suse.cz/tests/99

VIRTIO_CONSOLE=0 -> success:
http://tragicbox.suse.cz/tests/98

Actions #2

Updated by rpalethorpe over 6 years ago

  • Subject changed from Unable to login with VIRTIO console to Unable to login with VIRTIO console in SLE12-SP1
  • Status changed from New to In Progress
  • Assignee set to rpalethorpe
  • Priority changed from Normal to High

It only appears to be happening in SLE12-SP1. It is probably caused by some race condition in my code (although it is strange how consistent it is in that case), but I will try logging into the virtio console manually, just in case serial login is broken.

I will try to update the login code to make it more robust in general if I can't figure out exactly what is wrong.

Actions #3

Updated by rpalethorpe over 6 years ago

  • Status changed from In Progress to Rejected

This appears to be a product bug. If I try to login in manually to a virtio console (HVC0) with root then it fails. The graphical and ttyS0 consoles allow root login and it is possible to login to the virtio console using bernhard.

Probably we should not allow root to login directly, but that is a decision for the security team and it should be consistent across all console types and product versions.

Actions #5

Updated by osukup over 6 years ago

problem is add_serial_console in utils.pm

it sends wrong data to /etc/securetty ..

https://github.com/os-autoinst/os-autoinst-distri-opensuse/blob/master/lib/utils.pm#L790

correct format is only console name not /dev/$sconsole

Actions #6

Updated by osukup over 6 years ago

  • Status changed from Rejected to In Progress
Actions #7

Updated by rpalethorpe over 6 years ago

OK, I will update that.

Actions #9

Updated by osukup over 6 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 90 to 100
Actions #10

Updated by pevik over 6 years ago

@osukup: thanks for fixing. You're right, there shouldn't be full path, how I wrote in #18980#note-6, but left the original version with full path :-(.

Actions

Also available in: Atom PDF