-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Overlay size, as alternative to --storage-opt size=30G #11504
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
Comments
/assign |
IIUC Docker's --storage-opt should be working correctly with gVisor too. Are you experiencing a bug with that? Or is this a feature request to "limit disk space" akin to that option? Limiting disk space depends on the underlying filesystem driver. I think higher-level container runtimes like Docker are the right places to implement this feature. You can easily limit disk space on tmpfs BTW using the |
@ayushr2 Hi, thanks. The use case would be with Docker + containerd ( https://docs.docker.com/desktop/features/containerd/ ). I have tried a |
Is it only not working with gVisor? Or is this not working without gVisor as well?
I believe so... the component configuring the host container filesystem has to set disk limits using filesystem driver specific primitives. |
Can I work on this issue!? |
I did a simple experiment. I opened this code: Lines 583 to 587 in f45c79e
And added
And overlay size limit magically started to work. So this task seems to be about propagating this parameter from AFAIU
Please confirm my understanding is correct, and I'll try to create a PR. |
@stepancheg could you clarify your use case? I assume you want to set a size limit on the container's rootfs. Are you using the default
|
Run untrusted code and make sure it does not break the outer machine by wasting all disk space. Also rely less on Linux kernel, which usually works, but sometimes creates unexpected problems under heavy load.
Yes.
Currently, yes.
We invoke
Currently we rely on runsc overlay, no outer linux kernel overlay. Technically we can reformat disks and use xfs or btrfs disk quota, or use tmpfs as you suggested, but:
This approach has two drawbacks:
|
OK, lets proceed with review on #11723. We need to figure out a way to plumb the size option via the gofer mount config in |
Uh oh!
There was an error while loading. Please reload this page.
Description
Would be superb to support limiting disk space similar to the Docker's
--storage-opt size=30G
Thanks
Is this feature related to a specific bug?
No response
Do you have a specific solution in mind?
No response
The text was updated successfully, but these errors were encountered: