action #71938
closed[sle][migration][SLE15SP3] investigation on diff online /offline rollback
100%
Description
currently we have following two kind of setting, we need further check why we need these two setting and whether can be combine the logic?
*offline
rollback_migration
upgrade=1
*online
rollbackmigration
online_upgrade
Updated by leli over 3 years ago
- Category set to Spike/Research
- Assignee set to leli
Updated by leli over 3 years ago
- Status changed from New to In Progress
general snapper_rollback:
use base "consoletest";
use testapi;
use utils;
use strict;
use warnings;
use migration 'check_rollback_system';
use power_action_utils 'power_action';
use Utils::Backends 'is_pvm';
sub run {
my ($self) = @_;
if (!check_screen 'linux-login', 200) {
assert_screen 'displaymanager', 90;
}
select_console 'root-console';
# 1)
script_run('touch NOWRITE;test ! -f NOWRITE', 0);
# 1b) just debugging infos
script_run("snapper list", 0);
script_run("cat /etc/os-release", 0);
# rollback
script_run("snapper rollback -d rollback-before-migration");
assert_script_run("snapper list | tail -n 2 | grep rollback", 180);
power_action('reboot', textmode => 1, keepconsole => 1);
reconnect_mgmt_console if is_pvm;
$self->wait_boot(ready_time => 300, bootloader_time => 300);
select_console 'root-console';
check_rollback_system;
}
sub test_flags {
return {fatal => 1};
}
online_migration/snapper_rollback:
use base "consoletest";
use strict;
use warnings;
use testapi;
use power_action_utils 'power_action';
use version_utils 'is_desktop_installed';
use migration 'check_rollback_system';
sub run {
my ($self) = @_;
if (!check_screen 'linux-login', 200) {
assert_screen 'displaymanager', 90;
}
select_console 'root-console';
script_run "snapper rollback";
# reboot into the system before online migration
power_action('reboot', textmode => 1, keepconsole => 1);
$self->wait_boot(textmode => !is_desktop_installed);
select_console 'root-console';
check_rollback_system;
}
Updated by leli over 3 years ago
From the code compare, we can see the boot/snapper_rollback.pm has more debug info before and after rollback, while from the main purpose for rollback test they are the same almost.
Updated by leli over 3 years ago
- % Done changed from 0 to 80
I have checked about 10 online migration test cases, all with ONLINE_MIGRATION=1 and UPGRADE=1 together but no issue found.
So I suggest to use the boot/snapper_rollback by set ROLLBACK_AFTER_MIGRATION=1 for online/offline migration test cases.
Updated by leli over 3 years ago
- Status changed from In Progress to Resolved
- % Done changed from 80 to 100
We already in the same page after discussion in team, just use the boot/snapper_rollback by set ROLLBACK_AFTER_MIGRATION=1 for online/offline migration test cases.