-
Notifications
You must be signed in to change notification settings - Fork 169
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
Expose optional COSA_SUPERMIN_SIZE
to set rootfs image partition size
#3956
Conversation
…supermin. When 'supermin --build ...' generates the rootfs, kernel, and initrd, it's passed a size to use for the rootfs. That sets the upper bound on the ostree that can be added to the rootfs of the images cosa generates. It was hardcoded to 10G, which is a reasonable starting point, but different use conditions can easily exceed that. For now, follow the COSA_SUPERMIN_MEMORY example and expose an optional COSA_SUPERMIN_SIZE environment variable that allows a caller to override the rootfs size in case they need the rootfs to be bigger or smaller than the default 10G.
Hi @mtalexan. Thanks for your PR. I'm waiting for a coreos member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
As I was going thru some changes in this repo that weren't on my older fork, I found that this entire That said, unless the direct CLI is completely deprecated, I believe this is a trivial-enough change that it could be worth merging until the |
Hmm, I'm not quite sure about this change though. Are you not using the cache qcow2? All the heavy work should be happening there. |
I'm not sure what you mean by "the cache qcow2". From what I can tell, nothing outside As best I can tell from trying to reverse engineer the code and tools over the last few years, |
coreos-assembler/src/cmdlib.sh Lines 602 to 626 in 946d66f
We try not to store much inside the supermin VM root disk because it's ephemeral from run to run. The cache qcow2 gets created on demand and you can affect the size of it with |
I figured out what's going on now and how the cache applies, but it took a lot of digging. I originally encountered this back when I see now that So it appears my fix was only relevant to a historical bug that was fixed in a better way. |
When 'supermin --build ...' generates the rootfs, kernel, and initrd, it's passed a size to use for the rootfs. That sets the upper bound on the ostree that can be added to the rootfs of the images cosa generates. It was hardcoded to 10G, which is a reasonable starting point, but different use conditions can easily exceed that. For now, follow the COSA_SUPERMIN_MEMORY example and expose an optional COSA_SUPERMIN_SIZE environment variable that allows a caller to override the rootfs size in case they need the rootfs to be bigger or smaller than the default 10G.
/close #3955
There's already a
COSA_SUPERMIN_MEMORY
environment variable that's used to optionally configure how much RAM is allocated to thekola qemuexec
call when it generates the actual qcow2 disk image file from the supermin kernel, initrd, and rootfs.At some point in the future we could consider expanding the change here to either be specified via the
image.yaml
file, or (even better) calculate the size of the ostree we're going to put into the rootfs and use that to decide what size to make the rootfs.