Project

General

Profile

Actions

action #89041

closed

[sle][sle15sp4][s390x][zkvm] "reconnect_mgmt_console" after rebooting the vm didn't work as expected

Added by rfan1 over 3 years ago. Updated over 2 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Bugs in existing tests
Target version:
-
Start date:
2021-02-24
Due date:
% Done:

100%

Estimated time:
20.00 h
Difficulty:

Description

Observation

openQA test in scenario sle-15-SP3-Online-s390x-security_check_kernel_config@s390x-kvm-sle12 fails in
dm_crypt

Test suite description

Reproducible

Fails since (at least) Build 150.1 (current job)

Expected result

Last good: 150.1 (or more recent)

Further details

Always latest result in this scenario: latest

Actions #1

Updated by rfan1 over 3 years ago

Please refer to https://github.com/os-autoinst/os-autoinst-distri-opensuse/pull/12011#discussion_r580936548 for the background.
The issue can only be seen on s390x platform now,create this poo to track.

During my test, I found some abnormal issue with the below openqa code:

    power_action("reboot", textmode => 1);
    reconnect_mgmt_console;
    $self->wait_boot(textmode => 1, bootloader_time => 400, ready_time => 600);
    $self->select_serial_terminal;

It seems that there are duplicated checking point on "grub" and "host login".

I did a try with the following code changes for "lib/utils", it can work now: https://openqa.suse.de/tests/5519541
However, we have to do enough tests to make sure the changes are safe.

diff --git a/lib/utils.pm b/lib/utils.pm
index 4beaa1e8e..25bee9477 100644
--- a/lib/utils.pm
+++ b/lib/utils.pm
@@ -1372,9 +1372,11 @@ sub reconnect_mgmt_console {
                       diag 'Could not find boot selection, continuing nevertheless, trying to boot';
                     type_line_svirt '';
                 }
-                wait_serial('GNU GRUB', $args{grub_timeout}) ||
-                  diag 'Could not find GRUB screen, continuing nevertheless, trying to boot';
-                type_line_svirt '', expect => $login_ready, timeout => $args{timeout}, fail_message => 'Could not find login prompt';
+                if (check_var('UPGRADE', '1') || check_var('INSTALLONLY', '1')) {
+                    wait_serial('GNU GRUB', $args{grub_timeout}) ||
+                      diag 'Could not find GRUB screen, continuing nevertheless, trying to boot';
+                    type_line_svirt '', expect => $login_ready, timeout => $args{timeout}, fail_message => 'Could not find login prompt';
+                }
             }
         }

Thanks to Lemon and Yutao' suggestion:
(check_var('UPGRADE', '1') || check_var('INSTALLONLY', '1')) => if (is_upgrade || check_var('INSTALLONLY', '1'))

Actions #2

Updated by rfan1 over 3 years ago

I can find the below cases are using this function
#:~/data/os-autoinst-distri-opensuse/tests # find . -type f |xargs egrep reconnect_mgmt_console|grep -v is_pvm
./autoyast/installation.pm: reconnect_mgmt_console(timeout => 500, grub_timeout => 180);
./autoyast/installation.pm: reconnect_mgmt_console(timeout => 500);
./boot/reconnect_mgmt_console.pm:use utils 'reconnect_mgmt_console';
./boot/reconnect_mgmt_console.pm: reconnect_mgmt_console;
./boot/grub_test_snapshot.pm:use utils qw(workaround_type_encrypted_passphrase reconnect_mgmt_console);
./migration/version_switch_upgrade_target.pm: reconnect_mgmt_console;

@Rodion Iafarov, Can I ask for your kindly help to double check this?

Actions #3

Updated by rfan1 over 3 years ago

  • Status changed from New to Workable
Actions #5

Updated by rfan1 over 3 years ago

Will try to schedule some tests

Actions #6

Updated by rfan1 about 3 years ago

  • Subject changed from [sle][sle15sp3][s390x][zkvm] "reconnect_mgmt_console" after rebooting the vm didn't work as expected to [sle][sle15sp4][s390x][zkvm] "reconnect_mgmt_console" after rebooting the vm didn't work as expected
Actions #7

Updated by rfan1 over 2 years ago

  • Status changed from Workable to Resolved
  • % Done changed from 0 to 100

The issue is not seen and we don't need reconnect it any more on the platform other then powervm
reconnect_mgmt_console if is_pvm;

Actions

Also available in: Atom PDF