Skip to content

[BUG] Docker using context is unusable if it cannot connect to daemon - can't change context, print version, build image #3096

@ieugen

Description

@ieugen

Description

I have setup a docker context that connects via ssh to a server that is available behind OpenVPN.
I docker context use that context and do some work while connected to VPN.
The connection dies off or I stop the VPN then docker is unusable.

I can't even change context back to default - local docker install.
I can't build docker images either.

All of these things should not depend on a docker daemon being present.

I believe this is a bug.
Every docker command hangs if the context is not accessible.

I believe being so reliant on the docker connection is a bug.

Steps to reproduce the issue:

  1. Create a context to a remote server
  2. Use that context
  3. Stop the connection to that context
  4. Weep :( .

Describe the results you received:

Docker commands hang.

Describe the results you expected:

I would like to have the ability to change to default context.
I would like to have the ability to build images.

Additional information you deem important (e.g. issue happens only occasionally):

Happens every time.

Output of docker version:

 docker version 
Client: Docker Engine - Community
 Version:           20.10.6
 API version:       1.41
 Go version:        go1.13.15
 Git commit:        370c289
 Built:             Fri Apr  9 22:46:45 2021
 OS/Arch:           linux/amd64
 Context:           dre-main
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          20.10.5
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.13.15
  Git commit:       363e9a8
  Built:            Tue Mar  2 20:16:15 2021
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.4.3
  GitCommit:        269548fa27e0089a8b8278fc4fc781d7f65a939b
 runc:
  Version:          1.0.0-rc92
  GitCommit:        ff819c7e9184c13b7c2607fe6c30ae19403a7aff
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

Output of docker info:

docker info 
Client:
 Context:    dre-main
 Debug Mode: false
 Plugins:
  app: Docker App (Docker Inc., v0.9.1-beta3)
  buildx: Build with BuildKit (Docker Inc., v0.5.1-docker)
  scan: Docker Scan (Docker Inc., v0.7.0)

Server:
 Containers: 17
  Running: 6
  Paused: 0
  Stopped: 11
 Images: 350
 Server Version: 20.10.5
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Native Overlay Diff: true
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 1
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: active
  NodeID: u4n8a96pqxspcm9vr6wn81xxz
  Is Manager: true
  ClusterID: ou9zgftsa4fmdz5e778bzrop9
  Managers: 3
  Nodes: 19
  Default Address Pool: 10.0.0.0/8  
  SubnetSize: 24
  Data Path Port: 4789
  Orchestration:
   Task History Retention Limit: 5
  Raft:
   Snapshot Interval: 10000
   Number of Old Snapshots to Retain: 0
   Heartbeat Tick: 1
   Election Tick: 10
  Dispatcher:
   Heartbeat Period: 5 seconds
  CA Configuration:
   Expiry Duration: 3 months
   Force Rotate: 0
  Autolock Managers: false
  Root Rotation In Progress: false
  Node Address: 172.31.0.100
  Manager Addresses:
   172.31.0.100:2377
   172.31.0.101:2377
   172.31.0.151:2377
 Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 269548fa27e0089a8b8278fc4fc781d7f65a939b
 runc version: ff819c7e9184c13b7c2607fe6c30ae19403a7aff
 init version: de40ad0
 Security Options:
  apparmor
  seccomp
   Profile: default
 Kernel Version: 5.4.0-1035-aws
 Operating System: Ubuntu 20.04.1 LTS
 OSType: linux
 Architecture: x86_64
 CPUs: 4
 Total Memory: 30.91GiB
 Name: admin
 ID: EVER:PWKL:E3ER:PUS5:T4W7:TOMC:ZFF6:OXWG:KW7T:OM3B:XBJA:ASRB
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Username: doctorevidence
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  registry:5000
  127.0.0.0/8
 Live Restore Enabled: false

WARNING: No swap limit support

Additional environment details (AWS, VirtualBox, physical, etc.):

Not really relevant IMO.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions