Unable to login with VIRTIO console in SLE12-SP1
Unable to login when using the VIRTIO console.
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
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
#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
add_serial_console in utils.pm
it sends wrong data to /etc/securetty ..
correct format is only console name not /dev/$sconsole
#8 Updated by osukup about 4 years ago
- % Done changed from 0 to 90