action #88193
closed[qe-core] virtio-terminal is missing for non root users
0%
Description
Calling $self->select_user_serial_terminal;
(alias for $self->select_serial_terminal(0);
) in test on a QEMU backend results in the following error:
[2021-01-25T14:06:53.271 CET] [debug] tests/x11/ghostscript.pm:45 called opensusebasetest::select_serial_terminal -> lib/opensusebasetest.pm:1243 called testapi::select_console
[2021-01-25T14:06:53.271 CET] [debug] <<< testapi::select_console(testapi_console="virtio-terminal")
console virtio-terminal does not exist at /usr/lib/os-autoinst/backend/driver.pm line 86.
[2021-01-25T14:06:53.319 CET] [info] ::: basetest::runtest: # Test died: Can't call method "select" on an undefined value at /usr/lib/os-autoinst/backend/baseclass.pm line 667.
The select_serial_terminal
method expects to have a non-root virtio console named virtio-terminal
but lib/susedistribution.pm
does not define any non-root virtio consoles.
Updated by szarate over 3 years ago
- Project changed from openQA Tests to openQA Project
- Subject changed from virtio-terminal is missing to [tools][qe-core] virtio-terminal is missing for non root users
- Category changed from Bugs in existing tests to Feature requests
Updated by okurz over 3 years ago
- Subject changed from [tools][qe-core] virtio-terminal is missing for non root users to [qe-core] virtio-terminal is missing for non root users
- Priority changed from Normal to Low
- Target version set to future
This should be fixable by non-tools-team contributions. Considering the backlog limit for SUSE QE Tools setting to "future" for now.
Updated by szarate over 3 years ago
- Priority changed from Low to Normal
- Target version deleted (
future)
Updated by okurz over 3 years ago
- Target version set to future
@szarate can you please help a bit with explaining what you want to achieve with changing the prio again and deleting the target version? I set the target version as we use it for the "SUSE QE Tools" team backlog and all issues within the openQA issue tracker have a target version so that they are "triaged", otherwise these tickets reappear on the "to be triaged" ticket query so in our current process we need either that or we move the issue to another issue tracker. As you have kept the marker "qe-core" in the subject I assume you are still fine with having that on the backlog of said team so maybe the other change was by mistake when you updated the ticket or something, hence setting the target version "future" again.
Updated by ybonatakis over 2 years ago
- Status changed from New to In Progress
- Assignee set to ybonatakis
Updated by ybonatakis over 2 years ago
The select_serial_terminal
picks by default root-virtio-terminal
but the
subroutine provides parameter to select a console as normal user.
Somehow this found misconfigured. The condition was like that
$console = $root ? 'root-virtio-terminal' : 'virtio-terminal';
. There was
two main issues. One was that the propor console was not added during the
init_consoles
and the second was that the variable was not a valid option.
The first is solved easily by adding another line to call add_console
.
In the second case the correct name is user-virtio-terminal
instead
virtio-terminal
. the underline variable is evaluated later against a regex
to assign some other variables, one of them is $user and another is type
which each are required for the user login and the console initialization.
https://github.com/os-autoinst/os-autoinst-distri-opensuse/pull/14967
Updated by ybonatakis over 2 years ago
- Status changed from In Progress to Feedback
fix has been merged.
Updated by ybonatakis over 2 years ago
Seems working however it seems select_serial_terminal(0)
will do it right, unless there is an already active console. this is due to wait_serial(qr/login:\s*$/i, timeout => 3, quiet => 1);.
As a workaround in case to switch from current active console we can use type_string('pkill -u root');
before select_serial_terminal(0)
. But this can also become conditional inside the subroutine. WDYT?
Updated by pvorel almost 2 years ago
ybonatakis wrote:
Seems working however it seems
select_serial_terminal(0)
will do it right, unless there is an already active console. this is due to wait_serial(qr/login:\s*$/i, timeout => 3, quiet => 1);.As a workaround in case to switch from current active console we can use
type_string('pkill -u root');
beforeselect_serial_terminal(0)
. But this can also become conditional inside the subroutine. WDYT?
This is going to be fixed by #122935.
Updated by pvorel almost 2 years ago
- Related to action #122935: openqa: fix virtio console for user (user-virtio-terminal) added