-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[potential regression in v0.12] unable to start container on /sys/fs/cgroup/* mount #4108
Comments
Please provide a complete reproducer and the host info |
Distro: No special kernel flags regarding cgroups. What additional information should I gather to help on reproduction? The steps are pretty simple, create a builder with After that, just do
I don't know any additional configurations we do other than we are forced to use cgroups v1, due to dependency requirements. |
Looks similar to docker/buildx#1986 (comment) |
faced this just now. I am using the latest tag with remote driver configured on docker.. Got this error:
For ref, the Dockerfile:
Pod spec (trimmed down), securityContext is privileged.
|
@AkihiroSuda can the referred change be reverted? |
Probably. |
As I mentioned, probably this #4003 |
Maybe it should be just disabled for cgroup v1 hosts or something? Can anybody provide a minimal Vagrantfile or Lima yaml to repro the issue? |
I've reverted back to old buildkit tag for now.
|
Buildkit 0.12.0 has issues with OpenRC + hybrid cgroups; see moby/buildkit#4108 Signed-off-by: Mark Yen <mark.yen@suse.com>
I don't have a Lima YAML, but I have a shell script that runs lima (using the alpine template and downloading nerdctl-full-1.5.0 because that has all the things including buildkitd v0.12), if that helps? (For GitHub reasons, it's attached as a |
@AkihiroSuda xref kubernetes-sigs/kind#3277, I haven't had a chance to get into this far yet but it seems on alpine hosts (openrc?) enabling cgroupns=private causes similar issues for KIND. Rancher Desktop is switching to cgroupsv2, which gets past runc failing but then the cgroups are seemingly not writeable within the container in the kind case. AIUI they think the buildkit issues are resolved by v2 however. I think the root cause is related and the key thing to reproduce is to use an alpine VM, colima has this issue for example. On my backlog to investigate further, but v1+cgroupns=private+runc seems to be totally broken on alpine/openrc. And v2 is at least broken for KIND. |
Here's a Lima yaml that reproduces (based on Ubuntu 20.04): Lima yaml for reproducing; uses system containerdimages:
- location: "https://cloud-images.ubuntu.com/releases/20.04/release-20230922/ubuntu-20.04-server-cloudimg-amd64.img"
arch: "x86_64"
digest: "sha256:8ff74b99d636158fa10a0daf21c78c70227a13779013ac457050d86803540d61"
- location: "https://cloud-images.ubuntu.com/releases/20.04/release-20230922/ubuntu-20.04-server-cloudimg-arm64.img"
arch: "aarch64"
digest: "sha256:9f4caa044824483baef2aeb7b239d07986a2a16f0dcc865de0d9e60deacf3843"
containerd:
system: true
user: false
provision:
- mode: boot
script: |
if ! [ -d /sys/fs/cgroup/pikachu ]; then
mount -o remount,rw /sys/fs/cgroup
mkdir /sys/fs/cgroup/pikachu
mount -n -t cgroup -o none,nodev,noexec,nosuid,name=pikachu pikachu /sys/fs/cgroup/pikachu
mount -o remount,ro /sys/fs/cgroup
fi
- mode: user
script: |
mkdir -p /tmp/a
echo FROM alpine > /tmp/a/Dockerfile
echo RUN true >> /tmp/a/Dockerfile
sudo nerdctl build /tmp/a
I do expect that this would be fixed if it's disabled for cgroups v1. As a side note: |
Fixes moby#4108 Signed-off-by: Mark Yen <mark.yen@suse.com>
For those that need to downgrade until #4308 is merged and shipped, the command you're looking for is the following: docker buildx create --use --driver-opt image=moby/buildkit:v0.11.6 |
Fixes moby#4108 Signed-off-by: Mark Yen <mark.yen@suse.com>
With the latest stable moby/builkit image buildx-stable-1, I get the following when trying to run a
docker buildx build
with my buildkit builder:Reverting to
v0.11.6
works fine, suspecting this being the trigger of such failure #4003 .The text was updated successfully, but these errors were encountered: