-
Notifications
You must be signed in to change notification settings - Fork 168
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
Stop compressing applehv and hyperv by default #3982
Conversation
Requires: coreos/fedora-coreos-config#3293 (And also requires it to propagate to the other non-production branches. It'll propagate to the production ones via regular promotion.) |
I guess we also need to tweak the osbuild pipelines for |
elif compressor == 'gzip': | ||
runcmd(['gzip', f'-{gzip_level}', '-c', filepath], stdout=f) # pylint: disable=E0606 |
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.
noting here that this gzip-level is not the same as the one used previously from qemuvariants.py
.
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.
not sure if we care, just noting the change
but I think we'd need to forward port coreos/fedora-coreos-config#3293 so the next |
Apple Hypervisor doesn't inherently require images to be compressed with gzip. It's just that when we _do_ compress it, it's the most convenient format to use because gzip is guaranteed to be available on macOS. Similarly for Windows Hyper-V and ZIP. Notably, this is different from e.g. GCP, where the platform itself dictates a `tar.gz` file. And so for consistency we should have the output from the build step for `applehv` and `hyperv` just return the disk image in the format it's intended to be used in, and then `cosa compress` just compresses them using e.g. `gzip` or `zip`. This requires adding a new `platform-compressor` key in the `image.yaml` file to allow overridding the default `compressor` setting for certain platforms. This allows folks using the same code to build the disk images for those platforms and compress them with the compressor of their choice.
They will now be compressed in the `cosa compress` CoreOS pipeline stage.
3ca025b
to
158d8d7
Compare
ok - added the OSBuild bits here. |
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.
LGTM
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.
Not tested but LGTM. I vaguely remember the podman folks looking for zstd compression but maybe that does not matter here as they don't use those images directly?
Also, how much will be the impact on S3 storage if we only store uncompressed images? |
ah, my bad, I see in coreos/fedora-coreos-config#3293 that we are compressing with gzip |
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.
superficial lgtm as I did not test but that looks sane to me.
@travier yep. The podman folks will take the generated The changes here, along with coreos/fedora-coreos-config#3293 will yield no changes to the uploaded One minor change here is that the level of gzip compression for the applehv image will be |
In COSA we dropped the compression of hyperv and applehv in the OSBuild invocation [1] so we update here for that. In COSA upstream we also merged in patches for Live ISO building but that hasn't landed in RPMS yet so we surgically remove it here until those new stages land. [1] coreos/coreos-assembler#3982
In COSA we dropped the compression of hyperv and applehv in the OSBuild invocation [1] so we update here for that. In COSA upstream we also merged in patches for Live ISO building but that hasn't landed in RPMS yet so we surgically remove it here until those new stages land. [1] coreos/coreos-assembler#3982
Apple Hypervisor doesn't inherently require images to be compressed with gzip. It's just that when we do compress it, it's the most convenient format to use because gzip is guaranteed to be available on macOS.
Similarly for Windows Hyper-V and ZIP.
Notably, this is different from e.g. GCP, where the platform itself dictates a
tar.gz
file.And so for consistency we should have the output from the build step for
applehv
andhyperv
just return the disk image in the format it's intended to be used in, and thencosa compress
just compresses them using e.g.gzip
orzip
. This requires adding a newplatform-compressor
key in theimage.yaml
file to allow overridding the defaultcompressor
setting for certain platforms.This allows folks using the same code to build the disk images for those platforms and compress them with the compressor of their choice.