Project

General

Profile

Actions

action #120723

closed

coordination #68794: [qe-core][functional][epic] rework postfail hooks

[qe-core] Guarantee `show_tasks_in_blocked_state` will always be called

Added by szarate over 1 year ago. Updated about 1 year ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Refactor/Code Improvements
Target version:
Start date:
2022-11-18
Due date:
% Done:

100%

Estimated time:
Difficulty:
Sprint:
QE-Core: January Sprint (Jan 11 - Feb 08)

Description

Currently we're not executing any post_fail_hooks if we're in serial-terminal and it shouldn't be the case, if possible we would like to trigger this from the serial terminal, however at this point it is known that sending special keys does not work, so we might need to resolve to switching to either root-console or log-console for this to work always.

While we're at it, also try to use logger if available, to tag it on the journal, so we can know easily where to look for

This will help us to collect valuable information in case the SUT is experiencing some unforseen load

Tasks

  • Ensure the show_tasks_in_blocked_state is always called, unless the SUT doesn't have a real console
  • If binary logger is available in the system, use it to create a tag so that we know when does the tasks_in_blocked_state start and when do they end

Acceptance Criteria

  1. AC1: show_tasks_in_blocked_state is called unconditionally, unless the SUT doesn't have a real console
  2. AC2: When logger is available, messages can be seen in the journal, signaling the beginning and the end of the trace

Related issues 2 (1 open1 closed)

Related to openQA Tests - action #120720: [qe-core] Use Utils::Logging::save_ulog to redefine upload_logs in opensusebasetestNew2022-11-18

Actions
Copied to openQA Tests - action #120729: [qe-core] *basetest::post_fail_hook: leave early if `NOLOGS` is setResolvedrfan12022-11-18

Actions
Actions #1

Updated by szarate over 1 year ago

  • Copied to action #120729: [qe-core] *basetest::post_fail_hook: leave early if `NOLOGS` is set added
Actions #2

Updated by szarate over 1 year ago

  • Status changed from New to Workable
Actions #3

Updated by rfan1 over 1 year ago

  • Assignee set to rfan1
Actions #4

Updated by rfan1 over 1 year ago

  • Assignee deleted (rfan1)
Actions #5

Updated by szarate over 1 year ago

  • Sprint changed from QE-Core: November Sprint (Nov 09 - Dec 07) to QE-Core: December Sprint (Dec 07 - Jan 04)
Actions #6

Updated by szarate over 1 year ago

  • Sprint changed from QE-Core: December Sprint (Dec 07 - Jan 11) to QE-Core: January Sprint (Jan 11 - Feb 08)
Actions #7

Updated by dzedro over 1 year ago

  • Status changed from Workable to In Progress
  • Assignee set to dzedro
Actions #8

Updated by dzedro over 1 year ago

@szarate I'm sure there are tests which do not upload logs at all, but e.g. console tests do not run show_tasks_in_blocked_statem but they do run post_fail_hook and upload logs. I will try to find tests which do not upload logs at all, but mentioned examples would be helpful.

Actions #9

Updated by szarate over 1 year ago

dzedro wrote:

@szarate I'm sure there are tests which do not upload logs at all, but e.g. console tests do not run show_tasks_in_blocked_statem but they do run post_fail_hook and upload logs. I will try to find tests which do not upload logs at all, but mentioned examples would be helpful.

@dzedro, there's also for instance: #120735 which was reverted, introduced a way to not exit the post_fail_hook when we're in serial terminal:

  unless (is_serial_terminal()) {
        show_tasks_in_blocked_state;

        # In case the system is stuck in shutting down or during boot up, press
        # 'esc' just in case the plymouth splash screen is shown and we can not
        # see any interesting console logs.
        send_key 'esc';
        save_screenshot;
        # the space prevents the esc from eating up the next alphanumerical
        # character typed into the console
        send_key 'spc';
    }

I think that rather unconditionally, to ensure that for anything that inherits from opensusebasetest, x11test, consolebasetest would call the show_tasks_in_blocked_state. Later as a separate ticket, we can add a new static check, to verify that tests are calling SUPER::post_fail_hook correctly.

What do you think?

Actions #10

Updated by szarate over 1 year ago

  • Related to action #120720: [qe-core] Use Utils::Logging::save_ulog to redefine upload_logs in opensusebasetest added
Actions #11

Updated by szarate over 1 year ago

Dee is also having a similar problem due to #120735 being reverted

Actions #12

Updated by dzedro over 1 year ago

The issue why #120735 was reverted is because of issue with serial_console #109929, serial_console does not work properly/same as VNC console (is activate_console or not).
OK unconditionally, but I would like to avoid unexpected failures and test all affected base classes running show_tasks_in_blocked_state.

Actions #14

Updated by dzedro about 1 year ago

  • Status changed from In Progress to Resolved
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF