Skip to content
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

Config for Retry and RetryDelay for pulling images #1865

Merged
merged 1 commit into from
Feb 20, 2024

Conversation

rhatdan
Copy link
Member

@rhatdan rhatdan commented Feb 20, 2024

No description provided.

Copy link
Contributor

openshift-ci bot commented Feb 20, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rhatdan

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

@rhatdan
Copy link
Member Author

rhatdan commented Feb 20, 2024

@dustymabe @baude @mtrmac @vrothberg @giuseppe @containers/podman-maintainers PTAL

Copy link
Member

@TomSweeneyRedHat TomSweeneyRedHat left a comment

Choose a reason for hiding this comment

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

LGTM

@nalind
Copy link
Member

nalind commented Feb 20, 2024

What would the corresponding settings for pushing look like?

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
@nalind
Copy link
Member

nalind commented Feb 20, 2024

LGTM

@@ -354,6 +354,7 @@ func defaultEngineConfig() (*EngineConfig, error) {
c.PodmanshTimeout = uint(30)
c.ExitCommandDelay = uint(5 * 60)
c.Remote = isRemote()
c.Retry = 3

Choose a reason for hiding this comment

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

does having a value set here change current default behavior?

Copy link
Member Author

Choose a reason for hiding this comment

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

The only place we have a default behaviour currently is in Buildah and it is hard coded to 3.
The retry_delay is more complicated.

Comment on lines +424 to +430
// Number of times to retry pulling/pushing images in case of failure
Retry uint `toml:"retry,omitempty"`

// Delay between retries in case pulling/pushing image fails
// If set, container engines will retry at the set interval,
// otherwise they delay 2 seconds and then exponentially back off.
RetryDelay string `toml:"retry_delay,omitempty"`

Choose a reason for hiding this comment

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

Since these are new values it's worth asking: Retry is a pretty global term. Would there ever be a case where we'd want to have another setting for retrying something else in a different part of the stack? If so we'd want to make these values more specific maybe.

Copy link
Member Author

Choose a reason for hiding this comment

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

Do you think we should change it to image_retry_delay and image_retry?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think retry is safe since these are the options in buildah build, podman pull and podman build.

Choose a reason for hiding this comment

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

+1 - Just wanted to provoke the thought :)

@dustymabe
Copy link

Thanks Dan for working on this. Just a few questions from an outsider. Nothing that should block this merging.

@@ -764,6 +764,14 @@ Pull image before running or creating a container. The default is **missing**.
Indicates whether the application should be running in remote mode. This flag modifies the
--remote option on container engines. Setting the flag to true will default `podman --remote=true` for access to the remote Podman service.

**retry** = 3

Number of times to retry pulling/pushing images in case of failure.

Choose a reason for hiding this comment

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

Does this actually retry pushes or just pulls?

Copy link
Member Author

Choose a reason for hiding this comment

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

Buildah uses this for both push and pull, so I added it as well. We will need to get this into Podman and Buildah, once we merge this.

@rhatdan rhatdan added the lgtm label Feb 20, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit 6ee157e into containers:main Feb 20, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants