Skip to content

Avoid recompressing already-compressed SOS archives#155

Merged
openshift-merge-bot[bot] merged 1 commit into
openstack-k8s-operators:mainfrom
fmount:compress
Jul 15, 2026
Merged

Avoid recompressing already-compressed SOS archives#155
openshift-merge-bot[bot] merged 1 commit into
openstack-k8s-operators:mainfrom
fmount:compress

Conversation

@fmount

@fmount fmount commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

When SOS_DECOMPRESS=0, SOS reports are kept as .tar.xz files.
The previous archiving step ran a single xz pass over everything, redundantly recompressing them with no size benefit and significant time cost.
This patch extracts the archiving logic into a compress() function that is the very last step of the gathering process. When SOS_DECOMPRESS=0 (and SOS data is present), it only compresses non-SOS data into an intermediate xz archive, then it bundles it with the SOS tarballs into a plain tar.
In addition, the default SOS_DECOMPRESS value is now 0 to better match this workflow and to save time: for large environments decompress a big amount of sos reports might take a lot of time and resources.

Jira: https://redhat.atlassian.net/browse/OSPRH-32765

@fmount
fmount requested review from abays and stuggi July 14, 2026 18:57
@openshift-ci
openshift-ci Bot requested review from danpawlik and rebtoor July 14, 2026 18:57
# This option is used for CI purposes and
# is enabled by default
export SOS_DECOMPRESS=${SOS_DECOMPRESS:-1}
export SOS_DECOMPRESS=${SOS_DECOMPRESS:-0}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For customers we do not decompress (it takes forever for large environments), but for CI we keep decompressing. openstack-k8s-operators/ci-framework#4054 keeps cifmw aligned w/ the existing behavior.

@stuggi stuggi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me, just the comment for the new default should be updated?

Comment thread collection-scripts/common.sh Outdated
When SOS_DECOMPRESS=0, SOS reports are kept as .tar.xz files. The previous
archiving step ran a single XZ pass over everything, redundantly recompressing
them with no size benefit and significant time cost. This patch extracts the
archiving logic into a compress() function that is the very last step of the
gathering process. When SOS_DECOMPRESS=0 (and SOS data is present), it only
compresses non-SOS data into an intermediate XZ archive, then it bundles it
with the SOS tarballs into a plain tar. Default SOS_DECOMPRESS to 0 to better
match this workflow and to save time: for large environments decompress a big
amount of sos reports might take a lot of time and resources.

Jira: https://redhat.atlassian.net/browse/OSPRH-32765

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Francesco Pantano <fpantano@redhat.com>
@stuggi

stuggi commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

/lgtm

@rebtoor

rebtoor commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

/approve

@openshift-ci

openshift-ci Bot commented Jul 15, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rebtoor

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot
openshift-merge-bot Bot merged commit 3267c85 into openstack-k8s-operators:main Jul 15, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants