-
Notifications
You must be signed in to change notification settings - Fork 95
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
docker: Fix userdata bind mount path inside the container #2222
docker: Fix userdata bind mount path inside the container #2222
Conversation
I'm not sure if there is a better way to solve the issue. Open for suggestion |
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.
it's probably better to change the default mount path for the ci disk rather than adding an exception for docker, no? it doesn't need to be in /run I think, it can be in /mnt or wherever
Yeah, having a uniform one is better. I was not sure if there is a hard dependency on |
One challenge is how to make /media mountpath available early in the boot cycle since root (/) is RO. Only the following are available via systemd - https://freedesktop.org/wiki/Software/systemd/APIFileSystems/ |
467f0a3
to
34f2851
Compare
Used |
The CI failures may be fixed via #2226 |
Hi @bpradipt ! I finally managed to test this fix. It seems to fix the original problem: However, I'm still unable to get a pod running. The problem that I'm seeing is related with image pull on guest:
Above is a snippet of e2e test. I got a similar error when launching another pod from a different container image manually. |
@wainersm you are hitting the known nydus-snapshotter issue. Workaround is documented here - https://github.com/confidential-containers/cloud-api-adaptor/blob/main/src/cloud-api-adaptor/docs/troubleshooting/nydus-snapshotter.md#pod-creation-fails-with-error-unpacking-image |
Interesting that I almost never hit that problem when running in a fresh environment like the one setup by the e2e testing provisioner. Let's see how it goes on CI... Anyway, with the workaround above I could launch a simple pod \o/ |
I found in https://systemd.io/TEMPORARY_DIRECTORIES/ that use of |
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.
I tested it locally and it worked out. It seems that we safe with using /var/tmp (keep in min I'm not an expert on the topic).
This issue is pretty consistent with docker provider. With other providers it's occasional.
|
ef78fc0
to
bfd2a8b
Compare
Seems ok. But would be good to hear comment from @mkulke .. |
I mean generally the path sounds a bit odd, why var? why tmp? Can't we create a /media/cidata path statically on the rootfs at image-build time? |
Yeah, that's a possibility as well. I wanted to avoid changing the rootfs partition if there was an alternative. And it turned out systemd already creates those in tmpfs. Let me know what you prefer? |
personally, I'd prefer a |
@mkulke I added a new test commit, can you please check and let me know if the approach looks fine? |
src/cloud-api-adaptor/podvm-mkosi/mkosi.presets/system/mkosi.repart/30-media.conf
Outdated
Show resolved
Hide resolved
...dvm-mkosi/mkosi.skeleton/usr/lib/systemd/system/process-user-data.service.d/10-override.conf
Outdated
Show resolved
Hide resolved
b9f118d
to
31b8228
Compare
This commit changes the path of the userdata file to /media/cidata from `/run/media/cidata` to fix an issue with the docker provider. For docker provider we use systemd container which mounts /run as a tmpfs volume. This mounting of /run happens after docker has bind mounted the userdata file inside the container and consequently the userdata file is no longer accessible. The podvm rootfs has a precreated /media/cidata folder to mount the config-drive with userdata. Signed-off-by: Pradipta Banerjee <pradipta.banerjee@gmail.com>
31b8228
to
3370381
Compare
For docker provider we use systemd container which mounts /run as a tmpfs volume.
This mounting of /run happens after docker has bind mounted the userdata file inside the container and consequently the userdata file is no longer accessible.
This commit changes the path of the userdata file to not use
/run
for the docker provider.