`docker buildx inspect --bootstrap` can return inactive nodes
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 4.5k
- Forks
- 682
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 29
Description
Found while working on https://github.com/docker/buildx/pull/1934.
Version: github.com/docker/buildx 0.11.0 687feca9e8dcd1534ac4c026bc4db5a49de0dd6e
Reproducer:
$ docker buildx create --driver=remote --name dev tcp://localhost:1234
$ docker buildx inspect dev --bootstrap # then start a buildkit server on localhost:1234 in another terminal
[+] Building 0.0s (0/0)
Name: dev
Driver: remote
Last Activity: 2023-07-05 09:56:56 +0000 UTC
Nodes:
Name: dev0
Endpoint: tcp://localhost:1234
Status: inactive
Platforms:
The expected output is instead:
$ docker buildx inspect dev --bootstrap
Name: dev
Driver: remote
Last Activity: 2023-07-05 09:56:56 +0000 UTC
Nodes:
Name: dev0
Endpoint: tcp://localhost:1234
Status: running
Buildkit: v0.12.0-rc1-4-g66a4b9421.m
Platforms: linux/amd64, linux/amd64/v2, linux/amd64/v3, linux/arm64, linux/riscv64, linux/ppc64le, linux/s390x, linux/386, linux/mips64le, linux/mips64, linux/arm/v7, linux/arm/v6
Labels:
org.mobyproject.buildkit.worker.executor: oci
org.mobyproject.buildkit.worker.hostname: dc141ad6e142
The node is correctly bootstrapped (by waiting for it to be ready), but the output is incorrect and shows the builder as inactive.
This does appear to be slightly racy.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the issue's remote-driver reproducer and compare docker buildx inspect dev --bootstrap while the BuildKit server starts. Trace the bootstrap and node-status reporting path to find the race; done means the command waits for the node and reports running with Buildkit, platforms, and labels as shown in the expected output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, go
- Domain
- cli, devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100