Why is Automation Suite support bundle script creating empty logs?
Issue Description:
- After exporting a support bundle, a large majority, if not all, generated logs will be empty with a file size of 0 bytes.
- Search for the following error message within the support-bundle.log file:
- gzip: 20230412-0.log: unknown suffix -- ignored && cat: 20230412-0: No such file or directory.
Root Cause:
The support bundle packaged with v2022.10 of Automation Suite produces empty logs due to a bug in the generate-support-bundle.sh script.
Resolution:
Approach #1: Modify the support-bundle/scripts/generate-support-bundle.sh script
OLD CODE (lines 335-340)
for chunk in $all_chunks do gzip -d "$chunk" file_name=$(echo "$chunk" | cut -d '.' -f 1) cat "$file_name" >> "$LOG_LOCATION" done
NEW CODE (lines 335-344)
for chunk in $all_chunks do file_name="$chunk" file_extension=$(echo "$chunk" | cut -d '.' -f 2) if [[ "${file_extension}" == "gz" ]]; then gzip -d "$chunk" file_name=$(echo "$chunk" | cut -d '.' -f 1) fi cat "$file_name" >> "$LOG_LOCATION" done
Approach #2: Replace the support-bundle package with a version >= 22.10.6