From f340ae3100cae1135c5b399ee6af239b333af468 Mon Sep 17 00:00:00 2001 From: Kaifeng Wang Date: Mon, 3 Feb 2025 16:16:02 +0800 Subject: [PATCH] Change to maximum compression level when using lzma The deploy image is getting larger and larger, by specifying a higher compression level, usualy we can save a couple of MB. Smaller image has higher performance when deploying nodes with PXE. This patch changes the default compression level to 9 to have the minimum image size. Change-Id: Id20292e73796b2c0d72a4d3f5279e02fc3a2757a --- ironic_python_agent_builder/__init__.py | 2 +- .../notes/lzma-compression-level-1ca346ba8d5b905a.yaml | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/lzma-compression-level-1ca346ba8d5b905a.yaml diff --git a/ironic_python_agent_builder/__init__.py b/ironic_python_agent_builder/__init__.py index 615f207..31a216c 100644 --- a/ironic_python_agent_builder/__init__.py +++ b/ironic_python_agent_builder/__init__.py @@ -80,7 +80,7 @@ def main(): os.environ['DIB_REPOREF_requirements'] = args.branch if args.lzma: os.environ['DIB_IPA_COMPRESS_CMD'] = \ - 'xz --format=lzma --compress --stdout' + 'xz --format=lzma --compress --stdout -9' # Enable checksum generation by default if 'DIB_CHECKSUM' not in os.environ: os.environ['DIB_CHECKSUM'] = 'sha256' diff --git a/releasenotes/notes/lzma-compression-level-1ca346ba8d5b905a.yaml b/releasenotes/notes/lzma-compression-level-1ca346ba8d5b905a.yaml new file mode 100644 index 0000000..8361e03 --- /dev/null +++ b/releasenotes/notes/lzma-compression-level-1ca346ba8d5b905a.yaml @@ -0,0 +1,4 @@ +--- +features: + - | + Changes lzma compression level to 9 for smaller images.