action #109929
openSnapshot rollback after SUT reboot breaks console switching
0%
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:
- Activate 2 or more consoles
- Create snapshot
- Reboot SUT and call
wait_boot()
(reset_consoles()
will be called bywait_boot()
here) - Activate the same consoles again (all of them will be added to
$autotest::last_milestone->{activated_consoles}
due toreset_consoles()
above) - Trigger snapshot rollback
- 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.
Updated by okurz over 2 years 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?
Updated by MDoucha over 2 years ago
okurz wrote:
It should be possible to fix this in
the methodsThat'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.
Updated by okurz over 2 years ago
- Category changed from Regressions/Crashes 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.
Updated by ph03nix almost 2 years ago
- Related to action #122773: [qe-core][leap 15.4 update]test fails in cifs,failed to rollback to the snapshot added