docker / docker/buildx

`docker buildx inspect --bootstrap` can return inactive nodes

Open
#1,935 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area/driver kind/bug status/needs-investigation
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.