Skip to content

[Bug]: container build will reconnect like crazy when registry connect returns error #918

@seven1240

Description

@seven1240

I have done the following

  • I have searched the existing issues
  • If possible, I've reproduced the issue using the 'main' branch of this project

Steps to reproduce

run container build with private base image
private registry returns error, maybe token expired or whatever reason 4xx response
build process looks like stuck but reconnects like crazy ( 10+ times / seconds)

Current behavior

build process looks like stuck but reconnects like crazy ( 10+ times / seconds)

https://private-user-images.githubusercontent.com/31364/513367728-6b9c59a4-43e4-46a5-9369-a15f2e9d0db3.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NjQzOTc3MzUsIm5iZiI6MTc2NDM5NzQzNSwicGF0aCI6Ii8zMTM2NC81MTMzNjc3MjgtNmI5YzU5YTQtNDNlNC00NmE1LTkzNjktYTE1ZjJlOWQwZGIzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTExMjklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUxMTI5VDA2MjM1NVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWRmZTUxOTMyZWFiN2U1OTY3MGZkMDI4ZTA0OTNiOWU0N2NmY2EwYmRhNjhiNTg1ODA3ZGRmY2UwN2M5YzQ1YjgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.Vc6fx0UL3-NPLQQ2oug2KWyB60y8OYwEPOIKmZ3Y7eg

I don't know why the registry failed but looks like a container registry login helps fixed this. During the fail the registry always returns 401, that maybe another issue.

Expected behavior

Show connection error
print error message and abort after n tries
slow down retry like sleep 1 second before next try to prevent a spam to the server?

Environment

- OS: 26.0.1 (25A362)
- Go: 
- Xcode: 
- container CLI version 0.6.0 (build: release, commit: a23bcf0)

Relevant log output

[+] Building 0.0s (0/1)
 => [resolver] fetching image...xswitch......
[then STUCK forever]

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions