Skip to content

Add support for Retry= and RetryDelay= to Podman Quadlet. #25675

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

Merged
merged 1 commit into from
Mar 26, 2025

Conversation

jankaluza
Copy link
Member

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: #25109

Does this PR introduce a user-facing change?

The Retry= and RetryDelay= options are now supported in the systemd .container files.

Copy link
Member

@Luap99 Luap99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image and build units also should accept these options for consistency.

$ podman build --help | grep retry
      --retry int                                    number of times to retry in case of failure when performing push/pull (default 3)
      --retry-delay string                           delay between retries in case of push/pull failures
$ podman pull --help | grep retry
      --retry uint                   number of times to retry in case of failure when performing pull (default 3)
      --retry-delay string           delay between retries in case of pull failures

Copy link
Contributor

@ygalblum ygalblum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small doc nit

@jankaluza
Copy link
Member Author

image and build units also should accept these options for consistency.

$ podman build --help | grep retry
      --retry int                                    number of times to retry in case of failure when performing push/pull (default 3)
      --retry-delay string                           delay between retries in case of push/pull failures
$ podman pull --help | grep retry
      --retry uint                   number of times to retry in case of failure when performing pull (default 3)
      --retry-delay string           delay between retries in case of pull failures

Thanks, that's a good point. I've added them in the latest update :-).

@jankaluza
Copy link
Member Author

image and build units also should accept these options for consistency.

$ podman build --help | grep retry
      --retry int                                    number of times to retry in case of failure when performing push/pull (default 3)
      --retry-delay string                           delay between retries in case of push/pull failures
$ podman pull --help | grep retry
      --retry uint                   number of times to retry in case of failure when performing pull (default 3)
      --retry-delay string           delay between retries in case of pull failures

Thanks, that's a good point. I've added them in the latest update :-).

But checking that PR once more, I did not add documentation for them, will add it :-).

Copy link
Contributor

@ygalblum ygalblum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM, just missing the last doc part

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
Copy link
Member Author

Added the documentation

Copy link
Member

@Luap99 Luap99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Mar 26, 2025
Copy link
Contributor

openshift-ci bot commented Mar 26, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jankaluza, Luap99

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 26, 2025
@openshift-merge-bot openshift-merge-bot bot merged commit 8d693d6 into containers:main Mar 26, 2025
80 of 81 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. release-note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

quadlet (podman-systemd.unit) support for --retry and --retry-delay for image pulls
3 participants