Skip to content

docker-container: wait for buildkitd before Dial - #4023

Closed
locker95 wants to merge 1 commit into
docker:masterfrom
locker95:fix-container-first-build-race
Closed

docker-container: wait for buildkitd before Dial#4023
locker95 wants to merge 1 commit into
docker:masterfrom
locker95:fix-container-first-build-race

Conversation

@locker95

Copy link
Copy Markdown

A freshly created docker-container builder can show Running before buildkitd has bound its socket. The first build then fails with "no such file" or a server-preface EOF, and DriverHandle caches that Client() error so we never recover.

Bootstrap already waits on buildctl debug workers after start. The Boot() fast path skips Bootstrap when the container is already Running, so Client() now does that same wait before Dial.

Fixes #4021

A new builder can be Running before buildkitd binds its socket.
DriverHandle caches the first Client() error, so that race is sticky.

Signed-off-by: Dean Chen <862469039@qq.com>
@crazy-max

Copy link
Copy Markdown
Member

Thanks, opened #4027 as alternative. We also need to handle cached client properly.

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.

docker-container driver: builds connecting between container start and buildkitd readiness fail without retry (first-build bootstrap race)

2 participants