-
Notifications
You must be signed in to change notification settings - Fork 18.9k
Description
Description
I'm running the docker engine in rootless mode in parallel with another rootfull engine.
When calling docker volume ls, the rootless daemon returns an error message that it failed to read the rootfull daemon's plugins folder.
TL;DR: It seems the rootless daemon's plugin discovery is using the wrong path.
Steps to reproduce the issue:
- Install rootfull docker (see here)
- Install rootless docker (see here)
- Rootless cli:
docker volume create test - Rootless cli:
docker volume ls - See daemon response:
Error response from daemon: list: error listing plugins: legacy plugin: error reading dir entries: open /etc/docker/plugins: permission denied
Describe the results you received:
Error response from daemon, that it failed to read the protected rootfull daemon's plugin folder at /etc/docker/plugins.
Describe the results you expected:
List of volumes (that contains one item named "test").
I would expect that the plugins in the rootless docker directory ("Docker Root Dir") at /home/rootless/.local/share/docker/plugins are used.
Additional information you deem important (e.g. issue happens only occasionally):
The hard-coded paths are used in rootless mode.
Shouldn't the plugin path be selected by the mode (rootfull or rootless)?
Or shouldn't the plugin path depend on the docker root directory?
Location in code:
moby/pkg/plugins/discovery_unix.go
Line 6 in 94e00d0
| var specsPaths = []string{"/etc/docker/plugins", "/usr/lib/docker/plugins"} |
Line 33 in 94e00d0
| return nil, errors.Wrap(err, "error reading dir entries") |
Output of docker version:
$ docker version
Client:
Version: 20.10.12
API version: 1.41
Go version: go1.16.12
Git commit: e91ed57
Built: Mon Dec 13 11:40:57 2021
OS/Arch: linux/amd64
Context: default
Experimental: true
Server: Docker Engine - Community
Engine:
Version: 20.10.12
API version: 1.41 (minimum version 1.12)
Go version: go1.16.12
Git commit: 459d0df
Built: Mon Dec 13 11:46:12 2021
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: v1.4.12
GitCommit: 7b11cfaabd73bb80907dd23182b9347b4245eb5d
runc:
Version: 1.0.2
GitCommit: v1.0.2-0-g52b36a2d
docker-init:
Version: 0.19.0
GitCommit: de40ad0
Output of docker info:
$ docker info
Client:
Context: default
Debug Mode: false
Plugins:
app: Docker App (Docker Inc., v0.9.1-beta3)
buildx: Docker Buildx (Docker Inc., v0.7.1-docker)
compose: Docker Compose (Docker Inc., v2.0.1)
Server:
Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 0
Server Version: 20.10.12
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: false
userxattr: true
Logging Driver: json-file
Cgroup Driver: systemd
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 io.containerd.runtime.v1.linux runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 7b11cfaabd73bb80907dd23182b9347b4245eb5d
runc version: v1.0.2-0-g52b36a2d
init version: de40ad0
Security Options:
seccomp
Profile: default
rootless
cgroupns
Kernel Version: 5.13.0-22-generic
Operating System: Ubuntu 21.10
OSType: linux
Architecture: x86_64
CPUs: 3
Total Memory: 3.74GiB
Name: ubuntu-8gb-nbg1-dc3-1
ID: ****
Docker Root Dir: /home/rootless/.local/share/docker
Debug Mode: false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
Product License: Community Engine
WARNING: No cpu cfs quota support
WARNING: No cpu cfs period support
WARNING: No cpu shares support
WARNING: No cpuset support
WARNING: No io.weight support
WARNING: No io.weight (per device) support
WARNING: No io.max (rbps) support
WARNING: No io.max (wbps) support
WARNING: No io.max (riops) support
WARNING: No io.max (wiops) support
Additional environment details (AWS, VirtualBox, physical, etc.):
Hosted Ubuntu on a VM machine.