buildah push is not retrying?
cmorve-te opened this issue · 3 comments
cmorve-te commented
The docs say
**--retry** *attempts*
Number of times to retry in case of failure when performing push of images to registry.
Defaults to `3`.
So I was expecting up to 3 retries if there is any problem pushing the image. But I'm getting
$ buildah push <image>
Getting image source signatures
Copying blob sha256:<hash>
Copying blob sha256:<hash>
Error: pushing image "<image>" to "docker://<image>": writing blob: Patch "https://<...>/blobs/uploads/<hash>": write tcp <ip>:<port>-><ip>:443: use of closed network connection
error messages with buildah 1.38.0, which don't seem to indicate any retry?
I don't know go, but FWIW in https://github.com/containers/buildah/blob/v1.38.0/push.go#L120 I see RetryDelay but no MaxRetries.
cmorve-te commented
Sometimes it actually does retry
$ buildah push <image>
time="2024-12-04T13:58:53Z" level=warning msg="Failed, retrying in 1s ... (1/3). Error: trying to reuse blob sha256:<hash> at destination: pinging container registry <hostname>: Get \"[<url>\](<url>/)": EOF"
github-actions commented
A friendly reminder that this issue had no activity for 30 days.
flouthoc commented
This issue is not reproduceable in upstream. Could you try again with latest release and if it still persists could you please share a reproducer.
./buildah push test docker://localhost/test
Getting image source signatures
WARN[0000] Failed, retrying in 1s ... (1/3). Error: trying to reuse blob sha256:a16e98724c05975ee8c40d8fe389c3481373d34ab20a1cf52ea2accc43f71f4c at destination: pinging container registry localhost: Get "https://localhost/v2/": dial tcp 127.0.0.1:443: connect: connection refused
Getting image source signatures
WARN[0001] Failed, retrying in 2s ... (2/3). Error: trying to reuse blob sha256:a16e98724c05975ee8c40d8fe389c3481373d34ab20a1cf52ea2accc43f71f4c at destination: pinging container registry localhost: Get "https://localhost/v2/": dial tcp 127.0.0.1:443: connect: connection refused
Getting image source signatures
WARN[0003] Failed, retrying in 4s ... (3/3). Error: trying to reuse blob sha256:a16e98724c05975ee8c40d8fe389c3481373d34ab20a1cf52ea2accc43f71f4c at destination: pinging container registry localhost: Get "https://localhost/v2/": dial tcp 127.0.0.1:443: connect: connection refused
Getting image source signatures
Error: pushing image "test" to "docker://localhost/test": trying to reuse blob sha256:a16e98724c05975ee8c40d8fe389c3481373d34ab20a1cf52ea2accc43f71f4c at destination: pinging container registry localhost: Get "https://localhost/v2/": dial tcp 127.0.0.1:443: connect: connection refused
``