Skip to content
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

[clean] Improve collect cleaning consistency #2492

Closed

Conversation

TurboTurtle
Copy link
Member

@TurboTurtle TurboTurtle commented Apr 14, 2021

This 2-patch set resolves issues surrounding the consistency of --clean when used with collect.

All subsequent archives from a multi-node collect should now be properly cleaned every time, just the same
as the first archive. Additionally, we now more accurately prep our mappings for consistent obfuscation across archives
regardless of which order they are obfuscated in.

Closes: #2490
Related: RHBZ#1930181
Resolves: #2492


Please place an 'X' inside each '[]' to confirm you adhere to our Contributor Guidelines

  • Is the commit message split over multiple lines and hard-wrapped at 72 characters?
  • Is the subject and message clear and concise?
  • Does the subject start with [plugin_name] if submitting a plugin patch or a [section_name] if part of the core sosreport code?
  • Does the commit contain a Signed-off-by: First Lastname email@example.com?
  • If this commit closes an existing issue, is the line Closes: #ISSUENUMBER included in an independent line?
  • If this commit resolves an existing pull request, is the line Resolves: #PRNUMBER included in an independent line?

@TurboTurtle TurboTurtle changed the title Collect consistency cleaning [clean] Improve collect consistency cleaning Apr 14, 2021
@TurboTurtle TurboTurtle changed the title [clean] Improve collect consistency cleaning [clean] Improve collect cleaning consistency Apr 14, 2021
Previously, maps were being prepped via archives after extraction. This
reduced the amount of file IO being done, but made it so that necessary
obfuscations from later archives in a series would not be obfuscated in
the archives obfuscated before those later archives were extracted.

Fix this by extracting the map prep files into memory for each archive
to prep the maps before we enter the obfuscation loop entirely.

Closes: sosreport#2490
Related: RHBZ#1930181
Resolves: sosreport#2492

Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
A redundant file skipping check was being executed within
`obfuscate_line()` that would cause subsequent archives being obfuscated
to skip line obfuscation within a file, despite iterating through the
entire file.

Remove this redundant check, thus allowing proper obfuscation.

Closes: sosreport#2490
Related: RHBZ#1930181
Resolves: sosreport#2492

Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
TurboTurtle added a commit that referenced this pull request Apr 16, 2021
A redundant file skipping check was being executed within
`obfuscate_line()` that would cause subsequent archives being obfuscated
to skip line obfuscation within a file, despite iterating through the
entire file.

Remove this redundant check, thus allowing proper obfuscation.

Closes: #2490
Related: RHBZ#1930181
Resolves: #2492

Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

when using --clean the local hostname should be obfuscated as well
2 participants