Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker buildx create --bootstrap --driver remote can block docker buildx ls when the remote is down/misconfigured #2062

Closed
3 tasks done
jsternberg opened this issue Sep 28, 2023 · 0 comments · Fixed by #2066
Labels
kind/bug Something isn't working status/triage

Comments

@jsternberg
Copy link
Collaborator

Contributing guidelines

I've found a bug and checked that ...

  • ... the documentation does not mention anything about my problem
  • ... there are no open or closed issues that are related to my problem

Description

docker buildx ls will be unable to return any results if docker buildx create --bootstrap is used with the remote driver and the server the remote driver refers to is down or otherwise unavailable.

Expected behaviour

docker buildx ls should return the list of builders either with or without the misconfigured one (probably with).

Actual behaviour

Deadlocks until the create command is killed. Ctrl-C does not cause a graceful shutdown of docker buildx create.

Buildx version

github.com/docker/buildx v0.11.2-desktop.1 986ab6afe790e25f022969a18bc0111cff170bc2

Docker info

Client:
 Version:    24.0.5
 Context:    desktop-linux
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.11.2-desktop.1
    Path:     /Users/jsternberg/.docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.20.2-desktop.1
    Path:     /Users/jsternberg/.docker/cli-plugins/docker-compose
  dev: Docker Dev Environments (Docker Inc.)
    Version:  v0.1.0
    Path:     /Users/jsternberg/.docker/cli-plugins/docker-dev
  extension: Manages Docker extensions (Docker Inc.)
    Version:  v0.2.20
    Path:     /Users/jsternberg/.docker/cli-plugins/docker-extension
  init: Creates Docker-related starter files for your project (Docker Inc.)
    Version:  v0.1.0-beta.6
    Path:     /Users/jsternberg/.docker/cli-plugins/docker-init
  sbom: View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc.)
    Version:  0.6.0
    Path:     /Users/jsternberg/.docker/cli-plugins/docker-sbom
  scan: Docker Scan (Docker Inc.)
    Version:  v0.26.0
    Path:     /Users/jsternberg/.docker/cli-plugins/docker-scan
  scout: Command line tool for Docker Scout (Docker Inc.)
    Version:  0.20.0
    Path:     /Users/jsternberg/.docker/cli-plugins/docker-scout

Server:
 Containers: 5
  Running: 3
  Paused: 0
  Stopped: 2
 Images: 42
 Server Version: 24.0.5
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 3dce8eb055cbb6872793272b4f20ed16117344f8
 runc version: v1.1.7-0-g860f061
 init version: de40ad0
 Security Options:
  seccomp
   Profile: unconfined
  cgroupns
 Kernel Version: 5.15.49-linuxkit-pr
 Operating System: Docker Desktop
 OSType: linux
 Architecture: aarch64
 CPUs: 5
 Total Memory: 7.667GiB
 Name: docker-desktop
 ID: e41fd2d2-1512-499e-b561-28aa90faef12
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 HTTP Proxy: http.docker.internal:3128
 HTTPS Proxy: http.docker.internal:3128
 No Proxy: hubproxy.docker.internal
 Experimental: false
 Insecure Registries:
  hubproxy.docker.internal:5555
  127.0.0.0/8
 Live Restore Enabled: false

Builders list

NAME/NODE       DRIVER/ENDPOINT      STATUS   BUILDKIT             PLATFORMS
sandbox *       remote                                             
  sandbox0      tcp://127.0.0.1:9317 inactive                      
default         docker                                             
  default       default              running  v0.11.6+0a15675913b7 linux/arm64, linux/amd64, linux/amd64/v2, linux/riscv64, linux/ppc64le, linux/s390x, linux/386, linux/mips64le, linux/mips64, linux/arm/v7, linux/arm/v6
desktop-linux   docker                                             
  desktop-linux desktop-linux        running  v0.11.6+0a15675913b7 linux/arm64, linux/amd64, linux/amd64/v2, linux/riscv64, linux/ppc64le, linux/s390x, linux/386, linux/mips64le, linux/mips64, linux/arm/v7, linux/arm/v6

Configuration

Note that the run command here produces an incorrectly configured remote endpoint. It needs --addr tcp://0.0.0.0:9317 to run properly but I just forgot.

$ docker run -p 127.0.0.1:9317:9317 --privileged -d moby/buildkit:buildx-stable-1
$ docker buildx create --bootstrap --name sandbox --driver remote tcp://127.0.0.1:9317

Build logs

[+] Building 0.0s (0/0)

Additional info

Ctrl-C had to be pushed twice to abort the buildx create. Once the process ended, the buildx ls finished correctly. Possibly related to #1935.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working status/triage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant