Give dialogs/models/archive logs unique names #18365
Merged
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.
https://bugzilla.redhat.com/show_bug.cgi?id=1656318
Previously, if you tried to collect logs from servers using an nfs
or smb depot, only the Archive***.zip and Current***.zip would be
uploaded. Behind, the scenes, we were uploading the automate models and
dialogs as the same Archive***.zip so they'd overwrite each other.
In MiqServer#post_logs, it calls:
post_automate_models => was using Archive***.zip
post_automate_dialogs => was using Archive***.zip
post_historical_logs => was using Archive***.zip
post_current_logs => uses Current***.zip
Therefore, the last Archive***.zip would "win", so the historical logs
would be in the Archive***.zip.
The nfs/smb code relies upon relative_path_for_upload to
determine a remote filename for upload. This method only knew about
archive and current logs and was giving everything but "Current" logs the
"Archive" filename prefix which meant dialogs/models and archived logs
would often have the same filename.
This method now uses the already known local file's name to determine this
prefix, allowing the input dialogs.zip, models.zip, current.zip, and
archive.zip to create unique names for this set of logs regardless of the
zone, server, or log timestamps.