-
Notifications
You must be signed in to change notification settings - Fork 101
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
Stop if /dev is not a bind mount with loopback #431
Conversation
What's here now is the "quick and dirty" fix. If this is sufficient for the time being, I'd say it's good-to-go. I'm currently looking at cleaning up some of the mount code (there are lots of places that it's done now). Some deduplication is in order. |
Moved around a little bit. I've added it as an additional commit. Will collapse before merging. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this, our saga of filesystem mounts will probably continue for a while 😄
I got trigger-happy with pushing. I still need to address the idempotency part. |
Per discussion I think simplest may be:
Other two paths are:
|
Agreed. Let's start with the error out and suggestion of -v /dev:/dev. |
Comparing the mounts I think can be done via https://docs.rs/rustix/latest/rustix/fs/fn.statx.html |
So, this code works as expected, however for some reason once |
It works on a centos VM, but not on a fedora host directly. That's the only diff I have so far. |
At container start, /dev is snapshotted, so any new device files don't get added unless /dev is bindmounted in. For now, check that /dev is the same as the host's /dev via fsid. If they differ, it means that /dev is not bindmounted. Fixes containers#352 Signed-off-by: Brad P. Crochet <brad@redhat.com>
At container start, /dev is snapshotted, so any new device files
don't get added unless /dev is bindmounted in. For now, check that
/dev is the same as the host's /dev via fsid. If they differ, it
means that /dev is not bindmounted.
Fixes #352