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

Should pkg/retry retry on HTTP status 500? (502? others?) #1759

Open
Windfarer opened this issue Dec 1, 2023 · 5 comments
Open

Should pkg/retry retry on HTTP status 500? (502? others?) #1759

Windfarer opened this issue Dec 1, 2023 · 5 comments

Comments

@Windfarer
Copy link

Windfarer commented Dec 1, 2023

when copy from remote repository, the current error retry does not handle status code 500 response. it seems there’s no handle for any error http status code in https://github.com/containers/common/blob/main/pkg/retry/retry.go
maybe this error status code handler would be implemented in skopeo?

@vrothberg
Copy link
Member

Did you try using skopeo copy --retry-times N? It's set to 0 by default but you are free to set it to a value of your choice.

@Windfarer
Copy link
Author

Windfarer commented Dec 1, 2023 via email

@vrothberg
Copy link
Member

Can you elaborate on the reasoning for retrying on 500? If a server returns 500, it indicates something's seriously wrong. I don't think it's conventional to assume the next response would be any different.

@Windfarer
Copy link
Author

Windfarer commented Dec 2, 2023 via email

@mtrmac
Copy link
Contributor

mtrmac commented Dec 4, 2023

There are quite a few situations, like running out of disk space, where retrying can make things worse. So I lean towards being conservative here, but I realize I tend to worry more than others.

Either way, this should be decided in c/common/pkg/retry (although it might need new error types exported from c/image as well, the heuristic needs to be decided in c/common), and Skopeo will not add a special case; transferring to that repo.

@mtrmac mtrmac transferred this issue from containers/skopeo Dec 4, 2023
@mtrmac mtrmac changed the title skopeo copy unable to retry on status code 500 response Should pkg/retry retry on HTTP status 500? (502? others?) Dec 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants