-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
run --rootfs is broken, (at least) 2 different ways #14504
Comments
The described symptoms suggest a race condition. My queue is quite full today but maybe I find time. |
Oh, no hurry: if noone has noticed in more than a year, it's not that big a deal. (It's just blocking me from fixing #14456, but I can always just disable the |
Note that the difference in the image is likely the |
Add an Overlay :O mount to the --rootfs object.
|
The point of the test is to use --rootfs with an readonly rootfs and not overlay. |
I think we should check whether the --rootfs is read-only and carry that information along. If it's RO, then Podman shouldn't attempt to write on it. Probably worth emitting a warning and pointing to the overlay mount alternative. |
While this is getting resolved, may I just submit my PR with this test skipped? |
It's probably a good idea. Alternatively, we can use |
I do not know what the general fix for this is, other then to state that all of the mount points need to be precreated in the original image for --rootfs to work on a read-only file system. We could attempt to give a list of these locations, but I am not sure how complete it would be and difficult to maintain going forward. |
So should we detect a RO rootfs and error out? |
No, this clearly works as long as you have the correct paths that podman bind mounts already in the rootfs. There are options to turn off the bind mounts for /etc/{hosts,resolv.conf}. I do not know if there is a option for the /run mounts? Although I wonder why does podman tries to create /run/secrets when the container does not use any secrets. |
We could, but this use case might work if /dev, /run, /etc/hosts, /etc/resolv.conf exist in the image. |
/run/secrets is created for RHEL stuff as well. Not sure if it is always created. A container without read/write /run would fail is most cases as well. |
I think we should not support a read-only rootfs, many things can break. e.g. what to do if the rootfs is missing a |
I agree, lets just force people to use Overlay for this use case. |
A friendly reminder that this issue had no activity for 30 days. |
Since we agreed to force overlay for this use case I am going to close. |
Background: this system test
podman/test/system/030-run.bats
Lines 624 to 632 in 0c0d68e
History PR #9231, which claims to fix #9230
Problem: the test works with
quay.io/libpod/testimage:20210610
, but does not work with any other image that I can find. These are thetwothree failure modes:or
or
The error is not deterministic: a simple
!!
of the reproducer can fail in any of those three ways. (Usually the.containerenv
one, but not always).Reproducer:
Save as
test-mounting
, chmod it +x, and run it with:@vrothberg PTAL
The text was updated successfully, but these errors were encountered: