Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop serial grab where necessary #4107

Conversation

mnowaksuse
Copy link

Fixes poo#16418: "svirt: openQA won't perform another query_isotovideo
check when VM is down -> incompletes" (second part in os-autoinst).

Validation run: http://assam.suse.cz/tests/95 (restarted 20 times in
revive_xen_domain test module).

[2017-12-20T14:34:04.0946 CET] [debug]
/var/lib/openqa/share/tests/sle/tests/jeos/revive_xen_domain.pm:24
called utils::power_action
[2017-12-20T14:34:04.0946 CET] [debug] <<<
backend::console_proxy::__ANON__(wrapped_call={
  'console' => 'svirt',
  'function' => 'stop_serial_grab',
  'args' => []
})

[2017-12-20T14:35:13.0170 CET] [debug] <<<
backend::console_proxy::__ANON__(wrapped_call={
  'args' => [],
  'function' => 'start_serial_grab',
  'console' => 'svirt'
})
[2017-12-20T14:35:13.0477 CET] [debug] Connection to
root@openqaw5-xen.qa.suse.de established

Requires this PR to be deployed to OSD: os-autoinst/os-autoinst#899

lib/utils.pm Outdated
if ($action eq 'reboot') {
reset_consoles;
# Set disk as a primary boot device
console('svirt')->change_domain_element(os => boot => {dev => 'hd'});
console('svirt')->define_and_start;
console('svirt')->start_serial_grab;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this necessary? The define_and_start function is already invoking start_serial_grab.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, thanks.

lib/utils.pm Outdated
@@ -643,6 +641,7 @@ sub power_action {
if (check_var('BACKEND', 'svirt')) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wouldn't be better if this IF condition was moved into the prepare_system_shutdown function?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved.

@mnowaksuse mnowaksuse force-pushed the disable_serial_console_on_shutdown branch from 569b19a to 182f219 Compare January 2, 2018 09:17
@mnowaksuse mnowaksuse changed the title Start & stop serial grab where necessary Stop serial grab where necessary Jan 2, 2018
Michal Nowak added 2 commits January 2, 2018 10:33
Fixes poo#16418: "svirt: openQA won't perform another query_isotovideo
check when VM is down -> incompletes" (second part in os-autoinst).

Validation run: http://assam.suse.cz/tests/95 (restarted 20 times in
revive_xen_domain test module).

```
[2017-12-20T14:34:04.0946 CET] [debug]
/var/lib/openqa/share/tests/sle/tests/jeos/revive_xen_domain.pm:24
called utils::power_action
[2017-12-20T14:34:04.0946 CET] [debug] <<<
backend::console_proxy::__ANON__(wrapped_call={
  'console' => 'svirt',
  'function' => 'stop_serial_grab',
  'args' => []
})
```
Passed 98 restarts and then hit the 2 hour timeout correctly:
http://assam.suse.cz/tests/131.
@mnowaksuse mnowaksuse force-pushed the disable_serial_console_on_shutdown branch from 182f219 to ceb9fd7 Compare January 2, 2018 09:33
@Soulofdestiny
Copy link
Contributor

LGTM,
I've started 20 tests on SUSE KVM with this PR included, 10 in a row passed by now
http://opeth.suse.de/tests

@Soulofdestiny Soulofdestiny merged commit 1387b92 into os-autoinst:master Jan 4, 2018
mnowaksuse pushed a commit to mnowaksuse/os-autoinst-distri-opensuse that referenced this pull request Jan 12, 2018
In PR os-autoinst#4107 we stop serial line grab to get rid of stalls on Xen, however
I forgot to start serial line grab afterwards for non-Xen svirt runs.

Fails here: https://openqa.suse.de/tests/1381066#step/console_reboot/13
Validation run: http://assam.suse.cz/tests/255
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants