Skip to content

Commit

Permalink
Workaround for rmt scc cred timeout bsc#1218084
Browse files Browse the repository at this point in the history
  • Loading branch information
dzedro committed Jan 3, 2024
1 parent 2f7c80e commit 956a6b2
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions lib/repo_tools.pm
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,8 @@ sub rmt_wizard {
zypper_call 'in rmt-server';
}

my $count = 1;
WORKAROUND:
enter_cmd "yast2 rmt;echo yast2-rmt-wizard-\$? > /dev/$serialdev";
assert_screen 'yast2_rmt_registration';
send_key 'alt-u';
Expand All @@ -275,8 +277,16 @@ sub rmt_wizard {
type_string(get_required_var('SMT_ORG_PASSWORD'));
wait_still_screen(2, 5);
send_key 'alt-n';
assert_screen 'yast2_rmt_config_written_successfully', 200;
send_key 'alt-o';
assert_screen [qw(yast2_rmt_config_written_successfully yast2_rmt_timeout)], 200;
if (match_has_tag 'yast2_rmt_timeout') {
die 'Credentials timed out 10 times' if $count == 10;
# soft_fail is on needle
send_key 'ret';
wait_still_screen(1, 2);
record_info 'Retry', "Retry No. " . $count++;
goto WORKAROUND;
}
send_key 'alt-o' if match_has_tag 'yast2_rmt_config_written_successfully';
assert_screen 'yast2_rmt_db_password';
send_key 'alt-p';
type_string "rmt";
Expand Down

0 comments on commit 956a6b2

Please sign in to comment.