Project

General

Profile

action #23424

Unable to login with VIRTIO console in SLE12-SP1

Added by dasantiago about 4 years ago. Updated about 4 years ago.

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

100%

Estimated time:
Difficulty:

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

History

#1 Updated by dasantiago about 4 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

#2 Updated by rpalethorpe about 4 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.

#3 Updated by rpalethorpe about 4 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.

#5 Updated by osukup about 4 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

#6 Updated by osukup about 4 years ago

  • Status changed from Rejected to In Progress

#7 Updated by rpalethorpe about 4 years ago

OK, I will update that.

#9 Updated by osukup about 4 years ago

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

#10 Updated by pevik about 4 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 :-(.

Also available in: Atom PDF