Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions lib/registration.pm
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,8 @@ sub add_suseconnect_product {
record_soft_failure 'bsc#1124318 - Fail to get module repo metadata - running the command again as a workaround';
}
assert_script_run("SUSEConnect -p $name/$version/$arch $params", $timeout);
} elsif ($result && !$retry) {
die "SUSEConnect failed activating module $name with exit code (see log output): $result.";
}
}

Expand Down
9 changes: 9 additions & 0 deletions lib/utils.pm
Original file line number Diff line number Diff line change
Expand Up @@ -500,12 +500,21 @@ sub zypper_call {
$IN_ZYPPER_CALL = 1;
# Retrying workarounds
my $ret;
my $search_conflicts = 'awk \'BEGIN {print "Processing conflicts - ",NR; group=0}
/Solverrun finished with an ERROR/,/statistics/{ print group"|",
$0; if ($0 ~ /statistics/ ){ print "EOL"; group++ }; }\'\
/var/log/zypper.log
';
for (1 .. 5) {
$ret = script_run("zypper -n $command $printer; ( exit \${PIPESTATUS[0]} )", $timeout);
die "zypper did not finish in $timeout seconds" unless defined($ret);
if ($ret == 4) {
if (script_run('grep "Error code.*502" /var/log/zypper.log') == 0) {
die 'According to bsc#1070851 zypper should automatically retry internally. Bugfix missing for current product?';
} elsif (my $conflicts = script_output($search_conflicts)) {
record_info("Conflict", $conflicts, result => 'fail');
diag "Package conflicts found, not retrying anymore" if $conflicts;
last;
}
next unless get_var('FLAVOR', '') =~ /-(Updates|Incidents)$/;
}
Expand Down