Skip to content

buildkit rootless 0.17.0 with fuse-overlayfs giving setxattr user.overlay.impure operation not permitted errors #5478

Open
@chadlwilson

Description

@chadlwilson

When building via buildx our builds starting giving errors like the below after an implicit upgrade to use the moby/buildkit:v0.17.0-rootless image (previously v0.16.0-rootless).

#9 ERROR: mount callback failed on /run/user/1000/containerd-mount2444245211: failed to setxattr "/run/user/1000/containerd-mount2444245211/etc" for key "user.overlay.impure": operation not permitted

Environment is

Host OS: Linux 5.10.219-208.866.amzn2.x86_64 amd64 (Amazon Linux 2)
Host Docker: 20.10.27 (yeah, I know it's EOL - long story)
DIND image OS: Centos Stream 9 (if it matters)
DIND image Docker: 27.3.1
DIND image Docker buildx plugin: 0.17.1

Fuller log

$ docker buildx version
github.com/docker/buildx v0.17.1 257815a
$ docker buildx create --use --name gocd-builder --driver-opt image=moby/buildkit:rootless
#1 [internal] booting buildkit
Initializing docker buildx builder [gocd-builder]...
#1 pulling image moby/buildkit:rootless
gocd-builder
#1 pulling image moby/buildkit:rootless 3.7s done
#1 creating container buildx_buildkit_gocd-builder0
Name:          gocd-builder
#1 creating container buildx_buildkit_gocd-builder0 0.5s done
Driver:        docker-container
Last Activity: 2024-11-01 02:57:53 +0000 UTC
#1 DONE 4.2s

Nodes:
Name:                  gocd-builder0
Endpoint:              unix:///var/run/docker.sock
Driver Options:        image="moby/buildkit:rootless"
Status:                running
BuildKit daemon flags: --allow-insecure-entitlement=network.host
BuildKit version:      v0.17.0
Platforms:             linux/amd64, linux/amd64/v2, linux/amd64/v3, linux/amd64/v4, linux/386
Labels:
 org.mobyproject.buildkit.worker.executor:         oci
 org.mobyproject.buildkit.worker.hostname:         bff47ac416df
 org.mobyproject.buildkit.worker.network:          host
 org.mobyproject.buildkit.worker.oci.process-mode: sandbox
 org.mobyproject.buildkit.worker.selinux.enabled:  false
 org.mobyproject.buildkit.worker.snapshotter:      fuse-overlayfs
GC Policy rule#0:
 All:           false
 Filters:       type==source.local,type==exec.cachemount,type==source.git.checkout
 Keep Duration: 48h0m0s
GC Policy rule#1:
 All:           false
 Keep Duration: 1440h0m0s
 Keep Bytes:    4.657GiB
GC Policy rule#2:
 All:        false
 Keep Bytes: 4.657GiB
GC Policy rule#3:
 All:        true
 Keep Bytes: 4.657GiB


> Task :docker:gocd-server:wolfi-latest:docker

Building wolfi image for [x64, aarch64]. (Current build architecture is x64).

$ docker buildx build --pull --platform linux/amd64,linux/arm64 --output type=oci,dest=wolfi-latest.tar . --tag wolfi-latest

#0 building with "gocd-builder" instance using docker-container driver
#1 [internal] load build definition from Dockerfile
#1 transferring dockerfile: 4.03kB done
#1 DONE 0.0s

#2 [linux/arm64 internal] load metadata for docker.io/curlimages/curl:latest
#2 ...

#3 [linux/amd64 internal] load metadata for docker.io/curlimages/curl:latest
#3 DONE 2.0s

#2 [linux/arm64 internal] load metadata for docker.io/curlimages/curl:latest
#2 DONE 2.0s

#4 [linux/arm64 internal] load metadata for cgr.dev/chainguard/wolfi-base:latest
#4 DONE 2.1s

#5 [linux/amd64 internal] load metadata for cgr.dev/chainguard/wolfi-base:latest
#5 ...

#6 [internal] load .dockerignore
#6 transferring context: 2B done
#6 DONE 0.0s

#5 [linux/amd64 internal] load metadata for cgr.dev/chainguard/wolfi-base:latest
#5 DONE 3.3s

#7 [linux/amd64 gocd-server-unzip 1/3] FROM docker.io/curlimages/curl:latest@sha256:d9b4541e214bcd85196d6e92e2753ac6d0ea699f0af5741f8c6cccbfcf00ef4b
#7 resolve docker.io/curlimages/curl:latest@sha256:d9b4541e214bcd85196d6e92e2753ac6d0ea699f0af5741f8c6cccbfcf00ef4b done
#7 sha256:4ca545ee6d5db5c1170386eeb39b2ffe3bd46e5d4a73a9acbebc805f19607eb3 42B / 42B 0.1s done
#7 sha256:b68d62cb323c5e6dbfa1dc8c990a0d1dba4690da661d8eae9af00943074770c0 5.79MB / 5.79MB 0.2s done
#7 sha256:43c4264eed91be63b206e17d93e75256a6097070ce643c5e8f0379998b44f170 0B / 3.62MB 0.2s
#7 sha256:43c4264eed91be63b206e17d93e75256a6097070ce643c5e8f0379998b44f170 3.62MB / 3.62MB 0.3s done
#7 extracting sha256:43c4264eed91be63b206e17d93e75256a6097070ce643c5e8f0379998b44f170 0.0s done
#7 DONE 0.4s

#8 [linux/arm64 gocd-server-unzip 1/3] FROM docker.io/curlimages/curl:latest@sha256:d9b4541e214bcd85196d6e92e2753ac6d0ea699f0af5741f8c6cccbfcf00ef4b
#8 resolve docker.io/curlimages/curl:latest@sha256:d9b4541e214bcd85196d6e92e2753ac6d0ea699f0af5741f8c6cccbfcf00ef4b done
#8 sha256:cf04c63912e16506c4413937c7f4579018e4bb25c272d989789cfba77b12f951 4.09MB / 4.09MB 0.2s done
#8 extracting sha256:cf04c63912e16506c4413937c7f4579018e4bb25c272d989789cfba77b12f951 0.1s done
#8 sha256:dfaa665a104a4eec724084693d3e01fde629574b283665180614c60be0365fd1 5.83MB / 5.83MB 0.2s done
#8 extracting sha256:dfaa665a104a4eec724084693d3e01fde629574b283665180614c60be0365fd1 done

#8 DONE 0.4s
> Task :docker:gocd-server:wolfi-latest:docker FAILED

#9 [linux/arm64 gocd-server-unzip 2/3] COPY go-server-24.4.0-19650.zip /tmp/go-server-24.4.0-19650.zip
#9 ERROR: mount callback failed on /run/user/1000/containerd-mount2444245211: failed to setxattr "/run/user/1000/containerd-mount2444245211/etc" for key "user.overlay.impure": operation not permitted


...

Dockerfile:24
--------------------
  22 |     ARG TARGETARCH
  23 |     ARG UID=1000
  24 | >>> COPY go-server-24.4.0-19650.zip /tmp/go-server-24.4.0-19650.zip
  25 |     RUN \
  26 |         unzip -q /tmp/go-server-24.4.0-19650.zip -d / && \
--------------------
ERROR: failed to solve: failed to compute cache key: mount callback failed on /run/user/1000/containerd-mount2444245211: failed to setxattr "/run/user/1000/containerd-mount2444245211/etc" for key "user.overlay.impure": operation not permitted

If this is related to the outdated host Docker version and this expected on this configuration, feel free to close/ignore and let me know.

Perhaps related to moby/moby#47605 and/or moby/moby#43626 and use of native overlay?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions