action #23424
closedUnable to login with VIRTIO console in SLE12-SP1
100%
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
Updated by dasantiago over 7 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
Updated by rpalethorpe over 7 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.
Updated by rpalethorpe over 7 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.
Updated by dasantiago over 7 years ago
To be follow up in https://bugzilla.suse.com/show_bug.cgi?id=1054704
Updated by osukup over 7 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
Updated by osukup over 7 years ago
- % Done changed from 0 to 90
Updated by osukup over 7 years ago
- Status changed from In Progress to Resolved
- % Done changed from 90 to 100
Updated by pevik over 7 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 :-(.