containerd buildd should refuse to start w/o snapshotter loaded
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 10.3k
- Forks
- 1.5k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 50
Description
I just tried buildkit for the first time and it didn't work in the end. I suspect the issue is that I am using xfs without d_type support and therefore overlayfs snapshotter cannot be loaded.
The error message:
buildd: failed to solve: rpc error: code = Unknown desc = failed to stat snapshot: snapshotter not loaded: overlayfs: invalid argument
Since the standalone buildd refuses to start in such conditions, maybe containerd buildd should fail as well.
Logs:
containerd:
INFO[0000] loading plugin "io.containerd.snapshotter.v1.overlayfs"... module=containerd type=io.containerd.snapshotter.v1
WARN[0000] failed to load plugin io.containerd.snapshotter.v1.overlayfs error="/var/lib/containerd/io.containerd.snapshotter.v1.overlayfs does not support d_type. If the backing filesystem is xfs, please reformat with ftype=1 to enable d_type support." module=containerd
WARN[0000] could not use snapshotter overlayfs in metadata plugin error="/var/lib/containerd/io.containerd.snapshotter.v1.overlayfs does not support d_type. If the backing filesystem is xfs, please reformat with ftype=1 to enable d_type support." module="containerd/io.containerd.metadata.v1.bolt"
...
ERRO[0340] (*Service).Write failed error="rpc error: code = Canceled desc = context canceled" expected=sha256:14d77d279c36d2e0b651b83cd95a8639ed1cf40c63778342c99920166c7d303b ref="layer-sha256:14d77d279c36d2e0b651b83cd95a8639ed1cf40c63778342c99920166c7d303b" total=75629087
ERRO[0340] (*Service).Write failed error="rpc error: code = Canceled desc = context canceled" expected=sha256:019300c8a437a2d60248f27c206795930626dfe7ddc0323d734143bd5eb131a6 ref="layer-sha256:019300c8a437a2d60248f27c206795930626dfe7ddc0323d734143bd5eb131a6" total=1970271
buildd:
ERRO[0294] /moby.buildkit.v1.Control/Solve returned error: invalid argument
github.com/moby/buildkit/vendor/github.com/containerd/containerd/errdefs.init
/home/tt/dev/go/src/github.com/moby/buildkit/vendor/github.com/containerd/containerd/errdefs/errors.go:24
github.com/moby/buildkit/vendor/github.com/containerd/containerd/content.init
<autogenerated>:1
github.com/moby/buildkit/client/llb.init
<autogenerated>:1
github.com/moby/buildkit/client.init
<autogenerated>:1
github.com/moby/buildkit/cache.init
<autogenerated>:1
github.com/moby/buildkit/control.init
<autogenerated>:1
main.init
<autogenerated>:1
runtime.main
/usr/lib/golang/src/runtime/proc.go:173
runtime.goexit
/usr/lib/golang/src/runtime/asm_amd64.s:2337
snapshotter not loaded: overlayfs
github.com/moby/buildkit/vendor/github.com/containerd/containerd/errdefs.FromGRPC
/home/tt/dev/go/src/github.com/moby/buildkit/vendor/github.com/containerd/containerd/errdefs/grpc.go:82
github.com/moby/buildkit/vendor/github.com/containerd/containerd/services/snapshot.(*remoteSnapshotter).Stat
/home/tt/dev/go/src/github.com/moby/buildkit/vendor/github.com/containerd/containerd/services/snapshot/client.go:36
github.com/moby/buildkit/snapshot/blobmapping.(*Snapshotter).Stat
<autogenerated>:1
github.com/moby/buildkit/vendor/github.com/containerd/containerd/rootfs.ApplyLayer
/home/tt/dev/go/src/github.com/moby/buildkit/vendor/github.com/containerd/containerd/rootfs/apply.go:61
github.com/moby/buildkit/vendor/github.com/containerd/containerd/rootfs.ApplyLayers
/home/tt/dev/go/src/github.com/moby/buildkit/vendor/github.com/containerd/containerd/rootfs/apply.go:41
github.com/moby/buildkit/source/containerimage.(*imageSource).unpack
/home/tt/dev/go/src/github.com/moby/buildkit/source/containerimage/pull.go:197
github.com/moby/buildkit/source/containerimage.(*puller).Snapshot
/home/tt/dev/go/src/github.com/moby/buildkit/source/containerimage/pull.go:182
github.com/moby/buildkit/solver.(*sourceOp).Run
/home/tt/dev/go/src/github.com/moby/buildkit/solver/source.go:93
github.com/moby/buildkit/solver.(*vertexSolver).run
/home/tt/dev/go/src/github.com/moby/buildkit/solver/solver.go:632
github.com/moby/buildkit/solver.(*vertexSolver).(github.com/moby/buildkit/solver.run)-fm
/home/tt/dev/go/src/github.com/moby/buildkit/solver/solver.go:452
github.com/moby/buildkit/util/bgfunc.(*F).run.func1
/home/tt/dev/go/src/github.com/moby/buildkit/util/bgfunc/bgfunc.go:66
runtime.goexit
/usr/lib/golang/src/runtime/asm_amd64.s:2337
failed to stat snapshot
github.com/moby/buildkit/vendor/github.com/containerd/containerd/rootfs.ApplyLayer
/home/tt/dev/go/src/github.com/moby/buildkit/vendor/github.com/containerd/containerd/rootfs/apply.go:66
github.com/moby/buildkit/vendor/github.com/containerd/containerd/rootfs.ApplyLayers
/home/tt/dev/go/src/github.com/moby/buildkit/vendor/github.com/containerd/containerd/rootfs/apply.go:41
github.com/moby/buildkit/source/containerimage.(*imageSource).unpack
/home/tt/dev/go/src/github.com/moby/buildkit/source/containerimage/pull.go:197
github.com/moby/buildkit/source/containerimage.(*puller).Snapshot
/home/tt/dev/go/src/github.com/moby/buildkit/source/containerimage/pull.go:182
github.com/moby/buildkit/solver.(*sourceOp).Run
/home/tt/dev/go/src/github.com/moby/buildkit/solver/source.go:93
github.com/moby/buildkit/solver.(*vertexSolver).run
/home/tt/dev/go/src/github.com/moby/buildkit/solver/solver.go:632
github.com/moby/buildkit/solver.(*vertexSolver).(github.com/moby/buildkit/solver.run)-fm
/home/tt/dev/go/src/github.com/moby/buildkit/solver/solver.go:452
github.com/moby/buildkit/util/bgfunc.(*F).run.func1
/home/tt/dev/go/src/github.com/moby/buildkit/util/bgfunc/bgfunc.go:66
runtime.goexit
/usr/lib/golang/src/runtime/asm_amd64.s:2337
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The report points to the vendored containerd snapshot services and the failure path in source/containerimage/pull.go. Read the containerd snapshotter plugin-loading and containerd buildd startup paths first, then compare them with standalone buildd behavior. Done means buildd refuses to start when its required snapshotter cannot load, rather than failing later during Solve.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100