moby: `docker pull` inside rootless LXC: failed to register layer: ApplyLayer exit status 1 stdout: stderr: unlinkat
Description
Proxmox lxc rootless container. I get:
failed to register layer: ApplyLayer exit status 1 stdout: stderr: unlinkat /tmp/v8-compile-cache-0/8.4.371.23-node.88: invalid argument
Other issues says that this uid/gid problem. I check image and seems there is no problems with uid/gid, but when rm -rf executing, that cause the problem I guess. Here is screenshot.
I also change uid/gid range of lxc for the sake of experiment - problem still there. So I think again uid is not the reason here.
User inside image is root (0/0). Right permission looks ok.
Rootfull container works well. No idea what is wrong in this case.
What happening here ? What should I look for ?
Reproduce
- docker pull teracy/angular-cli:14.0.6
Expected behavior
Pull image well
docker version
Client: Docker Engine - Community
Version: 23.0.1
API version: 1.42
Go version: go1.19.5
Git commit: a5ee5b1
Built: Thu Feb 9 19:46:54 2023
OS/Arch: linux/amd64
Context: default
Server: Docker Engine - Community
Engine:
Version: 23.0.1
API version: 1.42 (minimum version 1.12)
Go version: go1.19.5
Git commit: bc3805a
Built: Thu Feb 9 19:46:54 2023
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.6.18
GitCommit: 2456e983eb9e37e47538f59ea18f2043c9a73640
runc:
Version: 1.1.4
GitCommit: v1.1.4-0-g5fd4c4d
docker-init:
Version: 0.19.0
GitCommit: de40ad0
docker info
Client:
Context: default
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc.)
Version: v0.10.2
Path: /usr/libexec/docker/cli-plugins/docker-buildx
compose: Docker Compose (Docker Inc.)
Version: v2.16.0
Path: /usr/libexec/docker/cli-plugins/docker-compose
scan: Docker Scan (Docker Inc.)
Version: v0.23.0
Path: /usr/libexec/docker/cli-plugins/docker-scan
Server:
Containers: 5
Running: 0
Paused: 0
Stopped: 5
Images: 11
Server Version: 23.0.1
Storage Driver: overlay2
Backing Filesystem: zfs
Supports d_type: true
Using metacopy: false
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 runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 2456e983eb9e37e47538f59ea18f2043c9a73640
runc version: v1.1.4-0-g5fd4c4d
init version: de40ad0
Security Options:
seccomp
Profile: builtin
cgroupns
Kernel Version: 5.15.104-1-pve
Operating System: Debian GNU/Linux 11 (bullseye)
OSType: linux
Architecture: x86_64
CPUs: 8
Total Memory: 4GiB
Name: billing
ID: 9ead38ad-466b-4f31-82ea-c3dd4ae3f3cb
Docker Root Dir: /var/lib/docker
Debug Mode: false
Registry: https://index.docker.io/v1/
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
Additional Info
pve-manager/7.4-3/9002ab8a (running kernel: 5.15.104-1-pve)
About this issue
- Original URL
- State: open
- Created 3 years ago
- Reactions: 1
- Comments: 15 (4 by maintainers)
Has this regressed? I am still getting the error on Proxmox 8.1.4 with zfs-2.2.2-pve2
@qupfer be very cautious with posting things like
rm -rf /var/lib/docker! This wipes your complete docker installation - all containers, all (local) volumes. Depending on who executes this where a lot of work can be lost. If you do post such destructive commands please add a notice what it does and causes, not everyone knows where docker stores what.Yes, you’re on an incompatible version of ZFS that’s in the uncanny valley. Your kernel was built from
9beed8f7a598fce47040fb476c15309760491aaf, which includes ZoL at5ea8a38968ee2cc9e50b3a66819b5520f46eb660.This version of OpenZFS/ZoL self-reports as 2.1.9, which is missing
RENAME_WHITEOUTvfs support; you can test this with e.g.renameat2(2), which will returnEINVAL.We need a more functional test to detect these edge-case filesystems, as the current detection logic when combined with your kernel results in this uncanny valley situation.
This is going to be the issue – you’re on an old enough version of ZFS that some of the system calls we use don’t work in every scenario. Things might appear to work with root, but that should be an illusion; I need to find some time to download the Proxmox kernel sources and confirm the ZFS version, but it’s almost guaranteed to be < 2.2 (see https://github.com/openzfs/zfs/issues/8648 for more).
We should consider adding a more functional test than “can it mount overlay with multiple lowerdirs?” to prevent incorrectly picking overlay2; I suspect that previously in this situation we would have fallen all the way back to vfs unless you made fuse-overlayfs available.
I would suggest manually selecting one of those two storage drivers as overlay2 will not work here with a busted underlying filesystem.