-
Notifications
You must be signed in to change notification settings - Fork 2.3k
OCPBUGS-87841: ci-operator/step-registry/ipi/install/install: Unpack log-bundle archives #80479
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
Open
wking
wants to merge
1
commit into
openshift:main
Choose a base branch
from
wking:unpack-log-bundle-archive
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1
−1
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
🧩 Analysis chain
🏁 Script executed:
Repository: openshift/release
Length of output: 140
🏁 Script executed:
Repository: openshift/release
Length of output: 477
🏁 Script executed:
Repository: openshift/release
Length of output: 344
🌐 Web query:
GNU tar: behavior when extracting with -f and multiple archive filenames on command line treated as members💡 Result:
In GNU tar, the -f (or --file) option is used to specify the archive file or device to operate on [1][2][3]. When you provide multiple -f options on the command line, GNU tar interprets them as successive volumes of a single multi-volume archive, not as multiple separate archives to extract simultaneously [1][4][5]. When extracting with -f, any arguments appearing on the command line that are not options (i.e., non-option arguments) are treated by GNU tar as the names of archive members to be extracted from that archive [6][7][8][9]. If no member names are provided as non-option arguments, GNU tar performs the operation on the entire contents of the archive [6][7]. In summary: - Multiple -f options: These define a sequence of volumes for a single multi-volume archive [1][4][5]. - Non-option arguments after -f: These are treated as the specific files (members) within that archive to act upon [6][7][9]. If you intend to extract from multiple distinct archive files, you must run separate tar commands for each archive, as GNU tar does not support extracting from multiple independent archive files in a single invocation [1][10]. Attempting to provide multiple filenames as arguments to a single -f option (e.g., tar -x -f archive1.tar archive2.tar) would result in tar treating 'archive2.tar' as an archive member name to look for inside 'archive1.tar', rather than as a separate archive file [6][7][3].
Citations:
🏁 Script executed:
Repository: openshift/release
Length of output: 4768
🏁 Script executed:
Repository: openshift/release
Length of output: 167
🏁 Script executed:
Repository: openshift/release
Length of output: 4408
🏁 Script executed:
Repository: openshift/release
Length of output: 6274
🏁 Script executed:
Repository: openshift/release
Length of output: 43
Fix log-bundle extraction when the glob matches multiple archives
At line 111,
tar -xzf "${dir}"/log-bundle-*.tar.gz ...fails when the glob expands to more than onelog-bundle-*.tar.gz(GNU tar treats the extra filenames as members of the first archive), so additional log bundles won’t be extracted into${ARTIFACT_DIR}.Suggested fix
📝 Committable suggestion
🤖 Prompt for AI Agents