Add apt retries in systemtest Dockerfiles#774
Conversation
Make apt and wget commands in the systemtest Dockerfiles retry transient network failures so local and CI builds are less flaky.
MakisH
left a comment
There was a problem hiding this comment.
Thanks for the PR! Something in this direction could be proven helpful, but I still have some doubts.
| RUN apt-get -o Acquire::Retries=3 -qq update && \ | ||
| apt-get -o Acquire::Retries=3 -qq -y install \ |
There was a problem hiding this comment.
Reading https://manpages.debian.org/buster/apt/apt.conf.5.en.html#THE_ACQUIRE_GROUP I understand that there is no default value, so three retries here sounds valid.
Do we know if this option actually has an effect on the update? I am not sure if "acquire" here means both "download the metadata" and "download the packages".
There was a problem hiding this comment.
i looked at the apt.conf manpage , from what i understand that the " Acquire " group is not only abt installing .deb packages , but about the files apt fetches through its acquire mechanism , the retries option says that apt retries failed files when this value is non-zero , since the apt-get update also fetches files, like Release/InRelease and Packages index files, I think this should also apply there. so i kept on both update and install .
There was a problem hiding this comment.
@PranjalManhgaye it looks like the Acquire::Retries=3 is also the default, since APT 2.3.2, which is included in both Ubuntu 22.04 and 24.04, which we currently use:
There was a problem hiding this comment.
Besides that, the easier implementation would be to add a system-wide rule to retry: https://askubuntu.com/a/1107071/142834
There was a problem hiding this comment.
i think it may be better to close this pr , If Acquire::Retries=3 is already the default in the APT versions used by both Ubuntu 22.04 and 24.04, then this PR does not really change the behavior anymore after removing the wget options , i will come up with different approach to address this issue .
Remove the explicit wget retry options because wget already has more permissive defaults, while keeping apt Acquire::Retries for package fetches.
|
thanks, looking at it again, this PR now only covers the |
|
@PranjalManhgaye let's make this even smaller for now: I would focus on OpenFOAM and add a large |
|
@MakisH i will open a new small focused pr for only changing the OpenFOAM repository setup download in the systemtest Dockerfiles by adding a larger |
Summary
This PR adds limited retries to the network-sensitive package and download commands in the systemtest Dockerfiles.
when we build the systemtest Docker images, we depend on external package mirrors and download servers. Sometimes these fail temporarily, even though nothing is wrong with our code or the tutorial setup. In those cases, a local run or CI job can fail just because a mirror was slow or unreachable.
tthis is especially relevant for steps such as installing packages, setting up OpenFOAM, and downloading CalculiX or SU2 sources. with a few bounded retries, we keep the normal behavior the same, but make the builds a bit more robust against temporary network issues.
Changes
This PR adds bounded retry behavior in both systemtest Dockerfiles:
apt-get updateandapt-get installnow useAcquire::Retries=3wgetdownloads now use--tries=3 --waitretry=5tools/tests/dockerfiles/ubuntu_2204/Dockerfiletools/tests/dockerfiles/ubuntu_2404/DockerfileThis keeps the Dockerfile behavior the same in normal cases, but makes builds more robust against temporary network or mirror issues.
Fixes #768.
Validation
Both ran successfully .
Checklist:
changelog-entries/<PRnumber>.md.