Project

General

Profile

action #109929

Snapshot rollback after SUT reboot breaks console switching

Added by MDoucha 2 months ago. Updated 2 months ago.

Status:
New
Priority:
Low
Assignee:
-
Category:
Feature requests
Target version:
Start date:
2022-04-13
Due date:
% Done:

0%

Estimated time:
Difficulty:

Description

If the SUT gets rebooted between snapshot creation and rollback, console state will not be properly restored and select_console() will fail in some cases because it'll try to log in when the user is already logged in since before the snapshot:
https://openqa.suse.de/tests/8545133#step/select_console#1/2

Steps to reproduce:

  1. Activate 2 or more consoles
  2. Create snapshot
  3. Reboot SUT and call wait_boot() (reset_consoles() will be called by wait_boot() here)
  4. Activate the same consoles again (all of them will be added to $autotest::last_milestone->{activated_consoles} due to reset_consoles() above)
  5. Trigger snapshot rollback
  6. Select any console activated in step 1 except the one that was selected during snapshot creation

If the console selected in the last step expects login prompt on first activation and then keeps the session open even while not selected, it'll fail to activate after snapshot rollback. The console session was left open in the snapshot but the test backend will wrongly believe that it's closed due to steps 3 and 4 causing another console reset during snapshot rollback.

History

#1 Updated by okurz 2 months ago

  • Status changed from New to Feedback
  • Assignee set to okurz
  • Target version set to Ready

It should be possible to fix this in
the methods

That's both within the test distribution itself. It certainly depends on the specific backends and console how they behave. As you are the maintainer of select_console it would actually something to be solved by you in this context. With that I suggest to move the ticket to "openQA Tests" with "[kernel]". Ok with that or further questions?

#2 Updated by MDoucha 2 months ago

okurz wrote:

It should be possible to fix this in
the methods

That's both within the test distribution itself. It certainly depends on the specific backends and console how they behave. As you are the maintainer of select_console it would actually something to be solved by you in this context. With that I suggest to move the ticket to "openQA Tests" with "[kernel]". Ok with that or further questions?

No, this is not fixable in test distribution. This requires new metadata flag in each console backend (whether it stays active while deselected) and complete rewrite of basetest::rollback_activated_consoles() in os-autoinst.

#3 Updated by okurz 2 months ago

  • Category changed from Concrete Bugs to Feature requests
  • Status changed from Feedback to New
  • Assignee deleted (okurz)
  • Target version changed from Ready to future

Then we can't help right now.

Also available in: Atom PDF