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

Support retries to push to a registry #1409

Closed
rmannibucau opened this issue Jan 14, 2019 · 4 comments
Closed

Support retries to push to a registry #1409

rmannibucau opened this issue Jan 14, 2019 · 4 comments

Comments

@rmannibucau
Copy link
Contributor

Description of the issue:

On laggy registries - which means you often get a 504 timeout issue - it is not possible to push images with jib whereas it works with docker with a retry (it retries not yet uploaded layers).

Expected behavior:

A retry would happen on layers (default to 3 maybe?).

@chanseokoh
Copy link
Member

chanseokoh commented Jan 14, 2019

#691 is related, although that isn't about dealing with 504.

@coollog coollog added this to the v1.2.0 milestone Jan 14, 2019
@chanseokoh chanseokoh modified the milestones: v1.2.0, v1.3.0 May 2, 2019
@chanseokoh chanseokoh modified the milestones: v1.3.0, v1.4.0 Jun 10, 2019
@chanseokoh chanseokoh modified the milestones: v1.4.0, v1.5.0 Jul 18, 2019
@chanseokoh chanseokoh modified the milestones: v1.5.0, v1.6.0 Aug 12, 2019
@TadCordle TadCordle modified the milestones: v1.6.0, v1.7.0 Sep 13, 2019
@briandealwis
Copy link
Member

We should also investigate using chunked uploads since some layers may be rather huge. The only worrisome aspect is that it's unclear what should be our minimum chunk size:

There is no enforcement on layer chunk splits other than that the server must receive them in order. The server may enforce a minimum chunk size. If the server cannot accept the chunk, a 416 Requested Range Not Satisfiable response will be returned and will include a Range header indicating the current status:

It appears that chunks must be provided in sequence. The documentation describing the 416 result says:

Out of order chunk: the range of the next chunk must start immediately after the “last valid range” from the previous response

@rmannibucau
Copy link
Contributor Author

rmannibucau commented Jul 19, 2021

up? on openshift we easily get SSL issues (indeed without any modification a relaunch works) when pushing concurrently layers so a proper retry would help on client side.

edit: checked that just looping inside com.google.cloud.tools.jib.registry.RegistryEndpointCaller#call(java.net.URL) (potentially with a jitter) to retry solves the mentionned issue. A default of 3 retries sounds very acceptable or alternatively a max duration per push (if the image push didn't suceed in 10mn, don't retry anymore anything for ex).

@chanseokoh
Copy link
Member

One form retry is implemented in #3351. There can be other ways of retrying, but #3351 should already be very helpful. Closing the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants