mirror of
https://github.com/rocky-linux/os-autoinst-distri-rocky.git
synced 2024-11-22 13:11:26 +00:00
Retry bodhi updates download
a few times if it fails
It's failing about one in six tries currently, with Bodhi 5.5 on the server end: https://github.com/fedora-infra/bodhi/issues/4105 this should work around that. Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
parent
41ddac0951
commit
0557a774ac
13
lib/utils.pm
13
lib/utils.pm
@ -446,7 +446,18 @@ sub setup_workaround_repo {
|
|||||||
# then we'll download each update for our release:
|
# then we'll download each update for our release:
|
||||||
my $advisories = $workarounds{$version};
|
my $advisories = $workarounds{$version};
|
||||||
foreach my $advisory (@$advisories) {
|
foreach my $advisory (@$advisories) {
|
||||||
assert_script_run "bodhi updates download --updateid=$advisory", 180;
|
my $count = 3;
|
||||||
|
my $success = 0;
|
||||||
|
while ($count) {
|
||||||
|
if (script_run "bodhi updates download --updateid=$advisory", 180) {
|
||||||
|
$count -= 1;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$count = 0;
|
||||||
|
$success = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
die "Workaround update download failed!" unless $success;
|
||||||
}
|
}
|
||||||
# and create repo metadata
|
# and create repo metadata
|
||||||
assert_script_run "createrepo .";
|
assert_script_run "createrepo .";
|
||||||
|
Loading…
Reference in New Issue
Block a user