-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Support making /sys read-write #1474
Comments
We had issues with systemd trying to do things it shouldn't when specifically this part:
This is desirable. Not having this caused issues with docker for mac / xhyve and I imagine could cause more issues. systemd/systemd#9740 Surely a priv container could remount it as rw later anyhow? |
udev itself could be just disabled? |
Sure, but systemd broadly relies on checking for ro
|
Kubernetes will also try to configure conntrack if sys is writeable, not sure what else. Maybe with aind a custom config could be used with I'm still a bit hesitant about how many footguns I expect this to open, but having the option to do it seems somewhat reasonable.. |
Would definitely like the option for it to be read/write. udev doesn't start properly unless sys is writable. And if udev doesn't start then OpenEBS is not usable on kind. |
udev is not supposed to start inside kind, this can break things.
…On Fri, May 22, 2020, 19:34 Harana ***@***.***> wrote:
Would definitely like the option for it to be read/write.
udev doesn't start properly unless sys is writable. And if udev doesn't
start then OpenEBS is not usable on kind.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1474 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAHADK4UKXHBZEUWCD2KRKTRS4Y2BANCNFSM4MHMM2SA>
.
|
Er and see above: per systemd udev should not run in containers |
We've shipped explicitly disabling udev which is not supported to be run inside containers (and really shouldn't be running trying to setup the host devices!), but we do not yet provide an option for making sys rw. Currently the available approach is to use a daemonset or exec to the docker nodes and make it rw yourself after startup. |
I read through https://systemd.io/CONTAINER_INTERFACE/ again today for a different reason, it currently states:
(emphasis mine) It's left vague as to what these other clients do based on this state, but it seems clear that this expectation is not scoped only to udev |
Further down it also states:
Perhaps there are specific subdirectories desired to be writable for specific use-cases? |
Hi, I tried adding specific subdirectories but seems not work. Here's what I did:
But on the csi driver I still get an error:
And indeed if I try it on the kind-worker I get similar error:
Am I doing something wrong? Strange that mount if rw but still seems we can't write to it.. |
The above comment is asking if we have use cases for specific subdirectories, not suggesting that mounting them with extra mounts would work. We set have to set /sys to ro during the entrypoint before we start systemd, we can't tell docker to mount it as ro for a privileged container. |
Ah sorry @BenTheElder I misunderstood.. |
It should be preferable to test the driver against a fake e.g. using a loopback device because the test environment may not even have nvme anyhow? We make zero guarantees about what the kind nodes contain except that they can run a given kubernetes version, we've switched distros and other details before, BUT, you could remount these paths rw yourself after startup e.g. with |
In our specific case it's the csi-driver which is exposing an nvme-tcp device on the host where it is running.
We ensure our systems have the required kernel modules, etc possibly even running kind inside a thin headless vm, making it light and simple to run k8s-specific tests..
Ah yes this might work, I'll try it tomorrow. |
kubeadm in the VM may be more appropriate for this use-case, FWIW. |
Yeah we have that, just looking to kind as a simpler lighter approach to have a multi-node cluster. Changing /sys to rw by simply docker exec does the trick, thank you kindly :) |
This is kind of a deep implementation detail and it's highly not recommended to be controlling the actual host from the kind node. Having /sys not be rw is a requirement from systemd to run in a container for this reason. Glad the workaround solves your use case though! |
What would you like to be added:
kind/images/base/files/usr/local/bin/entrypoint
Lines 36 to 41 in c68a1cf
kind makes
/sys
on thekind-control-plane
intentionally read-only.This should be optionally configurable to read-write.
The code comment cites https://www.freedesktop.org/wiki/Software/systemd/ContainerInterface/ as the reason for making
/sys
read-only, but it should not always apply to privileged containers.Why is this needed:
Anbox requires writable
/sys
: aind-containers/aind#21The text was updated successfully, but these errors were encountered: