Skip to content
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

disable systemd-binfmt.service #3511

Merged
merged 1 commit into from
Feb 12, 2024

Conversation

BenTheElder
Copy link
Member

related to #3510

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Feb 8, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: BenTheElder

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Feb 8, 2024
@BenTheElder BenTheElder changed the title [WIP] disable systemed-binfmt.service [WIP] disable systemd-binfmt.service Feb 8, 2024
&& systemctl enable kubelet.service \
&& systemctl enable containerd.service \
&& systemctl enable undo-mount-hacks.service
&& systemctl enable undo-mount-hacks.service \
&& systemctl mask systemd-binfmt.service
Copy link
Contributor

Choose a reason for hiding this comment

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

it seems something happened with this in bookworm, a quick search on google show several hits microsoft/WSL#8843

AFAIK this reads from a folder, can we have any side effect of doing this hammer approach or should we try to be more precise and understand what is exactly breaking this?

Copy link
Contributor

Choose a reason for hiding this comment

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

oh, I see, it screws the list entirely #3510

Copy link
Contributor

Choose a reason for hiding this comment

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

I imagine then that the best way is to say the docker container must use the one existing in the host

/lgtm

Copy link
Member Author

Choose a reason for hiding this comment

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

so often binfmt_misc is intentionally set by containers (see e.g. our multi-arch build setup), but kind nodes shouldn't be doing it, and python scripts should keep using shebangs and not depend on this anyhow ...

Copy link
Contributor

Choose a reason for hiding this comment

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

Per https://systemd.io/CONTAINER_INTERFACE/ (execution environment number 2) /proc/sys being a read-only mount is the recommended way to tell systemd not to change things. However as that mentions also making /proc/sys/net writable may be desirable (and likely would be needed for many k8s workloads).

It likely needs more thought than will fit in a review comment, so this targeted workaround makes sense for now.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, the base image comments link to this page -- We have other similar workarounds for similar reasons, we're really stretching "systemd in a container" when we go --privileged but without it we can't get the "kubernetes 'in' a container" part. Previously in practice the key part was /sys mounted ro (mentioned further down as a trigger for udev) which we do.

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 9, 2024
@BenTheElder BenTheElder changed the title [WIP] disable systemd-binfmt.service disable systemd-binfmt.service Feb 12, 2024
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 12, 2024
@BenTheElder BenTheElder added this to the v0.22.0 milestone Feb 12, 2024
@k8s-ci-robot k8s-ci-robot merged commit 2ad380d into kubernetes-sigs:main Feb 12, 2024
19 checks passed
@BenTheElder BenTheElder deleted the binfmt2 branch February 13, 2024 00:30
@BenTheElder BenTheElder mentioned this pull request Feb 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants