Skip to content

quadlet (podman-systemd.unit) support for --retry and --retry-delay for image pulls #25109

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
dustymabe opened this issue Jan 23, 2025 · 7 comments · Fixed by #25675
Closed
Labels
kind/feature Categorizes issue or PR as related to a new feature. quadlet

Comments

@dustymabe
Copy link
Contributor

Feature request description

Currently there doesn't seem to be support for image pull retry and retry-delay for systemd.unit files.

This is a feature request to add those features.

Suggest potential solution

Support for controlling retries from a systemd unit container file.

Have you considered any alternatives?

No.

Additional context

An example where I have seen an issue is with this unit. The error that I got was:

Trying to pull quay.io/coreos-assembler/coreos-assembler:latest...
Pulling image //quay.io/coreos-assembler/coreos-assembler:latest inside systemd: setting pull timeout to 5m0s
Error: copying system image from manifest list: determining manifest MIME type for docker://quay.io/coreos-assembler/coreos-assembler:latest: reading manifest sha256:9d5c60213547ca29dda408ed4b26313d0d5ff390b9beb0cbdfdc2d6866b33eb9 in quay.io/coreos-assembler/coreos-assembler: received unexpected HTTP status: 502 Bad Gateway

I would expect to be able to configure things such that this error was retried.

The setting pull timeout to 5m0s suggests the code related to this is in https://github.com/containers/common/blob/34a90afcdc6d30277beeda3988c9a816d15160b9/libimage/copier.go#L378

@dustymabe dustymabe added the kind/feature Categorizes issue or PR as related to a new feature. label Jan 23, 2025
@dustymabe dustymabe changed the title quadlet (podman-systemd) support for --retry and --retry-delay for image pulls quadlet (podman-systemd.unit) support for --retry and --retry-delay for image pulls Jan 23, 2025
@Luap99
Copy link
Member

Luap99 commented Jan 23, 2025

We can add the fields in quadlet for sure but I think 5XX errors are not retried currently as per containers/common#2299 so that would not be enough for your example.

@Luap99 Luap99 added the quadlet label Jan 23, 2025
@dustymabe
Copy link
Contributor Author

Thanks @Luap99 - I'll comment over there and follow progress.

@vrothberg
Copy link
Member

A temporary workaround could be setting the retry field in containers.conf. But as Paul highlighted, it wouldn't resolve the 5XX case.

@dustymabe
Copy link
Contributor Author

yeah. I'm not even sure supporting Retry= or RetryDelay= here makes sense (i.e. we wouldn't want to pass these to the podman run command), unless we had them take effect in the image pull code that containers/common#2299 is talking about.

@jankaluza
Copy link
Member

I will take this one.

@jankaluza
Copy link
Member

Actually, i see @Luap99 already did part of this in containers/common#2378. @Luap99 , should I find another issue?

@Luap99
Copy link
Member

Luap99 commented Mar 24, 2025

@jankaluza You can take this one to add the quadlet fields, the retry on 5xx is related but both parts work individually as well.

jankaluza pushed a commit to jankaluza/podman that referenced this issue Mar 25, 2025
This commit adds new Retry= and RetryDelay= options
to quadlet.go which result in --retry and --retry-delay
usage in podman run command.

This allows configuring the retry logic in .container systemd
files.

Fixes: containers#25109

Signed-off-by: Jan Kaluza <[email protected]>
jankaluza pushed a commit to jankaluza/podman that referenced this issue Mar 25, 2025
This commit adds new Retry= and RetryDelay= options
to quadlet.go which result in --retry and --retry-delay
usage in podman run command.

This allows configuring the retry logic in .container systemd
files.

Fixes: containers#25109

Signed-off-by: Jan Kaluza <[email protected]>
jankaluza pushed a commit to jankaluza/podman that referenced this issue Mar 25, 2025
This commit adds new Retry= and RetryDelay= options
to quadlet.go which result in --retry and --retry-delay
usage in podman run, image and build commands.

This allows configuring the retry logic in the systemd
files.

Fixes: containers#25109

Signed-off-by: Jan Kaluza <[email protected]>
jankaluza pushed a commit to jankaluza/podman that referenced this issue Mar 26, 2025
This commit adds new Retry= and RetryDelay= options
to quadlet.go which result in --retry and --retry-delay
usage in podman run, image and build commands.

This allows configuring the retry logic in the systemd
files.

Fixes: containers#25109

Signed-off-by: Jan Kaluza <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. quadlet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants