Skip to content

hack: fall back when cgroup remount setup is unavailable#6585

Merged
AkihiroSuda merged 1 commit into
moby:masterfrom
crazy-max:fix-entrypoint
Mar 18, 2026
Merged

hack: fall back when cgroup remount setup is unavailable#6585
AkihiroSuda merged 1 commit into
moby:masterfrom
crazy-max:fix-entrypoint

Conversation

@crazy-max
Copy link
Copy Markdown
Member

relates to:

    #1 [internal] booting buildkit
    #1 pulling image moby/buildkit:buildx-stable-1
    #1 pulling image moby/buildkit:buildx-stable-1 8.5s done
    #1 creating container buildx_buildkit_fervent_perlman0
    #1 29.74 creating cgroup namespace
    #1 creating container buildx_buildkit_fervent_perlman0 21.2s done
    #1 29.74 creating cgroup namespace
    #1 29.74 �������>umount: can't unmount /sys/fcreating cgroup namespace
    #1 29.74 umount: can't unmount /sys/fs/cgroup: Operation not permitted
    #1 29.74 umount: can't unmount /sysumount: can't unmount /sys/fs/cgroup: Operation not permitted
    #1 29.74 creating cgroup namespace
    #1 29.74 creating cgroup namespace
    #1 29.74 �������>umount: can't unmount /sys/fcreating cgroup namespace
    #1 29.74 umount: can't unmount /sys/fs/cgroup: Operation not permitted
    #1 29.74 umount: can't unmount /sysumount: can't unmount /sys/fs/cgroup: Operation not permitted
    #1 29.74

#6368 made the entrypoint automatically attempt the cgroup namespace remount workaround whenever the current cgroup path is not /. That works for the Kubernetes case, but it might break in other cases where unshare succeeds but the helper then fails to umount /sys/fs/cgroup with "Operation not permitted", which leaves the BuildKit container restarting during bootstrap in Buildx.

cc @marxarelli

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
@crazy-max crazy-max added this to the v0.28.1 milestone Mar 16, 2026
@github-actions github-actions Bot added the area/hack building buildkit itself label Mar 16, 2026
Copy link
Copy Markdown

@ctalledo ctalledo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM ...

@AkihiroSuda AkihiroSuda merged commit eaa4de0 into moby:master Mar 18, 2026
222 of 224 checks passed
@crazy-max crazy-max deleted the fix-entrypoint branch March 18, 2026 07:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/hack building buildkit itself

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants