Closed fwilhe closed 3 months ago
ping @Akendo (I think you mentioned this as an issue) @nkraetzschmar
we could read available memory from /proc/meminfo
and convert it for a check that we place for example here:
https://github.com/gardenlinux/builder/blob/11da87307abc64c4d548729cb5a00e8e277e7d42/builder/image.d/make_reproducible_ext4#L75
With regards to the threshold value for the warning message: @nkraetzschmar mentioned, ideally 4GB should suffice. Maybe a cleanup step is broken somewhere.
@fwilhe is this fixed by #89?
@fwilhe is this fixed by #89?
From a UX perspective I don't think so. I think it's good we set explicit limits and reduce memory usage where possible (thanks for that @nkraetzschmar), but if the build runs out of memory, the failure will still be non-obvious.
I don't know how easy we could implement a lower-bounds check for memory in the builder (might not be trivial or possible due to linux namespaces), but I'd prefer to keep this issue open until further investigation to decide if we can/want to improve this or not.
What would you like to be added:
Warn the user about probably too small memory capacity.
Why is this needed:
For everyone using the builder not on a native linux machine, one needs a virtual machine (or a remote host) to run linux containers via podman or docker. Both podman and docker have solutions for this that take care of setting up a vm on the user's behalf. The issue is that the default amount of memory they allocate is probably too small to build Garden Linux. To the user, this will make the build fail in non-obvious ways.
Questions: