Description
When customers run the generate tech-support archive command, the current logic results in duplicated information within the generated archives. This leads to unnecessary storage consumption and inefficiencies in troubleshooting.
During the archive creation process, the temporary archive is first stored in the /tmp/ folder. However, when the /tmp/ directory itself is later archived, the previously generated archive is included again, causing duplication.
Steps to Reproduce
- Run generate tech-support archive.
- Inspect the contents of the generated archive.
- Observe that the temporary archive stored in /tmp/ is included within the final archive, leading to redundant data.
Expected Behavior
- The temporary working directory used during archive creation should not be included in the final archive to avoid duplication.
Proposed Fix
- Ensure that the temporary archive stored in /tmp/ is removed or excluded from being re-archived.
Impact
- Increased disk space usage.
- Inefficient troubleshooting due to redundant data.
- Longer archive generation times.